kernelheaders.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <sect1 id="ch-tools-kernel-headers">
  2. <title>Installing Linux-&kernel-version; headers</title>
  3. <?dbhtml filename="kernel-headers.html" dir="chapter05"?>
  4. <screen>&buildtime; &kernel-time-headers;
  5. &diskspace; &kernel-compsize-headers;</screen>
  6. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  7. <sect2>
  8. <title>Installation of the kernel headers</title>
  9. <para>As some packages need to refer to the kernel header files, we're going
  10. to unpack the kernel archive now, set it up, and copy the required files to a
  11. place where <command>gcc</command> can later find them.</para>
  12. <para>Prepare for the header installation with:</para>
  13. <screen><userinput>make mrproper</userinput></screen>
  14. <para>This ensures that the kernel tree is absolutely clean. The kernel team
  15. recommends that this command be issued prior to <emphasis>each</emphasis> kernel
  16. compilation. You shouldn't rely on the source tree being clean after
  17. untarring.</para>
  18. <para>Create the <filename>include/linux/version.h</filename> file:</para>
  19. <screen><userinput>make include/linux/version.h</userinput></screen>
  20. <para>Create the platform-specific <filename>include/asm</filename>
  21. symlink:</para>
  22. <screen><userinput>make symlinks</userinput></screen>
  23. <para>Install the platform-specific header files:</para>
  24. <screen><userinput>mkdir /tools/include/asm
  25. cp include/asm/* /tools/include/asm
  26. cp -R include/asm-generic /tools/include</userinput></screen>
  27. <para>And finally install the cross-platform kernel header files:</para>
  28. <screen><userinput>cp -R include/linux /tools/include</userinput></screen>
  29. </sect2>
  30. </sect1>