linux-headers.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-linux-headers" role="wrap">
  8. <?dbhtml filename="linux-headers.html"?>
  9. <title>Linux-Headers-&linux-version;</title>
  10. <indexterm zone="ch-system-linux-headers">
  11. <primary sortas="a-Linux-Headers">Linux-Headers</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Linux-Headers expose the kernel's API for use by Glibc.</para>
  16. <segmentedlist>
  17. <segtitle>&buildtime;</segtitle>
  18. <segtitle>&diskspace;</segtitle>
  19. <seglistitem>
  20. <seg>&linux-headers-ch6-sbu;</seg>
  21. <seg>&linux-headers-ch6-du;</seg>
  22. </seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Linux-Headers</title>
  27. <para>The Linux kernel needs to expose an Application Programming Interface
  28. (API) for the system's C library (Glibc in LFS) to utilize. This is done
  29. by way of sanitizing various C header files that are shipped in the Linux
  30. kernel source tarball.</para>
  31. <para>Apply the following patch to provide <command>unifdef</command>, which
  32. the installation of the kernel headers requires:</para>
  33. <screen><userinput>patch -Np1 -i ../linux-&linux-version;-unifdef-1.patch</userinput></screen>
  34. <para>Install the header files:</para>
  35. <screen><userinput>make mrproper
  36. make headers_check
  37. make INSTALL_HDR_PATH=/usr headers_install</userinput></screen>
  38. <para>Ensure that all the headers are owned by root:</para>
  39. <screen><userinput>chown -Rv root:root /usr/include/{asm,linux}</userinput></screen>
  40. <para>Make sure the users can read the headers:</para>
  41. <screen><userinput>find /usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
  42. find /usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;</userinput></screen>
  43. </sect2>
  44. <sect2 id="contents-linux-headers" role="content">
  45. <title>Contents of Linux-Headers</title>
  46. <segmentedlist>
  47. <segtitle>Installed headers</segtitle>
  48. <seglistitem>
  49. <seg>/usr/include/{asm,linux}/*.h</seg>
  50. </seglistitem>
  51. </segmentedlist>
  52. <variablelist>
  53. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  54. <?dbfo list-presentation="list"?>
  55. <?dbhtml list-presentation="table"?>
  56. <varlistentry id="linux-headers">
  57. <term><filename class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
  58. <listitem>
  59. <para>The Linux API headers</para>
  60. <indexterm zone="ch-system-linux-headers linux-headers">
  61. <primary sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
  62. </indexterm>
  63. </listitem>
  64. </varlistentry>
  65. </variablelist>
  66. </sect2>
  67. </sect1>