tush at yahoo.com
Fri Nov 1 11:16:48 PST 2002
David C wrote:
>Not sure if this is the right place for this, but here goes.
>I've had this question for awhile now, and thought I sort of knew the
>The LFS book features a quote from Linus regarding various issues
>regarding the Kernel headers. I gather from it that the proper place to
>store the headers is in /usr/include/linux, rather than in
>/usr/src/linux with symlinks to them from the former. I also understand
>that those headers should baically be left alone, even if you upgrade
>your kernel, as they need to be the headers that glibc was compiled
Correct. By keeping the linux headers in /usr/include, we are free to
mess with /usr/src as we see fit.
>Ok so far, but is it safe to delete the /usr/src/linux* directory or
>untar a fresh tar.gz of the same version of it in the same directory
>(thus overwriting the old one) when I'm going to recompile? And further
>what to do when compiling a different version kernel?
If you follow the book in copying the headers, yes you may delete
>In other words, I guess I'm asking if the (/mnt/lfs)/usr/src/linux*
>directory is used for anything once the kernel is already compiled and
Nope, also it is not even neccessary to use /usr/src/linux for compiling
the kernel, you can use any directory you wish.
>Also, where are modules stored? In both my RH 8.0 host and in LFS, the
>/usr/include/linux directory does not have a modules directory, but the
>/usr/src/linux/include/linux directory does. Hence my confusion as to
>if it's ok to delete the kernel directory or not.
Compiled modules are stored in /lib/modules.
>Sorry if my message is convoluted and hard to understand. I'm new to
>Linux internals, but thanks to LFS I am learning quite rapidly.
From the book:
The essential part is where Linus states that the header files
should be/the ones which glibc was compiled against/. These are the
headers that should be used when you later compile other packages,
as they are the ones that match the object-code library files. By
copying the headers, we ensure that they remain available if later
you upgrade your kernel.
Note, by the way, that it is perfectly all right to have the kernel
sources in /usr/src/linux, as long as you don't have the
Me suggests removing Linus' quote from the book (with maybe a pointer to
the original message) and replaced by why the headers are copied over
instead of using symlinks. Since the quote mentions symlinks, it causes
LFS ID: 1377
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lfs-support