kernel.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <sect1 id="ch08-kernel">
  2. <title>Installing a kernel</title>
  3. <screen>Estimated build time: &kernel-time;
  4. Estimated required disk space: &kernel-compsize;</screen>
  5. <para>Building the kernel involves a few steps: configuring it and compiling
  6. it. There are a few ways to configure the kernel. If you don't like the
  7. way this book does it, read the <filename>README</filename> that comes
  8. with the kernel source tree, and find out what the options are.</para>
  9. <para>Something you could do, is take the .config file from your host
  10. distribution's kernel source tree and copy it to $LFS/usr/src/linux.
  11. This way you don't have to configure the entire kernel from scratch and
  12. can use your current values. If you choose to do this, first run the
  13. make mrproper command below, then copy the .config file over, then run
  14. make menuconfig.</para>
  15. <para>The following commands are run to build the kernel:</para>
  16. <para><screen><userinput>cd /usr/src/linux &amp;&amp;</userinput>
  17. <userinput>make mrproper &amp;&amp;</userinput>
  18. <userinput>make menuconfig &amp;&amp;</userinput>
  19. <userinput>make dep &amp;&amp;</userinput>
  20. <userinput>make bzImage &amp;&amp;</userinput>
  21. <userinput>make modules &amp;&amp;</userinput>
  22. <userinput>make modules_install &amp;&amp;</userinput>
  23. <userinput>cp arch/i386/boot/bzImage /boot/lfskernel &amp;&amp;</userinput>
  24. <userinput>cp System.map /boot</userinput></screen></para>
  25. <para>Note: the arch/i386/boot/bzImage path may vary on
  26. different platforms.</para>
  27. </sect1>