kernel-inst.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <sect2>
  2. <title>Installation of the kernel headers</title>
  3. <para>We won't be compiling a new kernel yet -- we'll do that when we have
  4. finished the installation of all the packages. But as some packages need the
  5. kernel header files, we're going to unpack the kernel archive now, set it up,
  6. and copy the header files to where they will be found by these packages.</para>
  7. <para>It is important to note that the files in the kernel source directory
  8. are not owned by root. Whenever you unpack a package as user root (like we
  9. do here inside chroot), the files end up having the user and group ID's of
  10. whatever they were on the packager's computer. This is usually not a
  11. problem for any other package you install because you remove the source
  12. tree after the installation. But the Linux kernel source tree is often kept
  13. around for a long time, so there's a chance whatever userid was used will
  14. be assigned to somebody on your machine, and that person would get write
  15. access to the kernel source.</para>
  16. <para>In light of this, you might want to run <userinput>chown
  17. 0.0</userinput> on the linux-&kernel-version; directory to ensure all files
  18. are owned by user <emphasis>root</emphasis>.</para>
  19. <para>The kernel headers are installed by running the following
  20. commands:</para>
  21. <para><screen><userinput>ln -s /static/bin/pwd /bin/pwd &amp;&amp;
  22. make mrproper &amp;&amp;
  23. make include/linux/version.h &amp;&amp;
  24. make symlinks &amp;&amp;
  25. cp -HR include/asm /usr/include &amp;&amp;
  26. cp -R include/asm-generic /usr/include &amp;&amp;
  27. cp -R include/linux /usr/include &amp;&amp;
  28. touch /usr/include/linux/autoconf.h &amp;&amp;
  29. rm /bin/pwd</userinput></screen></para>
  30. </sect2>