diff options
author | Xin LI <delphij@FreeBSD.org> | 2006-03-15 19:38:56 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2006-03-15 19:38:56 +0000 |
commit | b99e83b0a7c48690c2e6b7699bbd549e9a2c8da1 (patch) | |
tree | 61578f2c24f19d8d92ac0907829272ba8ae92e3e /zh_CN.GB2312/books/handbook/kernelconfig | |
parent | f266a6a31f7f22bbb73de28eccf694ca3317afaa (diff) |
Notes
Diffstat (limited to 'zh_CN.GB2312/books/handbook/kernelconfig')
-rw-r--r-- | zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml | 95 |
1 files changed, 38 insertions, 57 deletions
diff --git a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml index 1e4c7bec4a..0007366821 100644 --- a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml @@ -2,7 +2,7 @@ The FreeBSD Documentation Project The FreeBSD Chinese Documentation Project - Original Revision: 1.158 + Original Revision: 1.163 $FreeBSD$ --> @@ -108,7 +108,7 @@ <para>使用更少的内存。 定制的内核通常会比 <filename>GENERIC</filename> 内核使用更少的内存, 由于内核必须时刻处于物理内存中, 因此这就显得更加重要。 - 给予这样的原因, 对于内存较小的系统来说, + 基于这样的原因, 对于内存较小的系统来说, 定制内核将发挥更大的作用。</para> </listitem> @@ -347,12 +347,18 @@ 如果您只安装了内核的源代码, 就只能使用前面所介绍的传统方法了。</para> </note> - <note> - <para>在 &os; 4.2 和更早的版本中, 应把前面的 - <literal>KERNCONF=</literal> 替换为 <literal>KERNEL=</literal>。 - 2001 年 2 月 2 日 之前的 4.2-STABLE - 不能识别 <literal>KERNCONF=</literal>。</para> - </note> + <tip> + <para>默认情况下, 在联编您所定制的内核时, + <emphasis>全部</emphasis> 内核模块也会同时参与构建。 + 如果您希望更快地升级内核, 或者只希望联编您所需要的模块, + 则应在联编之前编辑 <filename>/etc/make.conf</filename>:</para> + + <programlisting>MODULES_OVERRIDE = linux acpi sound/sound sound/driver/ds1 ntfs</programlisting> + + <para>这个变量的内容是所希望构建的模块列表。 + 如果希望了解更多与构建内核有关的变量, 请参见 &man.make.conf.5; + 联机手册。</para> + </tip> <indexterm> <primary><filename class="directory">/boot/kernel.old</filename></primary> @@ -423,10 +429,8 @@ 每一行都包括一个关键词, 以及一个或多个参数。 实际上, 绝大多数行都只包括一个参数。 在 <literal>#</literal> 之后的内容会被认为是注释而忽略掉。 - 下面的每个小节,将依次介绍每个列在 - <filename>GENERIC</filename> 中的选项, - 当然, 一些相关的关键词 (如网络) 将被放在一起, - 尽管在 <filename>GENERIC</filename> 中可能分散在各处。 <anchor + 接下来几节, 将以 <filename>GENERIC</filename> 中的顺序介绍所有关键字。 + <anchor id="kernelconfig-options"> 如果需要与平台有关的选项和设备的详细列表, 请参考与 <filename>GENERIC</filename> 在同一个目录中的那个<filename>NOTES</filename>, 而平台无关的选项, 则可以在 @@ -435,7 +439,7 @@ <note> <para><filename>NOTES</filename> 在 &os; 4.X 中并不存在。 - 与此相反, 请参考 <filename>LINT</filename> 文件来获得关于 + 作为替代, 请参考 <filename>LINT</filename> 文件来获得关于 <filename>GENERIC</filename> 中的选项和设备详细介绍。 <filename>LINT</filename> 在 4.X 中完成了两项使命: 为构建定制内核提供可选的选项, 以及提供尽可能多的调整为非默认值的选项。 @@ -453,7 +457,7 @@ <para>在 &os; 5.X 和以后的版本中您仍然可以通过下面的命令生成 <filename>LINT</filename> 文件:</para> - <screen>&prompt.root; <userinput>cd /usr/src/sys/<replaceable>i386</replaceable>/conf && make LINT</userinput></screen> + <screen>&prompt.root; <userinput>cd /usr/src/sys/<replaceable>i386</replaceable>/conf && make LINT</userinput></screen> </note> <indexterm> @@ -467,27 +471,6 @@ <filename>/usr/src/sys/<replaceable>i386</replaceable>/conf/GENERIC</filename> 非常接近。</para> - <programlisting># -# GENERIC -- Generic kernel configuration file for &os;/i386 -# -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: -# -# http://www.&os;.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html -# -# The handbook is also available locally in /usr/share/doc/handbook -# if you've installed the doc distribution, otherwise always see the -# &os; World Wide Web server (http://www.FreeBSD.org/) for the -# latest information. -# -# An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first -# in NOTES. -# -# $FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.413 2004/08/11 01:34:18 rwatson Exp $</programlisting> - - <para>下面这个选项在<emphasis>每个</emphasis>中都要有:</para> <indexterm> <primary>内核选项</primary> <secondary>机器</secondary> @@ -558,26 +541,6 @@ cpu I686_CPU</programlisting> <literal>ident</literal> 后面的字符串在启动内核时会显示出来, 因此如果希望能够容易区分常用的内核和刚刚定制的内核, 就应该采取不同的名字 (例如, 您想定制一个试验性的内核)。</para> - - <programlisting># Floating point support - do not disable. -device npx</programlisting> - - <para><literal>npx</literal> 是 &os; 中浮点运算单元的接口, - 用于支持硬件的浮点运算协处理器, 以及软件仿真程序。 - 这个设置 <emphasis>不是</emphasis> - 可有可无的。</para> - - <programlisting># Pseudo devices -device loop # Network loopback</programlisting> - - <para>这是 TCP/IP 的通用回环设备。 如果您 telnet - 或 FTP 到 <hostid>localhost</hostid> (也就是 <hostid - role="ipaddr">127.0.0.1</hostid>) 则将通过这个设备回到本机。 - 这个设备是 <emphasis>必需的</emphasis>。 在 - &os; 4.X 中, 则应使用 <literal>pseudo-device - loop</literal>。</para> - - <para>接下来的那些项有一个或多个选项,关于每个选项的更多的信息参考下面注释。</para> <programlisting>#To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices.</programlisting> @@ -976,6 +939,14 @@ device sc</programlisting> <para>如果您的机器使用 AGP 卡, 请把上面一行加入配置。 这将启用 AGP, 以及某些卡上的 AGP GART 支持。</para> + <programlisting># Floating point support - do not disable. +device npx</programlisting> + + <para><literal>npx</literal> 是 &os; 中浮点运算单元的接口, + 用于支持硬件的浮点运算协处理器, 以及软件仿真程序。 + 这个设置 <emphasis>不是</emphasis> + 可有可无的。</para> + <indexterm> <primary>APM</primary> </indexterm> @@ -1087,7 +1058,7 @@ device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (<quote>Starfire</quote>) device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) device ti # Alteon Networks Tigon I/II gigabit Ethernet device tl # Texas Instruments ThunderLAN @@ -1125,7 +1096,17 @@ device awi # BayStack 660 and others device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. #device wl # Older non 802.11 Wavelan wireless NIC.</programlisting> - <para>Support for various wireless cards.</para> + <para>用以支持多种无线网卡。</para> + + <programlisting># Pseudo devices +device loop # Network loopback</programlisting> + + <para>这是 TCP/IP 的通用回环设备。 如果您 telnet + 或 FTP 到 <hostid>localhost</hostid> (也就是 <hostid + role="ipaddr">127.0.0.1</hostid>) 则将通过这个设备回到本机。 + 这个设备是 <emphasis>必需的</emphasis>。 在 + &os; 4.X 中, 则应使用 <literal>pseudo-device + loop</literal>。</para> <programlisting>device mem # Memory and kernel memory devices</programlisting> |