From 94f491595f6dfa583af7eac65e327c619ceb9a13 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sun, 14 Oct 2001 13:13:22 +0000 Subject: [Bug 191] Add kernel header explanation git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1316 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/kernel-exp-headers.xml | 35 +++++++++++++++++++++++++++++++++++ chapter05/kernel.xml | 1 + 2 files changed, 36 insertions(+) create mode 100644 chapter05/kernel-exp-headers.xml (limited to 'chapter05') diff --git a/chapter05/kernel-exp-headers.xml b/chapter05/kernel-exp-headers.xml new file mode 100644 index 000000000..46738144c --- /dev/null +++ b/chapter05/kernel-exp-headers.xml @@ -0,0 +1,35 @@ + +Why we copy the kernel headers and don't symlink them + +In the past, it was common practise for people to symlink the +/usr/include/linux and asm directories to /usr/src/linux/include/linux +and asm respectively. This is a bad idea as +this extract from a post by Linus Torvalds to the Linux Kernel +Mailing List points out: + +I would suggest that people who compile new kernels should: + + - not have a single symbolic link in sight (except the one that the + kernel build itself sets up, namely the "linux/include/asm" symlink + that is only used for the internal kernel compile itself) + +And yes, this is what I do. My /usr/src/linux still has the old 2.2.13 +header files, even though I haven't run a 2.2.13 kernel in a _loong_ +time. But those headers were what glibc was compiled against, so those +headers are what matches the library object files. + +And this is actually what has been the suggested environment for at +least the last five years. I don't know why the symlink business keeps +on living on, like a bad zombie. Pretty much every distribution still +has that broken symlink, and people still remember that the linux +sources should go into "/usr/src/linux" even though that hasn't been +true in a _loong_ time. + +The relevant part here is where he states that the headers should +be the ones which glibc was compiled against. These are +the headers which should remain accessable and so by copying them, we ensure +that we follow these guidelines. Also note that as long as you don't have +those symlinks, it is perfectly alright to have the kernel sources +in /usr/src/linux. + + diff --git a/chapter05/kernel.xml b/chapter05/kernel.xml index 5de11978e..858ed2f0e 100644 --- a/chapter05/kernel.xml +++ b/chapter05/kernel.xml @@ -7,6 +7,7 @@ Estimated required disk space: &kernel-compsize-static; &c5-kernel-inst; &c5-kernel-exp; +&c5-kernel-exp-headers; &aa-kernel-desc; &ab-kernel-dep; -- cgit v1.2.3-54-g00ecf