kernel-inst.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <sect2>
  2. <title>Installation of Linux Kernel</title>
  3. <para>
  4. We won't be compiling a new kernel image yet. We'll do that after we
  5. have finished the installation of the basic system software in this
  6. chapter. But because certain software need the kernel header files, we're
  7. going to unpack the kernel archive now and set it up so that we can
  8. compile package that need the kernel.
  9. </para>
  10. <para>
  11. The kernel configuration file is created by running the following command:
  12. </para>
  13. <blockquote><literallayout>
  14. <userinput>make mrproper &amp;&amp;</userinput>
  15. <userinput>yes "" | make config &amp;&amp;</userinput>
  16. <userinput>make dep &amp;&amp;</userinput>
  17. <userinput>cd $LFS/usr/include &amp;&amp;</userinput>
  18. <userinput>ln -s ../src/linux/include/linux &amp;&amp;</userinput>
  19. <userinput>ln -s ../src/linux/include/asm</userinput>
  20. </literallayout></blockquote>
  21. </sect2>
  22. <sect2>
  23. <title>FHS compliance notes</title>
  24. <para>
  25. According to the FHS, the /usr/include/linux and /usr/include/asm should be
  26. actual directories, not symbolic links to the ones belonging to the current
  27. kernel. The major advantage is that programs will compile with the headers glibc
  28. was compiled with, and this may prevent some compiling hell. Until now, in all
  29. of LFS' history, no compiling problem has been reported by using symlinks. So if
  30. you're tight on space, we recommend using symlinks. But if you want to be FHS
  31. compliant, replace the two last lines from the commands above with those:
  32. </para>
  33. <blockquote><literallayout>
  34. <userinput>cp -r ../src/linux/include/linux . &amp;&amp;</userinput>
  35. <userinput>cp -r ../src/linux/include/asm .</userinput>
  36. </literallayout></blockquote>
  37. </sect2>