diff options
author | Xin LI <delphij@FreeBSD.org> | 2006-07-08 13:01:35 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2006-07-08 13:01:35 +0000 |
commit | 0423c95f73d45be98604705ae9c44953fd840191 (patch) | |
tree | 7cc3b82cac76e6bbaa2c0934ac90aa5bf722c43e /zh_CN.GB2312/books/handbook/kernelconfig | |
parent | c3187efc61e90bcf7416a2efdd89a87d4e7cac95 (diff) |
Notes
Diffstat (limited to 'zh_CN.GB2312/books/handbook/kernelconfig')
-rw-r--r-- | zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml | 151 |
1 files changed, 45 insertions, 106 deletions
diff --git a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml index 40d6226b76..41af3e4cf7 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.164 + Original Revision: 1.167 $FreeBSD$ --> @@ -60,11 +60,7 @@ </listitem> <listitem> - <para>如何在 <filename>/dev</filename> 中创建设备节点。</para> - </listitem> - - <listitem> - <para>如何出现问题怎么办。</para> + <para>如何处理出现的问题。</para> </listitem> </itemizedlist> @@ -144,10 +140,7 @@ 而其余代码则是与机器无关的, 则所有已经或将要移植并运行 &os; 的平台上都共享这些代码。 文件目录是按照逻辑组织的, 所支持的硬件设备、 - 文件系统, 以及可选的组件通常都在它们自己的目录中。 - 5.X 版之前的 &os; 只支持 - <filename>i386</filename>、 <filename>alpha</filename> - 和 <filename>pc98</filename> 这三种硬件架构。</para> + 文件系统, 以及可选的组件通常都在它们自己的目录中。</para> <para>这一章提供的例子假定您使用 i386 架构的计算机。 如果您的情况不是这样, 只需对目录名作相应的调整即可。</para> @@ -156,8 +149,7 @@ <para>如果您的系统中 <emphasis>没有</emphasis> <filename>/usr/src/sys</filename> 这样一个目录, 则说明没有安装内核源代码。 安装它最简单的方法是通过以 root 身份运行 - <command>sysinstall</command> (对于 &os; 5.2 - 之前的版本, 则是 <command>/stand/sysinstall</command>), 选择 + <command>sysinstall</command>, 选择 <guimenuitem>Configure</guimenuitem>, 然后 <guimenuitem>Distributions</guimenuitem>, 然后 <guimenuitem>src</guimenuitem>, @@ -292,10 +284,6 @@ <para>进入编译内核的目录。 &man.config.8; 将在像上面一样显示执行它所在的目录的名字。</para> <screen>&prompt.root; <userinput>cd ../compile/<replaceable>MYKERNEL</replaceable></userinput></screen> - - <para>对于 &os; 5.0 以及更早的版本, 使用下面的形式:</para> - - <screen>&prompt.root; <userinput>cd ../../compile/<replaceable>MYKERNEL</replaceable></userinput></screen> </step> <step> @@ -381,10 +369,8 @@ <author> <firstname>Joel</firstname> <surname>Dahl</surname> - <contrib>Updated for &os; 5.X by </contrib> - <!-- August 2004, PR docs/70674 --> + <contrib>Updated for &os; 6.X by </contrib> </author> - <!-- <editor><othername role="freefall login">ceri</othername></editor> --> </authorgroup> </sect1info> <title>配置文件</title> @@ -405,7 +391,8 @@ 接下来几节, 将以 <filename>GENERIC</filename> 中的顺序介绍所有关键字。 <anchor id="kernelconfig-options"> 如果需要与平台有关的选项和设备的详细列表, - 请参考与 <filename>GENERIC</filename> 在同一个目录中的那个<filename>NOTES</filename>, + 请参考与 <filename>GENERIC</filename> 文件在同一个目录中的那个 + <filename>NOTES</filename>, 而平台无关的选项, 则可以在 <filename>/usr/src/sys/conf/NOTES</filename> 找到。</para> @@ -459,33 +446,6 @@ cpu I686_CPU</programlisting> <indexterm> <primary>内核选项</primary> - <secondary>cpu类型</secondary> - </indexterm> - <para>在&os;的内核里面仍然支持<literal>I386_CPU</literal>,但是在-STABLE和 - -CURRENT里面缺省已经被禁用了。这就意味着安装&os;在386-class的cpu, - 一般有下面几种情况:</para> - - <itemizedlist> - <listitem> - <para>安装一个老的&os; release并且按照<xref linkend="kernelconfig-building">从源码重建系统.</para> - </listitem> - - <listitem> - <para>在一个新的机器上构建用户和内核程序,然后用已经编译好的<filename>/usr/obj</filename>下的文件 - 安装到386的机器上(详细情况看<xref linkend="small-lan">)。</para> - </listitem> - - <listitem> - <para>定制您自己的 &os; 发行版本, 其中的安装光盘包含 - <literal>I386_CPU</literal> 支持。</para> - </listitem> - </itemizedlist> - - <para>第一种情况可能是最容易的, 但您需要大量的磁盘空间, - 而 386-级别拥有这种配置的计算机可能很难找到。</para> - - <indexterm> - <primary>内核选项</primary> <secondary>ident</secondary> </indexterm> @@ -511,27 +471,23 @@ cpu I686_CPU</programlisting> <!-- XXX: Add a comment here that explains when compiling hints into the kernel is a good idea and why. --> - <programlisting>#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols</programlisting> - - <para>一般的 &os; 构建过程并不包括调试信息, - 在构建内核时, 绝大多数符号会在最终的内核连接之后剔除出去, - 以节省安装时所需的空间。 如果您打算测试 -CURRENT 分支的内核, - 或开发您自己的 &os; 内核功能, 则可能会需要去掉这一行的注释。 - 这将启用 <option>-g</option> 选项, 它会在 &man.gcc.1; - 中打开调试信息。 如果您使用 <quote>传统</quote> - 方法来构建内核, 也可以通过 &man.config.8; 的 - <option>-g</option> 选项来达到同样的目的 - (参见 <xref linkend="kernelconfig-building"> + <programlisting>makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols</programlisting> + + <para>一般的 &os; 联编过程, 在所联编的内核指定了 <option>-g</option> 选项时, + 由于此选项将传递给 &man.gcc.1; 表示加入调试信息, + 因此会将调试符号也包含进来。 如果您使用 <quote>旧式的</quote> + 方法来联编内核, 通过使用 &man.config.8; 的 <option>-g</option> 选项, + 也可以达到类似的目的。 (参见 <xref linkend="kernelconfig-building"> 了解进一步的信息)。</para> <programlisting>options SCHED_4BSD # 4BSD scheduler</programlisting> - <para>这是 &os; 的传统调度器。 取决于您系统的工作负荷, - 使用新的 ULE 调度器通常可以获得更好的性能。 它是专门为 - &os; 在 SMP 上运行而设计的调度器, 但在 UP - 系统上也能工作得很好。 如果您想试验这个功能, - 则应把配置文件中的 <literal>SCHED_4BSD</literal> - 改为 <literal>SCHED_ULE</literal>。</para> + <para>这是 &os; 传统上使用的默认系统调度器。 请保留此选项。</para> + + <programlisting>options PREEMPTION # Enable kernel thread preemption</programlisting> + + <para>允许内核线程根据优先级的抢占调度。 这有助于改善交互性, + 并可以让中断线程更早地执行, 而无须等待。</para> <programlisting>options INET # InterNETworking</programlisting> @@ -558,8 +514,7 @@ cpu I686_CPU</programlisting> <programlisting>options UFS_ACL # Support for access control lists</programlisting> - <para>这个选项只能在 &os; 5.X 和更高版本中使用, - 它将启用内核中的访问控制表的支持。 + <para>这个选项将启用内核中的访问控制表的支持。 这依赖于扩展属性以及 <acronym>UFS2</acronym>, 以及在 <xref linkend="fs-acl"> 中所介绍的那些特性。 <acronym>ACL</acronym> 默认是启用的, @@ -613,20 +568,21 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra 驱动器或很少挂接光盘数据 (因为在首次使用数据 CD 时会自动加载), 就可以把它注释掉。 音乐 CD 并不需要这个选项。</para> - <programlisting>options PROCFS # Process filesystem</programlisting> + <programlisting>options PROCFS # Process filesystem (requires PSEUDOFS)</programlisting> <para>进程文件系统。 这是一个挂接在 <filename>/proc</filename> 的一个 <quote>假扮的</quote> 文件系统, 其作用是允许类似 &man.ps.1; 这样的程序给出正在运行的进程的进一步信息。 多数情况下, 并不需要使用 <literal>PROCFS</literal>, 因为绝大多数调试和监控工具, 已经进行了一系列修改, 使之不再依赖 - <literal>PROCFS</literal>: 默认安装的系统中并不会挂接这一文件系统。 - 此外, 在 6.X-STABLE 内核中, - 如果希望使用 <literal>PROCFS</literal>, - 就必须加入 <literal>PSEUDOFS</literal> 的支持:</para> + <literal>PROCFS</literal>: 默认安装的系统中并不会挂接这一文件系统。</para> <programlisting>options PSEUDOFS # Pseudo-filesystem framework</programlisting> + <para>在 6.X 内核中, + 如果希望使用 <literal>PROCFS</literal>, + 就必须加入 <literal>PSEUDOFS</literal> 的支持。</para> + <programlisting>options GEOM_GPT # GUID Partition Tables.</programlisting> <para>这个选项提供了在磁盘上使用大量的分区的能力。</para> @@ -642,19 +598,18 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra 最好在所有的&i386;和Alpha systems下打开这个选项,因为可能要运行老应用程序。 在5.X才开始支持的平台,比如ia64和&sparc64;,就不需要这个选项。</para> - <programlisting>options SCSI_DELAY=15000 # Delay (in ms) before probing SCSI</programlisting> + <programlisting>options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI</programlisting> - <para>这将让内核在探测每个 SCSI 设备之前等待 15 秒。 - 如果您只有 IDE 硬盘驱动器, 则可以不管它, - 反之您可能会想降低这个数值, 可能减少到 5 秒, - 以加速启动过程。 当然, 如果您这么做之后 + <para>这将让内核在探测每个 SCSI 设备之前等待 5 秒。 + 如果您只有 IDE 硬盘驱动器, 就可以不管它, + 反之您可能会希望尝试降低这个数值以加速启动过程。 + 当然, 如果您这么做之后 &os; 在识别您的 SCSI 设备时遇到问题, 则您还需要再把它改回去。</para> <programlisting>options KTRACE # ktrace(1) support</programlisting> - <para>这个选项打开内核进程跟踪,在调试时很有用。 - </para> + <para>这个选项打开内核进程跟踪,在调试时很有用。</para> <programlisting>options SYSVSHM # SYSV-style shared memory</programlisting> @@ -714,14 +669,6 @@ options AHD_REG_PRETTY_PRINT # Print register bitfields in debug apic 设备可以被 UP 和 SMP 内核使用, 但 SMP 内核必须使用它。 要支持多处理器, 还需要加上 <literal>options SMP</literal>。</para> - <programlisting>device isa</programlisting> - - <para>所有为 &os; 所支持的 PC 都需要这个设置, - 即使没有 ISA 插槽也是一样。 如果您使用 - IBM PS/2 (微通道架构) 的计算机, &os; 目前只能提供有限的支持。 - 要了解关于 MCA 支持的详情, 请参考 - <filename>/usr/src/sys/i386/conf/NOTES</filename>。</para> - <programlisting>device eisa</programlisting> <para>如果您的主机板上有EISA总线,加入这个设置。使用这个选项可以自动扫描并设置所有连接在EISA总线上的设备。</para> @@ -775,6 +722,7 @@ device ahc # AHA2940 and onboard AIC7xxx devices device ahd # AHA39320/29320 and onboard AIC79xx devices device amd # AMD 53C974 (Teckram DC-390(T)) device isp # Qlogic family +#device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets) @@ -817,6 +765,7 @@ device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID device ciss # Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x +device rr232x # Highpoint RocketRAID 232x device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID @@ -826,6 +775,7 @@ device twa # 3ware 9000 series PATA/SATA RAID device aac # Adaptec FSA RAID device aacp # SCSI passthrough for aac (requires CAM) device ida # Compaq Smart RAID +device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID</programlisting> @@ -849,11 +799,15 @@ device atkbdc # AT keyboard controller</programlisting> <para>如果您的鼠标连接到PS/2鼠标端口,就使用这个设备驱动程序。</para> + <programlisting>device kbdmux # keyboard multiplexer</programlisting> + + <para>针对键盘多路选择器的基本支持。</para> + <programlisting>device vga # VGA video card driver</programlisting> <para>显卡驱动。</para> - <programlisting># splash screen/screen saver + <programlisting> device splash # Splash screen and screen saver support</programlisting> <para>启动时的 splash 画面! 屏幕保护程序也需要这一选项。</para> @@ -891,14 +845,6 @@ 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> @@ -999,12 +945,14 @@ device miibus # MII bus support</programlisting> <para>MII总线支持对于一些PCI 10/100 Ethernet NIC来说是必需的。 </para> - <programlisting>device bfe # Broadcom BCM440x 10/100 Ethernet + <programlisting>device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet +device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device lge # Level 1 LXT1001 gigabit ethernet device nge # NatSemi DP83820 gigabit ethernet +device nve # nVidia nForce MCP on-board Ethernet Networking device pcn # AMD Am79C97x PCI 10/100 (precedence over 'lnc') device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 @@ -1045,6 +993,7 @@ device xe # Xircom pccard Ethernet device wlan # 802.11 support device an # Aironet 4500/4800 802.11 wireless NICs. device awi # BayStack 660 and others +device ral # Ralink Technology RT2500 wireless NICs. device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. #device wl # Older non 802.11 Wavelan wireless NIC.</programlisting> @@ -1058,16 +1007,6 @@ device loop # Network loopback</programlisting> role="ipaddr">127.0.0.1</hostid>) 则将通过这个设备回到本机。 这个设备是 <emphasis>必需的</emphasis>。</para> - <programlisting>device mem # Memory and kernel memory devices</programlisting> - - <para>The system memory devices.</para> - - <programlisting>device io # I/O device</programlisting> - - <para>This option allows a process to gain I/O privileges. This is - useful in order to write userland programs that can handle hardware - directly. This is required to run the X Window system.</para> - <programlisting>device random # Entropy device</programlisting> <para>Cryptographically secure random number generator.</para> |