Browse Source

chapter06: Translate Linux headers instruction

Xi Ruoyao 7 years ago
parent
commit
21bf491038
1 changed files with 32 additions and 21 deletions
  1. 32 21
      chapter06/linux-headers.xml

+ 32 - 21
chapter06/linux-headers.xml

@@ -14,7 +14,7 @@
     <address>&linux-url;</address>
   </sect1info>
 
-  <title>Linux-&linux-version; API Headers</title>
+  <title>Linux-&linux-version; API 头文件</title>
 
   <indexterm zone="ch-system-linux-headers">
     <primary sortas="a-Linux">Linux</primary>
@@ -24,8 +24,10 @@
   <sect2 role="package">
     <title/>
 
-    <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
-    kernel's API for use by Glibc.</para>
+    <!--para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
+    kernel's API for use by Glibc.</para-->
+    <para>Linux API 头文件 (在 linux-&linux-version;.tar.xz 中)
+		导出内核 API 供 Glibc 使用。</para>
 
     <segmentedlist>
       <segtitle>&buildtime;</segtitle>
@@ -40,24 +42,33 @@
   </sect2>
 
   <sect2 role="installation">
-    <title>安装Linux API Headers</title>
+    <title>安装 Linux API 头文件</title>
 
-    <para>The Linux kernel needs to expose an Application Programming Interface
+    <!--para>The Linux kernel needs to expose an Application Programming Interface
     (API) for the system's C library (Glibc in LFS) to use.  This is done
     by way of sanitizing various C header files that are shipped in the Linux
-    kernel source tarball.</para>
+    kernel source tarball.</para-->
+	<para>Linux 内核需要导出一个应用程序编程接口 (API) 供系统的 C 运行库
+		(例如 LFS 中的 Glibc)使用。
+		这通过净化内核源码包中提供的若干 C 头文件完成。</para>
 
-    <para>Make sure there are no stale files and dependencies lying around
-    from previous activity:</para>
+    <!--para>Make sure there are no stale files and dependencies lying around
+    from previous activity:</para-->
+	<para>确保在之前的活动中没有留下陈旧的文件和依赖关系:</para>
 
 <screen><userinput remap="pre">make mrproper</userinput></screen>
 
-    <para>Now extract the user-visible kernel headers from the source.
+    <!--para>Now extract the user-visible kernel headers from the source.
     They are placed in an intermediate local directory and copied to the needed
     location because the extraction process removes any existing files in
     the target directory.  There are also some hidden files used by
     the kernel developers and not needed by LFS that are removed from
-    the intermediate directory.</para>
+    the intermediate directory.</para-->
+	<para>现在从源码中提取用户可见的内核头文件。
+		它们被放置在一个临时本地目录中,然后再复制到需要的位置,
+		这是因为提取过程会删除目标目录中的所有文件。
+		另外,提取结果中有一些内核开发者使用的隐藏文件,LFS 不需要它们,
+		我们可以在临时目录中删除这些文件。</para>
 
 <screen><userinput remap="make">make INSTALL_HDR_PATH=dest headers_install
 find dest/include \( -name .install -o -name ..install.cmd \) -delete
@@ -69,7 +80,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
     <title>Linux API Headers 的内容</title>
 
     <segmentedlist>
-      <segtitle>Installed headers</segtitle>
+      <segtitle>安装的头文件</segtitle>
       <segtitle>安装的目录</segtitle>
 
       <seglistitem>
@@ -93,7 +104,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="asm">
         <term><filename class="headerfile">/usr/include/asm/*.h</filename></term>
         <listitem>
-          <para>The Linux API ASM Headers</para>
+          <para>Linux API ASM 头文件</para>
           <indexterm zone="ch-system-linux-headers asm">
             <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary>
           </indexterm>
@@ -103,7 +114,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="asm-generic">
         <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term>
         <listitem>
-          <para>The Linux API ASM Generic Headers</para>
+          <para>Linux API ASM Generic 头文件</para>
           <indexterm zone="ch-system-linux-headers asm-generic">
             <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary>
           </indexterm>
@@ -113,7 +124,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="drm">
         <term><filename class="headerfile">/usr/include/drm/*.h</filename></term>
         <listitem>
-          <para>The Linux API DRM Headers</para>
+          <para>Linux API DRM 头文件</para>
           <indexterm zone="ch-system-linux-headers drm">
             <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary>
           </indexterm>
@@ -123,7 +134,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="linux">
         <term><filename class="headerfile">/usr/include/linux/*.h</filename></term>
         <listitem>
-          <para>The Linux API Linux Headers</para>
+          <para>Linux API Linux 头文件</para>
           <indexterm zone="ch-system-linux-headers linux">
             <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary>
           </indexterm>
@@ -133,7 +144,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="mtd">
         <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term>
         <listitem>
-          <para>The Linux API MTD Headers</para>
+          <para>Linux API MTD 头文件</para>
           <indexterm zone="ch-system-linux-headers mtd">
             <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary>
           </indexterm>
@@ -143,7 +154,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="rdma">
         <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term>
         <listitem>
-          <para>The Linux API RDMA Headers</para>
+          <para>Linux API RDMA 头文件</para>
           <indexterm zone="ch-system-linux-headers rdma">
             <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary>
           </indexterm>
@@ -153,7 +164,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="scsi">
         <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term>
         <listitem>
-          <para>The Linux API SCSI Headers</para>
+          <para>Linux API SCSI 头文件</para>
           <indexterm zone="ch-system-linux-headers scsi">
             <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary>
           </indexterm>
@@ -163,7 +174,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="sound">
         <term><filename class="headerfile">/usr/include/sound/*.h</filename></term>
         <listitem>
-          <para>The Linux API Sound Headers</para>
+          <para>Linux API Sound 头文件</para>
           <indexterm zone="ch-system-linux-headers sound">
             <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary>
           </indexterm>
@@ -173,7 +184,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="video">
         <term><filename class="headerfile">/usr/include/video/*.h</filename></term>
         <listitem>
-          <para>The Linux API Video Headers</para>
+          <para>Linux API Video 头文件</para>
           <indexterm zone="ch-system-linux-headers video">
             <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary>
           </indexterm>
@@ -183,7 +194,7 @@ find dest/include \( -name .install -o -name ..install.cmd \) -delete
       <varlistentry id="xen">
         <term><filename class="headerfile">/usr/include/xen/*.h</filename></term>
         <listitem>
-          <para>The Linux API Xen Headers</para>
+          <para>Linux API Xen 头文件</para>
           <indexterm zone="ch-system-linux-headers xen">
             <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary>
           </indexterm>