mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
[Bug 191] Add kernel header explanation
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1316 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
9f13b5a688
commit
94f491595f
@ -23,6 +23,10 @@
|
|||||||
|
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>October 12th, 2001 [markh]: Chapter 5 - Kernel: Added
|
||||||
|
explanation as to why we copy the kernel headers rather than symlink
|
||||||
|
them.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>October 12th, 2001 [markh]: Appendix A - Gzip: Added
|
<listitem><para>October 12th, 2001 [markh]: Appendix A - Gzip: Added
|
||||||
uncompress to the gunzip description as it was
|
uncompress to the gunzip description as it was
|
||||||
missing.</para></listitem>
|
missing.</para></listitem>
|
||||||
|
35
chapter05/kernel-exp-headers.xml
Normal file
35
chapter05/kernel-exp-headers.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<sect2>
|
||||||
|
<title>Why we copy the kernel headers and don't symlink them</title>
|
||||||
|
|
||||||
|
<para>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 <emphasis>bad</emphasis> idea as
|
||||||
|
this extract from a post by Linus Torvalds to the Linux Kernel
|
||||||
|
Mailing List points out:</para>
|
||||||
|
|
||||||
|
<screen>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.</screen>
|
||||||
|
|
||||||
|
<para>The relevant part here is where he states that the headers should
|
||||||
|
be the ones which <emphasis>glibc was compiled against</emphasis>. 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 <filename>/usr/src/linux</filename>.</para>
|
||||||
|
|
||||||
|
</sect2>
|
@ -7,6 +7,7 @@ Estimated required disk space: &kernel-compsize-static;</screen>
|
|||||||
|
|
||||||
&c5-kernel-inst;
|
&c5-kernel-inst;
|
||||||
&c5-kernel-exp;
|
&c5-kernel-exp;
|
||||||
|
&c5-kernel-exp-headers;
|
||||||
&aa-kernel-desc;
|
&aa-kernel-desc;
|
||||||
&ab-kernel-dep;
|
&ab-kernel-dep;
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@
|
|||||||
<!ENTITY c5-kernel SYSTEM "chapter5/kernel.xml">
|
<!ENTITY c5-kernel SYSTEM "chapter5/kernel.xml">
|
||||||
<!ENTITY c5-kernel-inst SYSTEM "chapter5/kernel-inst.xml">
|
<!ENTITY c5-kernel-inst SYSTEM "chapter5/kernel-inst.xml">
|
||||||
<!ENTITY c5-kernel-exp SYSTEM "chapter5/kernel-exp.xml">
|
<!ENTITY c5-kernel-exp SYSTEM "chapter5/kernel-exp.xml">
|
||||||
|
<!ENTITY c5-kernel-exp-headers SYSTEM "chapter5/kernel-exp-headers.xml">
|
||||||
<!ENTITY c5-make SYSTEM "chapter5/make.xml">
|
<!ENTITY c5-make SYSTEM "chapter5/make.xml">
|
||||||
<!ENTITY c5-make-inst SYSTEM "chapter5/make-inst.xml">
|
<!ENTITY c5-make-inst SYSTEM "chapter5/make-inst.xml">
|
||||||
<!ENTITY c5-mawk SYSTEM "chapter5/mawk.xml">
|
<!ENTITY c5-mawk SYSTEM "chapter5/mawk.xml">
|
||||||
|
Loading…
Reference in New Issue
Block a user