kernelheaders-inst.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of the kernel headers</title>
  4. <para>As some packages need to refer to the kernel header files, we're going
  5. to unpack the kernel archive now, set it up, and copy the required files to a
  6. place where <userinput>gcc</userinput> can later find them.</para>
  7. <para>Prepare for the header installation with:</para>
  8. <screen><userinput>make mrproper</userinput></screen>
  9. <para>This ensures that the kernel tree is absolutely clean. The kernel team
  10. recommends that this command be issued prior to <emphasis>each</emphasis> kernel
  11. compilation. You shouldn't rely on the source tree being clean after
  12. untarring.</para>
  13. <para>Create the <filename>include/linux/version.h</filename> file:</para>
  14. <screen><userinput>make include/linux/version.h</userinput></screen>
  15. <para>Create the platform-specific <filename>include/asm</filename>
  16. symlink:</para>
  17. <screen><userinput>make symlinks</userinput></screen>
  18. <para>Install the platform-specific header files:</para>
  19. <screen><userinput>mkdir /tools/include/asm
  20. cp include/asm/* /tools/include/asm
  21. cp -R include/asm-generic /tools/include</userinput></screen>
  22. <para>Install the cross-platform kernel header files:</para>
  23. <screen><userinput>cp -R include/linux /tools/include</userinput></screen>
  24. <para>There are a few kernel header files which make use of the
  25. <filename>autoconf.h</filename> header file. Since we do not yet configure the
  26. kernel, we need to create this file ourselves in order to avoid compilation
  27. failures. Create an empty <filename>autoconf.h</filename> file:</para>
  28. <screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen>
  29. </sect2>