kernel.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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</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>The following commands are run to build the kernel:</para>
  22. <para><screen><userinput>cd /usr/src/linux &amp;&amp;</userinput>
  23. <userinput>make mrproper &amp;&amp;</userinput>
  24. <userinput>make menuconfig &amp;&amp;</userinput>
  25. <userinput>make dep &amp;&amp;</userinput>
  26. <userinput>make bzImage &amp;&amp;</userinput>
  27. <userinput>make modules &amp;&amp;</userinput>
  28. <userinput>make modules_install &amp;&amp;</userinput>
  29. <userinput>cp arch/i386/boot/bzImage /boot/lfskernel &amp;&amp;</userinput>
  30. <userinput>cp System.map /boot</userinput></screen></para>
  31. <para>Note: the arch/i386/boot/bzImage path may vary on
  32. different platforms.</para>
  33. &aa-kernel-dep;
  34. </sect1>