[6370fa6] | 1 | <sect1 id="ch08-kernel">
|
---|
[e69a59f] | 2 | <title>Installing Linux-&kernel-version;</title>
|
---|
[e12115e] | 3 | <?dbhtml filename="kernel.html" dir="chapter08"?>
|
---|
[6370fa6] | 4 |
|
---|
[6403026] | 5 | <screen>Estimated build time: &kernel-time;
|
---|
| 6 | Estimated required disk space: &kernel-compsize;</screen>
|
---|
| 7 |
|
---|
[b822811] | 8 | <para>Building the kernel involves a few steps: configuring it and compiling
|
---|
[92e7ec2] | 9 | it. There are a few ways to configure the kernel. If you don't like the
|
---|
| 10 | way this book does it, read the <filename>README</filename> that comes
|
---|
[2bdc67d] | 11 | with the kernel source tree, and find out what the other options are.</para>
|
---|
[01067384] | 12 |
|
---|
[ce3379d4] | 13 | <para>Something you could do, is take the <filename>.config</filename>
|
---|
| 14 | file from your host distribution's kernel source tree and copy it to
|
---|
[f73dcac] | 15 | <filename class="directory">$LFS/usr/src/linux-&kernel-version;</filename>.
|
---|
[01067384] | 16 | This way you don't have to configure the entire kernel from scratch and
|
---|
| 17 | can use your current values. If you choose to do this, first run the
|
---|
[ce3379d4] | 18 | <userinput>make mrproper</userinput> command below, then copy the
|
---|
| 19 | <filename>.config</filename> file over, then run
|
---|
| 20 | <userinput>make menuconfig</userinput> followed by the rest of the commands
|
---|
| 21 | (<userinput>make oldconfig</userinput> may be better in some situations.
|
---|
| 22 | See the <filename>README</filename> file for more details when to use
|
---|
| 23 | <userinput>make oldconfig</userinput>).</para>
|
---|
[01067384] | 24 |
|
---|
[fde5bc7] | 25 | <para>If you intend to use kernel modules, you will need an
|
---|
| 26 | <filename>/etc/modules.conf</filename> file. Information pertaining
|
---|
| 27 | to modules and to kernel configuration in general may be found in the
|
---|
| 28 | kernel documentation, which is stored stored in
|
---|
[f73dcac] | 29 | <filename>/usr/src/linux-&kernel-version;/Documentation</filename>. The
|
---|
| 30 | modules.conf man page and the kernel HOWTO at
|
---|
[76f5964] | 31 | <ulink url="&tldp-root;HOWTO/Kernel-HOWTO.html"/> may also be of
|
---|
[fde5bc7] | 32 | interest to you.</para>
|
---|
| 33 |
|
---|
[01067384] | 34 | <para>The following commands are run to build the kernel:</para>
|
---|
[6370fa6] | 35 |
|
---|
[bee1e69] | 36 | <para><screen><userinput>make mrproper &&
|
---|
| 37 | make menuconfig &&
|
---|
| 38 | make dep &&
|
---|
| 39 | make bzImage &&
|
---|
| 40 | make modules &&
|
---|
| 41 | make modules_install &&
|
---|
| 42 | cp arch/i386/boot/bzImage /boot/lfskernel &&
|
---|
| 43 | cp System.map /boot</userinput></screen></para>
|
---|
[6370fa6] | 44 |
|
---|
[b822811] | 45 | <para>Note: the arch/i386/boot/bzImage path may vary on
|
---|
| 46 | different platforms.</para>
|
---|
[fa50d69] | 47 |
|
---|
[9b29852] | 48 | &aa-kernel-dep;
|
---|
[6910868] | 49 |
|
---|
[6370fa6] | 50 | </sect1>
|
---|