この間、某DOS/Vパ○ダ○スで買った1980円のISAイーサネットカードがPnPだったため、 今回紹介する方法を使いました。製品は赤と白のまだら模様の箱に入っていた NE2000互換のOEM製品です。大量に積んであったから買った人もいるかも。
注:毎度の事ながら、今回説明する方法は私がやったら うまくいっただけで必ずしもうまくいくとは限りません。また、OSが壊れても 保証しません。
% mkdir ~/tmp % cp FreeBSD-ISA_PnP_June8.tar.gz ~/tmp % zcat FreeBSD-ISA_PnP_June8.tar.gz | tar xvf -
% pwd ~/tmp/FreeBSD-pnp % cd pnpinfo % makemake の後に pnpinfo という実行形式のファイルがあると思います。そのプログラムを 実行してください。ここで注意して欲しいのは一般ユーザーでは実行できないので スーパーユーザーになってください。
% su Password:******** # ./pnpinfo Checking for Plug-n-Play devices... Trying Read_Port at 203 Trying Read_Port at 243 Trying Read_Port at 283 Card assigned CSN #1 Board Vendor ID: ACC1660 Board Serial Number: 0018affc Device Description: ACCTON EN166X MPX2 ETHERNET CARD^@ PnP Version: 1.0 Vendor Version: 16 Logical Device ID: @@@9519 (19950000) Device supports I/O Range Check Vendor register funcs 00 Compatible Device ID: PNP80d6 (d680d041) Device does not decode the full 16-bit ISA address I/O Range maximum address: 0x200 I/O Range maximum address: 0x3e0 I/O alignment for minimum: 32 I/O length: 32 IRQ: 2 3 4 5 10 11 12 15 IRQ: High true edge sensitive End Tagここでは私のカードの情報を出力しました。
もし、2.1.5の人は
# cp ~/tmp/FreeBSD-pnp/kernel.patch.2.1.5 /usr/src # cd /usr/src # patch -p0 < kernel.patch.2.1.5
もし、2.2以上の方は
# cp ~/tmp/FreeBSD-pnp/kernel.patch.2.2-current /usr/src/sys # cd /usr/src/sys # patch -p0 < kernel.patch.2.2-currentとして下さい。
# cd /usr/src/sys/i386/isa # vi pnp.c50行目ぐらいに、
/* Configuration for the Supra Express 288i PnP */
{
0x00008803, /* Serial Number */
-1, /* Logical Device Number */
{
{ 15, -1 }, /* Primary IRQ Number, Type */
{ -1, -1 } /* Second IRQ Number, Type */
},
{ -1, -1 }, /* DRQ Number */
{
0x3e8, /* Ports 1 */
-1, /* Ports 2 */
-1, /* Ports 3 */
-1, /* Ports 4 */
となっているはずです。ソースの大体50行目から75行目ぐらいまでが
Supra Express 288i PnP の情報なので、その後ろに Supra Express 288i PnP の
様に情報を記述します。
/* Configuration for the ACCTON EN166X MPX2 ETHERNET CARD */
{
0x0018affc, /* Serial Number */
-1, /* Logical Device Number */
{
{ 11, 3 }, /* Primary IRQ Number, Type */
{ -1, -1 } /* Second IRQ Number, Type */
},
{ -1, -1 }, /* DRQ Number */
{
0x240, /* Ports 1 */
-1, /* Ports 2 */
-1, /* Ports 3 */
-1, /* Ports 4 */
-1, /* Ports 5 */
-1, /* Ports 6 */
-1, /* Ports 7 */
-1, /* Ports 8 */
},
{
{ -1, -1, -1 }, /* Memory desc1 - base, ctrl, range */
{ -1, -1, -1 }, /* Memory desc2 - base, ctrl, range */
{ -1, -1, -1 } /* Memory desc3 - base, ctrl, range */
}
},
を加えました。大事なのは , です。
これが無いとエラーが出ます。また、34行目に
#include "pnp.h"とありますが、下記の様に書き換えて下さい。
#include <i386/isa/pnp.h>これをしないとカーネルのコンパイルでエラーがでると思います。
controller pnp0 device ed0 at isa? port 0x240 net irq 11 vector edintrの2行を加えます。
# config 設定ファイル # cd ../../compile/設定ファイル # make depend # make
ちなみに私のマシンでは
Copyright (c) 1992-1996 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
FreeBSD 3.0-970124-SNAP #0: Sun Apr 20 22:46:28 JST 1997
:
:
:
Checking for Plug-n-Play devices...
Board Vendor ID: ACC1660 Board Serial Number: 0018affc
Configuring (Logical Device 0)
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
ed0 at 0x240-0x25f irq 11 on isa
ed0: address 00:00:e8:18:af:fc, type NE2000 (16 bit)
:
:
となっています。
★AKIYAMA Home Page ★FreeBSDについて