LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   compile kernel-headers (https://www.linuxquestions.org/questions/debian-26/compile-kernel-headers-519813/)

hraposo 01-16-2007 09:48 AM

compile kernel-headers
 
How I compile kernel-headers from kernel-source-2.6X

Dutch Master 01-16-2007 09:57 AM

You don't need to compile kernel headers...

Get the headers with aptitude or synaptic. Search for linux-headers, as the kernel is "renamed" linux (for to me unknown reasons).

FnordPerfect 01-16-2007 09:59 AM

To answer your question:
* Unpack kernel-source (which should be called linux-source-* by now) to /usr/src
* cd to the directory
* type find -iname "include"

Voila, you have "compiled" the kernel headers!

--

In other words, what are you trying to do?

Compile a kernel, I suppose?

hraposo 01-16-2007 11:32 AM

Yes compile a kernel

nx5000 01-16-2007 11:39 AM

Do you know the debian reference?
Very interesting, its here:
http://www.debian.org/doc/manuals/re...kernel.en.html

FnordPerfect 01-16-2007 11:59 AM

Then you have to get a complete kernel source tree. It is in the package linux-source-<version-number>.
After downloading, it is a tar.bz archive in /usr/src
extract it with tar xfj linux-source-<version>.tar.bz2

( It's a good idea to create a symlink from the newly-created linux-source-<version> directory to ./linux so external modules can find them
$ ln -s linux-source-<version> linux )

$ cd linux

$ make menuinstall to get into the kernel configuration.
You have to wade through the gazillions of kernel options and obscure features. I'm excited by that every time...

$ apt-get install kernel-package provides you with the tool make-kpkg which assists you in compiling and creating a valid Debian package which includes the kernel

May I suggest you to have a look at this very comprehensive guide? Compiling the kernel is not a trivial thing to do the first time...:
http://newbiedoc.sourceforge.net/system/kernel-pkg.html

good luck

~fab

Michael_aust 01-16-2007 06:06 PM

If you have compiled your own kernel, then this command will build a kdernel-header package from it.

make-kpkg –initrd –revision 2.6.xx.x kernel_headers

If its any use I have written my own guide for compiling a kernel:

http://tuxedup.wordpress.com/2007/01...-under-debian/


All times are GMT -5. The time now is 02:55 PM.