1
0

linux-headers.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/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. <sect1info condition="script">
  10. <productname>linux</productname>
  11. <productnumber>&linux-version;</productnumber>
  12. <address>&linux-url;</address>
  13. </sect1info>
  14. <title>Linux-&linux-version; API 头文件</title>
  15. <indexterm zone="ch-system-linux-headers">
  16. <primary sortas="a-Linux">Linux</primary>
  17. <secondary>API headers</secondary>
  18. </indexterm>
  19. <sect2 role="package">
  20. <title/>
  21. <!--para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
  22. kernel's API for use by Glibc.</para-->
  23. <para>Linux API 头文件 (在 linux-&linux-version;.tar.xz 中)
  24. 导出内核 API 供 Glibc 使用。</para>
  25. <segmentedlist>
  26. <segtitle>&buildtime;</segtitle>
  27. <segtitle>&diskspace;</segtitle>
  28. <seglistitem>
  29. <seg>&linux-headers-ch6-sbu;</seg>
  30. <seg>&linux-headers-ch6-du;</seg>
  31. </seglistitem>
  32. </segmentedlist>
  33. </sect2>
  34. <sect2 role="installation">
  35. <title>安装 Linux API 头文件</title>
  36. <!--para>The Linux kernel needs to expose an Application Programming Interface
  37. (API) for the system's C library (Glibc in LFS) to use. This is done
  38. by way of sanitizing various C header files that are shipped in the Linux
  39. kernel source tarball.</para-->
  40. <para>Linux 内核需要导出一个应用程序编程接口 (API) 供系统的 C 运行库
  41. (例如 LFS 中的 Glibc)使用。
  42. 这通过净化内核源码包中提供的若干 C 头文件完成。</para>
  43. <!--para>Make sure there are no stale files and dependencies lying around
  44. from previous activity:</para-->
  45. <para>确保在之前的活动中没有留下陈旧的文件和依赖关系:</para>
  46. <screen><userinput remap="pre">make mrproper</userinput></screen>
  47. <!--para>Now extract the user-visible kernel headers from the source.
  48. They are placed in an intermediate local directory and copied to the needed
  49. location because the extraction process removes any existing files in
  50. the target directory. There are also some hidden files used by
  51. the kernel developers and not needed by LFS that are removed from
  52. the intermediate directory.</para-->
  53. <para>现在从源码中提取用户可见的内核头文件。
  54. 它们被放置在一个临时本地目录中,然后再复制到需要的位置,
  55. 这是因为提取过程会删除目标目录中的所有文件。
  56. 另外,提取结果中有一些内核开发者使用的隐藏文件,LFS 不需要它们,
  57. 我们可以在临时目录中删除这些文件。</para>
  58. <screen><userinput remap="make">make INSTALL_HDR_PATH=dest headers_install
  59. find dest/include \( -name .install -o -name ..install.cmd \) -delete
  60. </userinput><userinput remap="install">cp -rv dest/include/* /usr/include</userinput></screen>
  61. </sect2>
  62. <sect2 id="contents-linux-headers" role="content">
  63. <title>Linux API 头文件的内容</title>
  64. <segmentedlist>
  65. <segtitle>安装的头文件</segtitle>
  66. <segtitle>安装的目录</segtitle>
  67. <seglistitem>
  68. <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h,
  69. /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h,
  70. /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h,
  71. /usr/include/sound/*.h, /usr/include/video/*.h,
  72. 以及 /usr/include/xen/*.h</seg>
  73. <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm,
  74. /usr/include/linux, /usr/include/misc, /usr/include/mtd,
  75. /usr/include/rdma, /usr/include/scsi, /usr/include/sound,
  76. /usr/include/video, 以及 /usr/include/xen</seg>
  77. </seglistitem>
  78. </segmentedlist>
  79. <variablelist>
  80. <bridgehead renderas="sect3">简要描述</bridgehead>
  81. <?dbfo list-presentation="list"?>
  82. <?dbhtml list-presentation="table"?>
  83. <varlistentry id="asm">
  84. <term><filename class="headerfile">/usr/include/asm/*.h</filename></term>
  85. <listitem>
  86. <para>Linux API 汇编头文件</para>
  87. <indexterm zone="ch-system-linux-headers asm">
  88. <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary>
  89. </indexterm>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry id="asm-generic">
  93. <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term>
  94. <listitem>
  95. <para>Linux API 通用汇编头文件</para>
  96. <indexterm zone="ch-system-linux-headers asm-generic">
  97. <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary>
  98. </indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="drm">
  102. <term><filename class="headerfile">/usr/include/drm/*.h</filename></term>
  103. <listitem>
  104. <para>Linux API DRM 头文件</para>
  105. <indexterm zone="ch-system-linux-headers drm">
  106. <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="linux">
  111. <term><filename class="headerfile">/usr/include/linux/*.h</filename></term>
  112. <listitem>
  113. <para>Linux API Linux 头文件</para>
  114. <indexterm zone="ch-system-linux-headers linux">
  115. <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary>
  116. </indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="mtd">
  120. <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term>
  121. <listitem>
  122. <para>Linux API MTD 头文件</para>
  123. <indexterm zone="ch-system-linux-headers mtd">
  124. <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary>
  125. </indexterm>
  126. </listitem>
  127. </varlistentry>
  128. <varlistentry id="rdma">
  129. <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term>
  130. <listitem>
  131. <para>Linux API RDMA 头文件</para>
  132. <indexterm zone="ch-system-linux-headers rdma">
  133. <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary>
  134. </indexterm>
  135. </listitem>
  136. </varlistentry>
  137. <varlistentry id="scsi">
  138. <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term>
  139. <listitem>
  140. <para>Linux API SCSI 头文件</para>
  141. <indexterm zone="ch-system-linux-headers scsi">
  142. <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary>
  143. </indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="sound">
  147. <term><filename class="headerfile">/usr/include/sound/*.h</filename></term>
  148. <listitem>
  149. <para>Linux API 音频头文件</para>
  150. <indexterm zone="ch-system-linux-headers sound">
  151. <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary>
  152. </indexterm>
  153. </listitem>
  154. </varlistentry>
  155. <varlistentry id="video">
  156. <term><filename class="headerfile">/usr/include/video/*.h</filename></term>
  157. <listitem>
  158. <para>Linux API 视频头文件</para>
  159. <indexterm zone="ch-system-linux-headers video">
  160. <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary>
  161. </indexterm>
  162. </listitem>
  163. </varlistentry>
  164. <varlistentry id="xen">
  165. <term><filename class="headerfile">/usr/include/xen/*.h</filename></term>
  166. <listitem>
  167. <para>Linux API Xen 头文件</para>
  168. <indexterm zone="ch-system-linux-headers xen">
  169. <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary>
  170. </indexterm>
  171. </listitem>
  172. </varlistentry>
  173. </variablelist>
  174. </sect2>
  175. </sect1>