1
0

kernel.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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-bootable-kernel" role="wrap">
  8. <?dbhtml filename="kernel.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;</title>
  15. <indexterm zone="ch-bootable-kernel">
  16. <primary sortas="a-Linux">Linux</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Linux 软件包包含 Linux 内核。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&linux-ch8-sbu;</seg>
  26. <seg>&linux-ch8-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装内核</title>
  32. <!--para>Building the kernel involves a few steps&mdash;configuration,
  33. compilation, and installation. Read the <filename>README</filename> file
  34. in the kernel source tree for alternative methods to the way this book
  35. configures the kernel.</para-->
  36. <para>构建内核需要三步 —— 配置、编译、安装。
  37. 阅读内核源代码树中的 <filename>README</filename> 文件,
  38. 了解不同于本手册的内核配置方法。</para>
  39. <para>运行以下命令,准备编译内核:</para>
  40. <screen><userinput remap="pre">make mrproper</userinput></screen>
  41. <!--para>This ensures that the kernel tree is absolutely clean. The
  42. kernel team recommends that this command be issued prior to each
  43. kernel compilation. Do not rely on the source tree being clean after
  44. un-tarring.</para-->
  45. <para>该命令确保内核源代码树绝对干净,
  46. 内核开发组建议在每次编译内核前运行该命令。
  47. 尽管内核源代码树在解压后应该是干净的,但这并不完全可靠。</para>
  48. <!-- Support for compiling a keymap into the kernel is deliberately removed -->
  49. <!--para>Configure the kernel via a menu-driven interface. For general
  50. information on kernel configuration see <ulink
  51. url="&hints-root;kernel-configuration.txt"/>. BLFS has some information
  52. regarding particular kernel configuration requirements of packages outside
  53. of LFS at <ulink
  54. url="&blfs-book;longindex.html#kernel-config-index"/>. Additional
  55. information about configuring and building the kernel can be found at
  56. <ulink url="http://www.kroah.com/lkn/"/> </para-->
  57. <para>下面通过菜单界面配置内核,阅读
  58. <ulink url="&hints-root;kernel-configuration.txt"/>
  59. 了解关于内核配置的一般信息。
  60. BLFS 的某些软件包需要特定内核配置,阅读
  61. <ulink url="&blfs-book;longindex.html#kernel-config-index"/>
  62. 了解它们。另外在 <ulink url="http://www.kroah.com/lkn"/>
  63. 也有一些关于配置和构建内核的信息。</para>
  64. <note>
  65. <!--para>A good starting place for setting up the kernel configuration is to
  66. run <command>make defconfig</command>. This will set the base
  67. configuration to a good state that takes your current system architecture
  68. into account.</para-->
  69. <para>一个较好的初始内核配置可以通过运行
  70. <command>make defconfig</command> 获得。
  71. 它会考虑您的当前系统体系结构,将基本内核配置设定到较好的状态。
  72. </para>
  73. <!--para>Be sure to enable/disable/set the following features or the system might
  74. not work correctly or boot at all:</para-->
  75. <para>一定要按照以下列表启用/禁用/设定其中列出的内核特性,
  76. 否则系统可能不能正常工作,甚至根本无法引导:</para>
  77. <screen role="nodump" revision="sysv">
  78. Device Drivers ---&gt;
  79. Generic Driver Options ---&gt;
  80. [ ] Support for uevent helper [CONFIG_UEVENT_HELPER]
  81. [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS]
  82. Kernel hacking ---&gt;
  83. Choose kernel unwinder (Frame pointer unwinder) ---&gt; [CONFIG_UNWINDER_FRAME_POINTER]</screen>
  84. <screen role="nodump" revision="systemd">
  85. General setup -->
  86. [ ] Enable deprecated sysfs features to support old userspace tools [CONFIG_SYSFS_DEPRECATED]
  87. [ ] Enable deprecated sysfs features by default [CONFIG_SYSFS_DEPRECATED_V2]
  88. [*] open by fhandle syscalls [CONFIG_FHANDLE]
  89. [ ] Auditing support [CONFIG_AUDIT]
  90. [*] Control Group support [CONFIG_CGROUPS]
  91. Processor type and features ---&gt;
  92. [*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP]
  93. Networking support ---&gt;
  94. Networking options ---&gt;
  95. &lt;*&gt; The IPv6 protocol [CONFIG_IPV6]
  96. Device Drivers ---&gt;
  97. Generic Driver Options ---&gt;
  98. [ ] Support for uevent helper [CONFIG_UEVENT_HELPER]
  99. [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS]
  100. [ ] Fallback user-helper invocation for firmware loading [CONFIG_FW_LOADER_USER_HELPER]
  101. Firmware Drivers ---&gt;
  102. [*] Export DMI identification via sysfs to userspace [CONFIG_DMIID]
  103. File systems ---&gt;
  104. [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
  105. &lt;*&gt; Kernel automounter version 4 support (also supports v3) [CONFIG_AUTOFS4_FS]
  106. Pseudo filesystems ---&gt;
  107. [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]
  108. [*] Tmpfs extended attributes [CONFIG_TMPFS_XATTR]
  109. Kernel hacking ---&gt;
  110. Choose kernel unwinder (Frame pointer unwinder) ---&gt; [CONFIG_UNWINDER_FRAME_POINTER]</screen>
  111. </note>
  112. <note revision="systemd">
  113. <!--para>While "The IPv6 Protocol" is not strictly
  114. required, it is highly recommended by the systemd developers.</para-->
  115. <para>尽管 <quote>The IPv6 Protocol</quote> (IPv6 协议支持)
  116. 并不是严格要求的,但是 systemd 开发者强烈推荐启用它。</para>
  117. </note>
  118. <para revision="sysv">There are several other options that may be desired
  119. depending on the requirements for the system. For a list of options needed
  120. for BLFS packages, see the <ulink
  121. url="&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index">BLFS
  122. Index of Kernel Settings</ulink>
  123. (&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index).</para>
  124. <note>
  125. <!--para>If your host hardware is using UEFI, then the 'make defconfig'
  126. above should automatically add in some EFI-related kernel options.</para-->
  127. <para>如果您的硬件平台使用 UEFI,则 <command>make defconfig</command>
  128. 命令也会自动加入一些 EFI 相关的内核选项。</para>
  129. <!--para>In order to allow your LFS kernel to be booted from within your
  130. host's UEFI boot environment, your kernel must have this option
  131. selected:</para-->
  132. <para>为了允许从宿主系统的 UEFI 引导环境引导 LFS 内核,
  133. 您必须选择一个内核选项:</para>
  134. <screen role="nodump">Processor type and features ---&gt;
  135. [*] EFI stub support [CONFIG_EFI_STUB]</screen>
  136. <!--para>A fuller description of managing UEFI environments from within LFS
  137. is covered by the lfs-uefi.txt hint at
  138. <ulink
  139. url="http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt"/>.
  140. </para-->
  141. <para>在 LFS 中管理 UEFI 环境的较完整说明包含在 lfs-uefi.txt 中,
  142. 它位于 <ulink url="&hints-root;lfs-uefi.txt"/>。
  143. </para>
  144. </note>
  145. <note><title>译注</title>
  146. <para>lfs-uefi.txt 的内容较老,译者维护了它的一份更新版本,
  147. <ulink url="http://svn.linuxfromscratch.org/hints/trunk/lfs-uefi-20180409.txt"/>
  148. 。</para>
  149. </note>
  150. <variablelist>
  151. <title>上述配置选项的含义:</title>
  152. <varlistentry>
  153. <term><parameter>Support for uevent helper</parameter></term>
  154. <listitem>
  155. <para>如果启用了该选项,它可能干扰 Udev/Eudev 的设备管理。</para>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry>
  159. <term><parameter>Maintain a devtmpfs</parameter></term>
  160. <listitem>
  161. <!--para>This will create automated device nodes which are populated by the
  162. kernel, even without Udev running. Udev then runs on top of this,
  163. managing permissions and adding symlinks. This configuration
  164. item is required for all users of Udev/Eudev.</para-->
  165. <para>该选项会使内核自动创建设备节点,即使 Udev 没有运行。
  166. Udev 之后才在这些设备节点的基础上运行,
  167. 管理它们的访问权限并为它们建立符号链接。
  168. 所有 Udev/Eudev 用户都需要启用该选项。</para>
  169. </listitem>
  170. </varlistentry>
  171. </variablelist>
  172. <screen role="nodump"><userinput>make menuconfig</userinput></screen>
  173. <variablelist>
  174. <title>以上命令中可选的 make 环境变量及含义:</title>
  175. <varlistentry>
  176. <term><parameter>LANG=&lt;host_LANG_value&gt; LC_ALL=</parameter></term>
  177. <listitem>
  178. <!--para>This establishes the locale setting to the one used on the
  179. host. This may be needed for a proper menuconfig ncurses interface
  180. line drawing on a UTF-8 linux text console.</para>
  181. <para>If used, be sure to replace
  182. <replaceable>&lt;host_LANG_value&gt;</replaceable> by the value of
  183. the <envar>$LANG</envar> variable from your host. You can
  184. alternatively use instead the host's value of <envar>$LC_ALL</envar>
  185. or <envar>$LC_CTYPE</envar>.</para-->
  186. <para>它们根据宿主使用的 locale 建立 locale 设定。
  187. 在 UTF-8 Linux 文本终端下,有时必须这样做才能正确绘制
  188. 基于 ncurses 的配置菜单接口。</para>
  189. <para>在这种情况下,一定要将 <replaceable>&lt;host_LANG_value&gt;
  190. </replaceable> 替换成宿主环境中的 <envar>$LANG</envar>
  191. 变量值。您也可以使用宿主环境中 <envar>$LC_ALL</envar>
  192. 或 <envar>$LC_CTYPE</envar> 的值代替。</para>
  193. </listitem>
  194. </varlistentry>
  195. </variablelist>
  196. <!--para>Alternatively, <command>make oldconfig</command> may be more
  197. appropriate in some situations. See the <filename>README</filename>
  198. file for more information.</para-->
  199. <para>某些情况下,<command>make oldconfig</command> 更为合适。
  200. 阅读 <filename>README</filename> 文件了解更多信息。</para>
  201. <!--para>If desired, skip kernel configuration by copying the kernel
  202. config file, <filename>.config</filename>, from the host system
  203. (assuming it is available) to the unpacked <filename
  204. class="directory">linux-&linux-version;</filename> directory. However,
  205. we do not recommend this option. It is often better to explore all the
  206. configuration menus and create the kernel configuration from
  207. scratch.</para-->
  208. <para>如果希望的话,也可以将宿主系统的内核配置文件 <filename>.config
  209. </filename> 拷贝到解压出的
  210. <filename class="directory">linux-&linux-version;</filename>
  211. 目录(前提是可以找到该文件)。然而我们不推荐这样做,
  212. 一般来说,浏览整个配置目录,并从头创建内核配置是更好的选择。</para>
  213. <para>编译内核映像和模块:</para>
  214. <screen><userinput remap="make">make</userinput></screen>
  215. <!--para>If using kernel modules, module configuration in <filename
  216. class="directory">/etc/modprobe.d</filename> may be required.
  217. Information pertaining to modules and kernel configuration is
  218. located in <xref linkend="ch-scripts-udev"/> and in the kernel
  219. documentation in the <filename
  220. class="directory">linux-&linux-version;/Documentation</filename> directory.
  221. Also, <filename>modprobe.d(5)</filename> may be of interest.</para-->
  222. <para>如果要使用内核模块,可能需要在
  223. <filename class="directory">/etc/modprobe.d</filename>
  224. 中写入模块配置。讨论模块和内核配置的信息位于
  225. <xref linkend="ch-scripts-udev"/> 和
  226. <filename class="directory">linux-&linux-version;/Documentation
  227. </filename> 目录下的内核文档中。另外
  228. <filename>modprobe.d(5)</filename> 也可以作为参考。</para>
  229. <para>如果内核配置使用了模块,安装它们:</para>
  230. <screen><userinput remap="install">make modules_install</userinput></screen>
  231. <!--para>After kernel compilation is complete, additional steps are
  232. required to complete the installation. Some files need to be copied to
  233. the <filename class="directory">/boot</filename> directory.</para-->
  234. <para>在内核编译完成后,需要进行额外步骤完成安装,
  235. 一些文件需要拷贝到 <filename class="directory">/boot</filename>
  236. 目录中。</para>
  237. <caution>
  238. <!--para>If the host system has a separate /boot partition, the files copied
  239. below should go there. The easiest way to do that is to bind /boot on the
  240. host (outside chroot) to /mnt/lfs/boot before proceeding. As the root
  241. user in the <emphasis>host system</emphasis>:</para-->
  242. <para>如果宿主系统有单独的 /boot 分区,需要将这些文件拷贝到该分区中。
  243. 最简单的方法是将宿主系统的 /boot (在 chroot 之外)绑定到
  244. /mnt/lfs/boot 再拷贝文件,在<emphasis>宿主系统</emphasis>中,
  245. 以 root 身份执行:</para>
  246. <screen role="nodump"><userinput>mount --bind /boot /mnt/lfs/boot</userinput></screen>
  247. </caution>
  248. <!--para>The path to the kernel image may vary depending on the platform being
  249. used. The filename below can be changed to suit your taste, but the stem of
  250. the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
  251. the automatic setup of the boot process described in the next section. The
  252. following command assumes an x86 architecture:</para-->
  253. <para>指向内核映像的路径可能随机器平台的不同而变化。
  254. 下面使用的文件名可以依照您的需要改变,
  255. 但文件名的开头应该保持为 <emphasis>vmlinuz</emphasis>,
  256. 以保证和下一节描述的引导过程自动设定相兼容。
  257. 下面的命令假定是机器是 x86 体系结构:</para>
  258. <screen revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
  259. <screen revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen>
  260. <!--para><filename>System.map</filename> is a symbol file for the kernel.
  261. It maps the function entry points of every function in the kernel API,
  262. as well as the addresses of the kernel data structures for the running
  263. kernel. It is used as a resource when investigating kernel problems.
  264. Issue the following command to install the map file:</para-->
  265. <para><filename>System.map</filename> 是内核符号文件,
  266. 它将内核 API 的每个函数入口点和运行时数据结构映射到它们的地址。
  267. 它在调查分析内核出现的问题时被使用。执行以下命令安装该文件:</para>
  268. <screen><userinput remap="install">cp -iv System.map /boot/System.map-&linux-version;</userinput></screen>
  269. <!--para>The kernel configuration file <filename>.config</filename>
  270. produced by the <command>make menuconfig</command> step
  271. above contains all the configuration selections for the kernel
  272. that was just compiled. It is a good idea to keep this file for future
  273. reference:</para-->
  274. <para><command>make menuconfig</command> 生成的内核配置文件
  275. <filename>.config</filename> 包含编译好的内核的所有配置选项。
  276. 最好能将它保留下来以供日后参考:</para>
  277. <screen><userinput remap="install">cp -iv .config /boot/config-&linux-version;</userinput></screen>
  278. <para>安装 Linux 内核文档:</para>
  279. <screen><userinput remap="install">install -d /usr/share/doc/linux-&linux-version;
  280. cp -r Documentation/* /usr/share/doc/linux-&linux-version;</userinput></screen>
  281. <!--para>It is important to note that the files in the kernel source
  282. directory are not owned by <emphasis>root</emphasis>. Whenever a
  283. package is unpacked as user <emphasis>root</emphasis> (like we did
  284. inside chroot), the files have the user and group IDs of whatever
  285. they were on the packager's computer. This is usually not a problem
  286. for any other package to be installed because the source tree is
  287. removed after the installation. However, the Linux source tree is
  288. often retained for a long time. Because of this, there is a chance
  289. that whatever user ID the packager used will be assigned to somebody
  290. on the machine. That person would then have write access to the kernel
  291. source.</para-->
  292. <para>需要注意的是,在内核源代码目录中可能有不属于 <emphasis>root
  293. </emphasis> 的文件。在以 <emphasis>root</emphasis>
  294. 身份解压源代码包时(就像我们在 chroot 环境中所做的那样),
  295. 这些文件会获得它们之前在软件包创建者的计算机上的用户和组 ID。
  296. 这一般不会造成问题,因为在安装后通常会删除源代码目录树。
  297. 然而,Linux 源代码目录树一般会被保留较长时间,
  298. 这样创建者当时使用的用户 ID 就可能被分配给本机的某个用户,
  299. 导致该用户拥有内核源代码的写权限。</para>
  300. <note>
  301. <!---para>In many cases, the configuration of the kernel will need to be
  302. updated for packages that will be installed later in BLFS. Unlike
  303. other packages, it is not necessary to remove the kernel source tree
  304. after the newly built kernel is installed.</para-->
  305. <para>之后在 BLFS 中安装软件包时往往需要修改内核配置。
  306. 因此,和其他软件包不同,我们在安装好内核后可以不移除源代码树。
  307. </para>
  308. <!--para>If the kernel source tree is going to be retained, run
  309. <command>chown -R 0:0</command> on the <filename
  310. class="directory">linux-&linux-version;</filename> directory to ensure
  311. all files are owned by user <emphasis>root</emphasis>.</para-->
  312. <para>如果要保留内核源代码树,对目录 <filename class="directory">
  313. linux-&linux-version;</filename> 执行
  314. <command>chown -R 0:0</command>,以保证其中所有文件都属于
  315. <emphasis>root</emphasis>。</para>
  316. </note>
  317. <warning>
  318. <!--para>Some kernel documentation recommends creating a symlink from
  319. <filename class="symlink">/usr/src/linux</filename> pointing to the kernel
  320. source directory. This is specific to kernels prior to the 2.6 series and
  321. <emphasis>must not</emphasis> be created on an LFS system as it can cause
  322. problems for packages you may wish to build once your base LFS system is
  323. complete.</para-->
  324. <para>有的内核文档建议创建符号链接
  325. <filename class="symlink">/usr/src/linux</filename>
  326. 指向内核源代码目录,这仅仅适用于 2.6 系列之前的内核。
  327. 在 LFS 系统上<emphasis>绝对不要</emphasis>创建它,
  328. 因为在构建完基本 LFS 系统后,它可能在您构建其他软件包时引起问题。
  329. </para>
  330. </warning>
  331. <warning>
  332. <!--para>The headers in the system's <filename
  333. class="directory">include</filename> directory (<filename
  334. class="directory">/usr/include</filename>) should
  335. <emphasis>always</emphasis> be the ones against which Glibc was compiled,
  336. that is, the sanitised headers installed in <xref
  337. linkend="ch-system-linux-headers"/>. Therefore, they should
  338. <emphasis>never</emphasis> be replaced by either the raw kernel headers
  339. or any other kernel sanitized headers.</para-->
  340. <para>在系统 <filename class="directory">include</filename>
  341. 目录(即 <filename class="directory">/usr/include</filename>
  342. 中的内核头文件应该<emphasis>总是</emphasis>与构建 Glibc
  343. 时使用的内核头文件一致,即保持为
  344. <xref linkend="ch-system-linux-headers"/> 中安装的净化头文件。
  345. 换句话说,<emphasis>永远不要</emphasis>用原始内核头文件,
  346. 或其他版本内核的净化头文件替换它们。</para>
  347. </warning>
  348. </sect2>
  349. <sect2 id="conf-modprobe" role="configuration">
  350. <title>配置 Linux 内核模块加载顺序</title>
  351. <indexterm zone="conf-modprobe">
  352. <primary sortas="e-/etc/modprobe.d/usb.conf">/etc/modprobe.d/usb.conf</primary>
  353. </indexterm>
  354. <!--para>Most of the time Linux modules are loaded automatically, but
  355. sometimes it needs some specific direction. The program that loads
  356. modules, <command>modprobe</command> or <command>insmod</command>, uses
  357. <filename>/etc/modprobe.d/usb.conf</filename> for this purpose. This file
  358. needs to be created so that if the USB drivers (ehci_hcd, ohci_hcd and
  359. uhci_hcd) have been built as modules, they will be loaded in the correct
  360. order; ehci_hcd needs to be loaded prior to ohci_hcd and uhci_hcd in order
  361. to avoid a warning being output at boot time.</para-->
  362. <para>多数情况下 Linux 内核模块可以自动加载,但有时需要指定加载顺序。
  363. 负责加载内核模块的程序 <command>modprobe</command> 和
  364. <command>insmod</command> 从 <filename>/etc/modprobe.d</filename>
  365. 下的配置文件中读取加载顺序,例如,如果 USB 驱动程序
  366. (ehci_hcd、ohci_hcd 和 uhci_hcd)被构建为模块,
  367. 则必须按照先加载 echi_hcd ,再加载 ohci_hcd 和 uhci_hcd 的正确顺序,
  368. 才能避免引导时出现警告信息。</para>
  369. <para>为此,执行以下命令创建文件
  370. <filename>/etc/modprobe.d/usb.conf</filename>:</para>
  371. <screen><userinput>install -v -m755 -d /etc/modprobe.d
  372. cat &gt; /etc/modprobe.d/usb.conf &lt;&lt; "EOF"
  373. <literal># Begin /etc/modprobe.d/usb.conf
  374. install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
  375. install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
  376. # End /etc/modprobe.d/usb.conf</literal>
  377. EOF</userinput></screen>
  378. </sect2>
  379. <sect2 id="contents-kernel" role="content">
  380. <title>Linux 的内容</title>
  381. <segmentedlist>
  382. <segtitle>安装的文件</segtitle>
  383. <segtitle>安装的目录</segtitle>
  384. <seglistitem>
  385. <seg>config-&linux-version;,
  386. <phrase revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase>
  387. <phrase revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase>
  388. 以及 System.map-&linux-version;</seg>
  389. <seg>/lib/modules 和 /usr/share/doc/linux-&linux-version;</seg>
  390. </seglistitem>
  391. </segmentedlist>
  392. <variablelist>
  393. <bridgehead renderas="sect3">简要描述</bridgehead>
  394. <?dbfo list-presentation="list"?>
  395. <?dbhtml list-presentation="table"?>
  396. <varlistentry id="config">
  397. <term><filename>config-&linux-version;</filename></term>
  398. <listitem>
  399. <para>包含所有内核配置选项的值</para>
  400. <indexterm zone="ch-bootable-kernel config">
  401. <primary sortas="e-/boot/config">/boot/config-&linux-version;</primary>
  402. </indexterm>
  403. </listitem>
  404. </varlistentry>
  405. <varlistentry id="lfskernel">
  406. <term revision="sysv"><filename>vmlinuz-&linux-version;-lfs-&version;</filename></term>
  407. <term revision="systemd"><filename>vmlinuz-&linux-version;-lfs-&versiond;</filename></term>
  408. <listitem>
  409. <!--para>The engine of the Linux system. When turning on the computer,
  410. the kernel is the first part of the operating system that gets loaded.
  411. It detects and initializes all components of the computer's hardware,
  412. then makes these components available as a tree of files to the
  413. software and turns a single CPU into a multitasking machine capable
  414. of running scores of programs seemingly at the same time</para-->
  415. <para>Linux 系统的引擎,在启动计算机时,
  416. 它是操作系统中被最早加载的部分。它检测并初始化计算机硬件,
  417. 将它们以目录树的形式提供给软件,
  418. 并将单个 CPU 封装成多任务系统,
  419. 使多个用户程序看上去在同时执行。
  420. </para>
  421. <indexterm zone="ch-bootable-kernel lfskernel">
  422. <primary sortas="b-lfskernel">lfskernel-&linux-version;</primary>
  423. </indexterm>
  424. </listitem>
  425. </varlistentry>
  426. <varlistentry id="System.map">
  427. <term><filename>System.map-&linux-version;</filename></term>
  428. <listitem>
  429. <!--para>A list of addresses and symbols; it maps the entry points and
  430. addresses of all the functions and data structures in the
  431. kernel</para-->
  432. <para>地址和符号列表,将函数和数据结构映射为入口点和地址</para>
  433. <indexterm zone="ch-bootable-kernel System.map">
  434. <primary sortas="e-/boot/System.map">/boot/System.map-&linux-version;</primary>
  435. </indexterm>
  436. </listitem>
  437. </varlistentry>
  438. </variablelist>
  439. </sect2>
  440. </sect1>