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

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



Kilian ha scritto:
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 ;-)
Hi Kilian,

I'm sorry but don't work.
I can't create a symlink: #ln -s /usr/src/linux-source-2.6.15 /include/linux /usr/include/linux because they are ("linux") two directory with different file
This is my situation:
# uname -r
2.6.15
# ls -lah /lib/modules/2.6.15/
drwxr-xr-x 2 root root 4,0K 2006-05-17 22:31 bcm
lrwxrwxrwx 1 root root 28 2006-05-17 22:31 build -> /usr/src/linux-source-2.6.15
drwxr-xr-x 3 root root 4,0K 2006-05-17 22:31 drivers
drwxr-xr-x 2 root root 4,0K 2006-05-17 22:32 extra
drwxr-xr-x 8 root root 4,0K 2006-05-17 22:31 kernel
-rw-r--r-- 1 root root  27K 2006-05-18 21:36 modules.alias
-rw-r--r-- 1 root root   69 2006-05-18 21:36 modules.ccwmap
-rw-r--r-- 1 root root  16K 2006-05-18 21:36 modules.dep
-rw-r--r-- 1 root root   73 2006-05-18 21:36 modules.ieee1394map
-rw-r--r-- 1 root root  141 2006-05-18 21:36 modules.inputmap
-rw-r--r-- 1 root root   81 2006-05-18 21:36 modules.isapnpmap
-rw-r--r-- 1 root root   74 2006-05-18 21:36 modules.ofmap
-rw-r--r-- 1 root root  12K 2006-05-18 21:36 modules.pcimap
-rw-r--r-- 1 root root   43 2006-05-18 21:36 modules.seriomap
-rw-r--r-- 1 root root  16K 2006-05-18 21:36 modules.symbols
-rw-r--r-- 1 root root  55K 2006-05-18 21:36 modules.usbmap
drwxr-xr-x 3 root root 4,0K 2006-05-17 22:31 net
lrwxrwxrwx 1 root root 28 2006-05-17 22:31 source -> /usr/src/linux-source-2.6.15

In /usr/src/linux-source-2.6.15/* I don't have the autoconf.h file
#updatedb
#locate autoconf.h
/usr/include/asm-i486/autoconf.h
/usr/include/asm-x86_64/autoconf.h
/usr/include/linux/autoconf.h

Any idea?
Thanks for your support!

Marco

    -- Kilian





Reply to: