Merge the following from the English version:

1.172 -> 1.182	doc/ja_JP.eucJP/books/handbook/kernelconfig/chapter.sgml

Reference:    [doc-jp-work 2205]
This commit is contained in:
Ryusuke SUZUKI 2011-09-02 09:13:51 +00:00
parent b43cbf01ba
commit 6d89bb8e79
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=37629

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Japanese Documentation Project
Original revision: 1.172
Original revision: 1.182
$FreeBSD$
-->
@ -139,6 +139,89 @@
</itemizedlist>
</sect1>
<sect1 id="kernelconfig-devices">
<sect1info>
<authorgroup>
<author>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
<contrib>寄稿: </contrib>
</author>
</authorgroup>
</sect1info>
<title>システムのハードウェアについて知る</title>
<para>カーネルコンフィグレーションの冒険を始める前に、
コンピュータのハードウェア一覧を作成すると良いでしょう。
もし、&os; 以外のオペレーティングシステムがすでにインストールされているのであれば、
現在インストールされているオペレーティングシステムの設定を調べることで、
簡単に一覧を作成できます。
たとえば、&microsoft; の
<application>デバイスマネージャ</application>
は、インストールされているデバイスに関する重要な情報を持っています。
<application>デバイスマネージャ</application> は、
コントロールパネルから開くことが出来ます。</para>
<note>
<para>&microsoft.windows; のバージョンによっては、
<application>デバイスマネージャ</application>
にアクセス可能なウィンドウを表示する
<application>システム</application> アイコンがあります。</para>
</note>
<para>もし他のオペレーティングシステムがコンピュータにインストールされていないのであれば、
管理者はこれらの情報を手動で収集する必要があります。
ひとつの方法が、&man.dmesg.8; ユーティリティおよび
&man.man.1; コマンドを用いる方法です。
&os; のほとんどのデバイスドライバにはマニュアルページが用意され、
対応しているハードウェアの一覧を提供しています。
また、起動時には検出されたハードウェアの一覧が表示されます。
たとえば、以下の行は、<devicename>psm</devicename>
ドライバがマウスを検出したことを示しています。</para>
<programlisting>psm0: &lt;PS/2 Mouse&gt; irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model Generic PS/2 mouse, device ID 0</programlisting>
<para>このドライバがカスタムカーネルコンフィグレーションファイルに含まれている、
もしくは &man.loader.conf.5; によって読み込まれる必要があります。</para>
<para>場合によっては、<command>dmesg</command> が起動時の検出結果ではなく、
システムメッセージだけを表示することがあります。
このような場合には、<filename>/var/run/dmesg.boot</filename>
ファイルを見ることで、出力を確認できます。</para>
<para>ハードウェアを見つけるためのもうひとつの方法は、
より冗長な出力を行う &man.pciconf.8; ユーティリティを用いる方法です。
たとえば、以下のようになります。</para>
<programlisting>ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00
vendor = 'Atheros Communications Inc.'
device = 'AR5212 Atheros AR5212 802.11abg wireless'
class = network
subclass = ethernet</programlisting>
<para><command>pciconf <option>-lv</option></command> を用いて得られるこの出力は、
<devicename>ath</devicename>
ドライバがワイヤレスイーサネットデバイスにあることを示しています。
<command>man <replaceable>ath</replaceable></command> を実行すると
&man.ath.4; のマニュアルページが表示されます。</para>
<para>&man.man.1; を <option>-k</option> フラグで実行すると、
有用な情報を得ることができます。上のケースでは以下のようになります。</para>
<screen>&prompt.root; man -k <replaceable>Atheros</replaceable></screen>
<para>ある特定の単語を含むマニュアルページの一覧が表示されます。</para>
<programlisting>ath(4) - Atheros IEEE 802.11 wireless network driver
ath_hal(4) - Atheros Hardware Access Layer (HAL)</programlisting>
<para>ハードウェアの一覧を作っておくと、
カスタムカーネルを構築する過程でたじろがずにすむでしょう。</para>
</sect1>
<sect1 id="kernelconfig-building">
<title>カスタムカーネルの構築とインストール</title>
<indexterm>
@ -208,12 +291,13 @@
コピーしてください。たとえば次のようにします。</para>
<screen>&prompt.root; <userinput>cd /usr/src/sys/<replaceable>i386</replaceable>/conf</userinput>
&prompt.root; <userinput>cp GENERIC MYKERNEL</userinput></screen>
&prompt.root; <userinput>cp GENERIC <replaceable>MYKERNEL</replaceable></userinput></screen>
<para>慣習として、この名前はすべて大文字でつづられます。もし、
いくつかの異なるハードウェアの &os; マシンを扱うなら、
この名前にホスト名を含めるとよいでしょう。ここでは、例として
<filename>MYKERNEL</filename> と呼ぶことにします。</para>
<filename><replaceable>MYKERNEL</replaceable></filename>
と呼ぶことにします。</para>
<tip>
<para>カーネルコンフィグレーションファイルを、直に
@ -238,7 +322,7 @@
&prompt.root; <userinput>ln -s /root/kernels/<replaceable>MYKERNEL</replaceable></userinput></screen>
</tip>
<para>では、<filename>MYKERNEL</filename>
<para>では、<filename><replaceable>MYKERNEL</replaceable></filename>
をあなたの好きなエディタで編集してください。もし、
システムをインストールしたばかりならば、利用できるエディタは
<application>vi</application>
@ -316,7 +400,11 @@
<programlisting>MODULES_OVERRIDE = linux acpi sound/sound sound/driver/ds1 ntfs</programlisting>
<para>この変数は、すべてのモジュールのかわりに構築するモジュールの一覧を設定します。
<para>この変数は、すべてのモジュールのかわりに構築するモジュールの一覧を設定します。</para>
<programlisting>WITHOUT_MODULES = linux acpi sound/sound sound/driver/ds1 ntfs</programlisting>
<para>この変数は、構築しないモジュールの一覧を設定します。
カーネルの構築のプロセスに関する、他の有益な変数については、
&man.make.conf.5; を参照してください。</para>
</tip>
@ -442,7 +530,7 @@ cpu I686_CPU</programlisting>
<para>ここはカーネルの識別名を書きます。
あなたがカーネルに付けたい名前に書き換えて下さい
(前記の例の <literal>MYKERNEL</literal> のように)。
(前記の例の <literal><replaceable>MYKERNEL</replaceable></literal> のように)。
<literal>ident</literal> に書いた名前はカーネルを起動する時に
表示されるので、
普段使っているカーネルと区別したいときは、
@ -615,6 +703,12 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
5.X でのみサポートされている ia64 や &sparc64; といったプラットフォームでは、
このオプションは必要ありません。</para>
<programlisting>options COMPAT_FREEBSD5 # Compatible with &os;5</programlisting>
<para>このオプションは、&os;&nbsp;6.X 以上のシステムにおいて、
&os;&nbsp;5.X でコンパイルされた &os;&nbsp;5.X
のシステムコールインタフェースを用いるアプリケーションを利用する場合に必要とされます。</para>
<programlisting>options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI</programlisting>
<para>この行は、カーネルがそれぞれの SCSI 機器を検出する前に
@ -663,15 +757,8 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
<programlisting>options KBD_INSTALL_CDEV # install a CDEV entry in /dev</programlisting>
<para>このオプションはキーボードに関連しています。
<filename>/dev</filename> に CDEV エントリをインストールします。</para>
<programlisting>options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~128k to driver.
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.</programlisting>
<para>これはレジスタ定義の出力を読みやすくし、デバッグを容易にします。</para>
<para>キーボードデバイスノードを <filename>/dev</filename>
に作成するにはこのオプションが必要です。</para>
<programlisting>options ADAPTIVE_GIANT # Giant mutex is adaptive.</programlisting>
@ -687,6 +774,15 @@ options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
通常、スレッドは実行の機会をスリープ状態で待ちます。
もし、よくわからないのであれば、そのままにしておいてください。</para>
<note>
<para>&os; 8.0-CURRENT 以降では、
(<literal>NO_ADAPTIVE_MUTEXES</literal>
オプションでコンパイルを行って非適合型にするのでなければ)
すべての mutex はデフォルトで適合型になりました。
現在の Giant は適合型なので、<literal>ADAPTIVE_GIANT</literal>
オプションはカーネルコンフィグレーションから外されました。</para>
</note>
<indexterm>
<primary>カーネルオプション</primary>
<secondary>SMP</secondary>
@ -699,6 +795,11 @@ options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
マルチプロセッサに対応するには
<literal>options SMP</literal> を追加してください。</para>
<note>
<para>apic デバイスは i386 アーキテクチャにのみ存在します。
他のアーキテクチャでは、この行を含まないでください。</para>
</note>
<programlisting>device eisa</programlisting>
<para>あなたが EISA マザーボードを持っている場合、
@ -756,13 +857,17 @@ device ata</programlisting>
<programlisting># SCSI Controllers
device ahb # EISA AHA1742 family
device ahc # AHA2940 and onboard AIC7xxx devices
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~128k to driver.
device ahd # AHA39320/29320 and onboard AIC79xx devices
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
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)
device sym # NCR/Symbios Logic (newer chipsets + those of `ncr')
device trm # Tekram DC395U/UW/F DC315U adapters
device adv # Advansys SCSI adapters
@ -777,7 +882,9 @@ device stg # TMC 18C30/18C50</programlisting>
<para>SCSI コントローラです。
あなたのシステムにないデバイスはコメントアウトして下さい。
もし IDE しかないシステムならこれらすべてを削除できます。</para>
もし IDE しかないシステムならこれらすべてを削除できます。
<literal>*_REG_PRETTY_PRINT</literal> 行は、
対応するドライバに対するデバッグオプションです。</para>
<programlisting># SCSI peripherals
device scbus # SCSI bus (required for SCSI)
@ -850,7 +957,9 @@ device atkbdc # AT keyboard controller</programlisting>
<programlisting>device kbdmux # keyboard multiplexer</programlisting>
<para>標準のキーボードマルチプレクサのサポート。</para>
<para>標準のキーボードマルチプレクサのサポート。
2 つ以上のキーボードを用いる予定がないのであれば、
この行を削除してもかまいません。</para>
<programlisting>device vga # VGA video card driver</programlisting>
@ -1021,6 +1130,7 @@ 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 msk # Marvell/SysKonnect Yukon II 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')
@ -1030,6 +1140,7 @@ device sf # Adaptec AIC-6915 (<quote>Starfire</quote>)
device sis # Silicon Integrated Systems SiS 900/SiS 7016
device sk # SysKonnect SK-984x &amp; SK-982x gigabit Ethernet
device ste # Sundance ST201 (D-Link DFE-550TX)
device stge # Sundance/Tamarack TC9021 gigabit Ethernet
device ti # Alteon Networks Tigon I/II gigabit Ethernet
device tl # Texas Instruments ThunderLAN
device tx # SMC EtherPower II (83c170 <quote>EPIC</quote>)
@ -1060,8 +1171,22 @@ device xe # Xircom pccard Ethernet
<filename>/usr/src/sys/<replaceable>i386</replaceable>/conf/NOTES</filename> を参照して下さい。</para>
<programlisting># Wireless NIC cards
device wlan # 802.11 support
device an # Aironet 4500/4800 802.11 wireless NICs.
device wlan # 802.11 support</programlisting>
<para>標準の 802.11 サポート。ワイヤレスネットワークではこの行が必要です。</para>
<programlisting>device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support</programlisting>
<para>802.11 デバイスの暗号化サポート。
暗号化および 802.11i セキュリティプロトコルを使うことを考えているのであれば、
これらの行が必要です。</para>
<programlisting>device an # Aironet 4500/4800 802.11 wireless NICs.
device ath # Atheros pci/cardbus NIC's
device ath_hal # Atheros HAL (Hardware Access Layer)
device ath_rate_sample # SampleRate tx rate control for ath
device awi # BayStack 660 and others
device ral # Ralink Technology RT2500 wireless NICs.
device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
@ -1156,7 +1281,7 @@ device bpf # Berkeley packet filter</programlisting>
<programlisting># USB support
device uhci # UHCI PCI-&gt;USB interface
device ohci # OHCI PCI-&gt;USB interface
#device ehci # EHCI PCI-&gt;USB interface (USB 2.0)
device ehci # EHCI PCI-&gt;USB interface (USB 2.0)
device usb # USB Bus (required)
#device udbp # USB Double Bulk Pipe devices
device ugen # Generic
@ -1165,6 +1290,7 @@ device ukbd # Keyboard
device ulpt # Printer
device umass # Disks/Mass storage - Requires scbus and da
device ums # Mouse
device ural # Ralink Technology RT2500USB wireless NICs
device urio # Diamond Rio 500 MP3 player
device uscanner # Scanners
# USB Ethernet, requires mii
@ -1282,7 +1408,7 @@ device fwe # Ethernet over FireWire (non-standard!)</programl
<title>問題が起きた場合には</title>
<para>カスタムカーネルを作る場合に起きるトラブルは、
次の 5 種類に分けられます。</para>
次の 4 種類に分けられます。</para>
<variablelist>
<varlistentry>
@ -1361,7 +1487,7 @@ device fwe # Ethernet over FireWire (non-standard!)</programl
&man.ps.1; のようなコマンドが正しく動きません。これを行うには、
以下のように正しく起動するカーネルを含むディレクトリ名に変更するだけです。</para>
<screen>&prompt.root; <userinput>mv /boot/kernel /boot/kernel.bad</userinput>
<screen>&prompt.root; <userinput>mv /boot/kernel <replaceable>/boot/kernel.bad</replaceable></userinput>
&prompt.root; <userinput>mv /boot/<replaceable>kernel.good</replaceable> /boot/kernel</userinput></screen>
</note>