kernel.xml 2.1 KB

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