[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I use the linux-headers with the linux-source?

Marco wrote:
---------- Initial Header -----------

From : "Kilian" kil@gnu.ch
Marco wrote:
Hi everybody!
I have installed Debian Etch on my laptop.
I have installed the "linux-source-2.6.15" package,
and I have exctracted it with the command:
# tar -jxf /usr/src/linux-source-2.6.15.tar.bz2

I have also installed the "linux-headers-2.6.15-686"
and the "linux-headers-2.6.15-1" packages (that should
be the linux-headers for my system (Intel Pentium M)).

What must I do to compile my kernel with the linux-headers?
Nothing special; the linux-source-2.6.15 already contains the linux kernel headers. The linux-headers-2.6.15 is only to provide the headers to systems which have the kernelsource not available. If you build software which includes kernel header files on such a system, you do not want to install the complete kernel source but only the headers, that's what this package is for AFAIK.

Hi Kilian,
Excuse me if I break the thread but I write you outside from my office with the webmail.

If the linux-source-2.6.15 package already contains the linux kernel
> headers, why in my linux-source directory I can't found the file
> autoconf.h (/usr/src/linux-source-2.6.15/include/linux/autoconf.h)?
> and in the linux-headers directory the file exist?

Sorry, what I wrote is not entirely correct. If you build a kernel, the headers are generated in the kernel tree under include/linux/. Usually, this directory is linked into /usr/include. The linux-headers package exists if you have no kernel source but need to include the kernel headers for some reason.

So if you want to build your own kernel, you do not need the kernel-headers package. Patch and build your kernel, install it and place a symlink from /usr/src/[kernel-source-dir]/include/linux to /usr/include/linux.

I hope I got it right this time ;-)

	-- Kilian

Reply to: