aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/kernel-exp.xml
blob: c01f32364287853db326d966a221434755051c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<sect2>
<title>Command explanations</title>

<para><userinput>ln -s /static/bin/pwd /bin/pwd</userinput>: The kernel
source hard-wires the path to <filename>pwd</filename> to be
<filename>/bin/pwd</filename> so we create a temporary symlink to deal with
it.</para>

<para><userinput>make mrproper:</userinput> This will ensure that the kernel
tree is absolutely clean.  We do this because the kernel team recommend
that this is done prior to <emphasis>each</emphasis> kernel compilation,
and that we shouldn't rely on the source tree being automatically clean
after untarring.</para>

<para><userinput>make include/linux/version.h</userinput> and
<userinput>make symlinks</userinput>: This creates the
<filename>include/linux/version.h</filename>, as well as the <filename
class="symlink">include/asm</filename> symlink.</para>

<para><userinput>mkdir $LFS/usr/include/asm</userinput>
and <userinput>cp include/asm/* $LFS/usr/include/asm</userinput>:
This copies the platform-specific assembler kernel header files to
<filename>$LFS/usr/include/asm</filename></para>

<para><userinput>cp -R include/linux $LFS/usr/include</userinput>:
This command copies the cross-platform kernel header files to
<filename>$LFS/usr/include</filename></para>

<para><userinput>touch $LFS/usr/include/linux/autoconf.h</userinput>: Some
kernel header files include this <filename>autoconf.h</filename> file, but
outside the Linux source tree, that file has no meaning so we just create
an empty one so we don't get compile errors whenever it happens to be a
dependency of another kernel header file.</para>

</sect2>