📄 kernelconfig-config.html
字号:
by which driver.</p><pre class="PROGRAMLISTING"># Wireless NIC cardsdevice wlan # 802.11 supportdevice an # Aironet 4500/4800 802.11 wireless NICs.device awi # BayStack 660 and othersdevice wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.#device wl # Older non 802.11 Wavelan wireless NIC.</pre><p>Support for various wireless cards.</p><pre class="PROGRAMLISTING">device mem # Memory and kernel memory devices</pre><p>The system memory devices.</p><pre class="PROGRAMLISTING">device io # I/O device</pre><p>This option allows a process to gain I/O privileges. This is useful in order to writeuserland programs that can handle hardware directly. This is required to run the X Windowsystem.</p><pre class="PROGRAMLISTING">device random # Entropy device</pre><p>Cryptographically secure random number generator.</p><pre class="PROGRAMLISTING">device ether # Ethernet support</pre><p><var class="LITERAL">ether</var> is only needed if you have an Ethernet card. Itincludes generic Ethernet protocol code. Under FreeBSD 4.X use the line <varclass="LITERAL">pseudo-device ether</var>.</p><pre class="PROGRAMLISTING">device sl # Kernel SLIP</pre><p><var class="LITERAL">sl</var> is for SLIP support. This has been almost entirelysupplanted by PPP, which is easier to set up, better suited for modem-to-modemconnection, and more powerful. With FreeBSD 4.X use the line <varclass="LITERAL">pseudo-device sl</var>.</p><pre class="PROGRAMLISTING">device ppp # Kernel PPP</pre><p>This is for kernel PPP support for dial-up connections. There is also a version of PPPimplemented as a userland application that uses <var class="LITERAL">tun</var> and offersmore flexibility and features such as demand dialing. With FreeBSD 4.X use the line<var class="LITERAL">pseudo-device ppp</var>.</p><pre class="PROGRAMLISTING">device tun # Packet tunnel.</pre><p>This is used by the userland PPP software. See the <a href="userppp.html">PPP</a>section of this book for more information. With FreeBSD 4.X use the line <varclass="LITERAL">pseudo-device tun</var>.</p><pre class="PROGRAMLISTING"><a id="KERNELCONFIG-PTYS" name="KERNELCONFIG-PTYS"></a>device pty # Pseudo-ttys (telnet etc)</pre><p>This is a ``pseudo-terminal'' or simulated login port. It is used by incoming <ttclass="COMMAND">telnet</tt> and <tt class="COMMAND">rlogin</tt> sessions, <bclass="APPLICATION">xterm</b>, and some other applications such as <bclass="APPLICATION">Emacs</b>.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> Under FreeBSD 4.X, you have to use the line <varclass="LITERAL">pseudo-device pty <var class="REPLACEABLE">number</var></var>. The <varclass="REPLACEABLE">number</var> after <var class="LITERAL">pty</var> indicates thenumber of <var class="LITERAL">pty</var>s to create. If you need more than the default of16 simultaneous <b class="APPLICATION">xterm</b> windows and/or remote logins, be sure toincrease this number accordingly, up to a maximum of 256.</p></blockquote></div><pre class="PROGRAMLISTING">device md # Memory ``disks''</pre><p>Memory disk pseudo-devices. With FreeBSD 4.X use the line <varclass="LITERAL">pseudo-device md</var>.</p><pre class="PROGRAMLISTING">device gif # IPv6 and IPv4 tunneling</pre><p>This implements IPv6 over IPv4 tunneling, IPv4 over IPv6 tunneling, IPv4 over IPv4tunneling, and IPv6 over IPv6 tunneling. Beginning with FreeBSD 4.4 the <varclass="LITERAL">gif</var> device is ``auto-cloning'', and you should use the line <varclass="LITERAL">pseudo-device gif</var>. Earlier versions of FreeBSD 4.X require anumber, for example <var class="LITERAL">pseudo-device gif 4</var>.</p><pre class="PROGRAMLISTING">device faith # IPv6-to-IPv4 relaying (translation)</pre><p>This pseudo-device captures packets that are sent to it and diverts them to theIPv4/IPv6 translation daemon. With FreeBSD 4.X use the line <varclass="LITERAL">pseudo-device faith 1</var>.</p><pre class="PROGRAMLISTING"># The `bpf' device enables the Berkeley Packet Filter.# Be aware of the administrative consequences of enabling this!device bpf # Berkeley packet filter</pre><p>This is the Berkeley Packet Filter. This pseudo-device allows network interfaces to beplaced in promiscuous mode, capturing every packet on a broadcast network (e.g., anEthernet). These packets can be captured to disk and or examined with the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=tcpdump&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">tcpdump</span>(1)</span></a> program.With FreeBSD 4.X use the line <var class="LITERAL">pseudo-device bpf</var>.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> The <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=bpf&sektion=4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">bpf</span>(4)</span></a> device is alsoused by <a href="http://www.FreeBSD.org/cgi/man.cgi?query=dhclient&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">dhclient</span>(8)</span></a> to obtainthe IP address of the default router (gateway) and so on. If you use DHCP, leave thisuncommented.</p></blockquote></div><pre class="PROGRAMLISTING"># USB support#device uhci # UHCI PCI->USB interface#device ohci # OHCI PCI->USB interfacedevice usb # USB Bus (required)#device udbp # USB Double Bulk Pipe devicesdevice ugen # Genericdevice uhid # ``Human Interface Devices''device ukbd # Keyboarddevice ulpt # Printerdevice umass # Disks/Mass storage - Requires scbus and dadevice ums # Mousedevice urio # Diamond Rio 500 MP3 playerdevice uscanner # Scanners# USB Ethernet, requires miidevice aue # ADMtek USB Ethernetdevice axe # ASIX Electronics USB Ethernetdevice cue # CATC USB Ethernetdevice kue # Kawasaki LSI USB Ethernetdevice rue # RealTek RTL8150 USB Ethernet</pre><p>Support for various USB devices.</p><pre class="PROGRAMLISTING"># FireWire supportdevice firewire # FireWire bus codedevice sbp # SCSI over FireWire (Requires scbus and da)device fwe # Ethernet over FireWire (non-standard!)</pre><p>Support for various Firewire devices.</p><p>For more information and additional devices supported by FreeBSD, see <ttclass="FILENAME">/usr/src/sys/<var class="REPLACEABLE">i386</var>/conf/NOTES</tt>.</p><div class="SECT2"><h2 class="SECT2"><a id="AEN10012" name="AEN10012">8.4.1 Large Memory Configurations(<acronym class="ACRONYM">PAE</acronym>)</a></h2><p>Large memory configuration machines require access to more than the 4 gigabyte limiton User+Kernel Virtual Address (<acronym class="ACRONYM">KVA</acronym>) space. Due tothis limitation, Intel added support for 36-bit physical address space access in the<span class="TRADEMARK">Pentium</span>® Pro and later line of CPUs.</p><p>The Physical Address Extension (<acronym class="ACRONYM">PAE</acronym>) capability ofthe <span class="TRADEMARK">Intel</span>® <span class="TRADEMARK">Pentium</span> Proand later CPUs allows memory configurations of up to 64 gigabytes. FreeBSD providessupport for this capability via the <var class="OPTION">PAE</var> kernel configurationoption, available in the 4.X series of FreeBSD beginning with 4.9-RELEASE and in the 5.Xseries of FreeBSD beginning with 5.1-RELEASE. Due to the limitations of the Intel memoryarchitecture, no distinction is made for memory above or below 4 gigabytes. Memoryallocated above 4 gigabytes is simply added to the pool of available memory.</p><p>To enable <acronym class="ACRONYM">PAE</acronym> support in the kernel, simply add thefollowing line to your kernel configuration file:</p><pre class="PROGRAMLISTING">options PAE</pre><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> The <acronym class="ACRONYM">PAE</acronym> support in FreeBSD is onlyavailable for <span class="TRADEMARK">Intel</span> IA-32 processors. It should also benoted, that the <acronym class="ACRONYM">PAE</acronym> support in FreeBSD has notreceived wide testing, and should be considered beta quality compared to other stablefeatures of FreeBSD.</p></blockquote></div><p><acronym class="ACRONYM">PAE</acronym> support in FreeBSD has a few limitations:</p><ul><li><p>A process is not able to access more than 4 gigabytes of VM space.</p></li><li><p><acronym class="ACRONYM">KLD</acronym> modules cannot be loaded into a <acronymclass="ACRONYM">PAE</acronym> enabled kernel, due to the differences in the buildframework of a module and the kernel.</p></li><li><p>Device drivers that do not use the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=bus_dma&sektion=9"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">bus_dma</span>(9)</span></a> interfacewill cause data corruption in a <acronym class="ACRONYM">PAE</acronym> enabled kernel andare not recommended for use. For this reason, the <tt class="FILENAME">PAE</tt> kernelconfiguration file is provided in FreeBSD 5.X, which excludes all drivers not known towork in a <acronym class="ACRONYM">PAE</acronym> enabled kernel.</p></li><li><p>Some system tunables determine memory resource usage by the amount of availablephysical memory. Such tunables can unnecessarily over-allocate due to the large memorynature of a <acronym class="ACRONYM">PAE</acronym> system. One such example is the <varclass="OPTION">kern.maxvnodes</var> sysctl, which controls the maximum number of vnodesallowed in the kernel. It is advised to adjust this and other such tunables to areasonable value.</p></li><li><p>It might be necessary to increase the kernel virtual address (<acronymclass="ACRONYM">KVA</acronym>) space or to reduce the amount of specific kernel resourcethat is heavily used (see above) in order to avoid <acronym class="ACRONYM">KVA</acronym>exhaustion. The <var class="OPTION">KVA_PAGES</var> kernel option can be used forincreasing the <acronym class="ACRONYM">KVA</acronym> space.</p></li></ul><p>For performance and stability concerns, it is advised to consult the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=tuning&sektion=7"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">tuning</span>(7)</span></a> manual page.The <a href="http://www.FreeBSD.org/cgi/man.cgi?query=pae&sektion=4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pae</span>(4)</span></a> manual pagecontains up-to-date information on FreeBSD's <acronym class="ACRONYM">PAE</acronym>support.</p></div></div><h3 class="FOOTNOTES">Notes</h3><table border="0" class="FOOTNOTES" width="100%"><tr><td align="LEFT" valign="TOP" width="5%"><a id="FTN.AEN9627" name="FTN.AEN9627"href="kernelconfig-config.html#AEN9627"><span class="footnote">[1]</span></a></td><td align="LEFT" valign="TOP" width="95%"><p>The auto-tuning algorithm sets <var class="LITERAL">maxusers</var> equal to the amountof memory in the system, with a minimum of 32, and a maximum of 384.</p></td></tr></table><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="kernelconfig-building.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="kernelconfig-nodes.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Building and Installing a Custom Kernel</td><td width="34%" align="center" valign="top"><a href="kernelconfig.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Making Device Nodes</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -