Tulip ドライバのインストール

Linux活用日記

Last modified: May 24th, 2002




tulip ドライバは大抵の場合, 組み込まれているものですが, 中には古い tulip では動作しない NIC もあるようです. ここでは新らしい tulip ドライバのソースを入手してコンパイルとインストールする手順をご紹介します.

Planex Communications の FNW-9802-T や Melco の LGY-PCI-TXL などは, 共に DEC21140 互換のコントローラチップを使っています. 例えば前者は ADMtek AN983 を使っていて tulip 互換なのですが, 少し古い tulip ドライバでは認識できないようです. 幸い, Linux 用に動作できるドライバを同梱してくれている製品もありますが, Red Hat Linux 7.0 のように通常のコンパイルでは失敗してしまうことがあります.


ドライバの入手先:
Linux Network Drivers

上記サイトより tulip.c, kern_compat.h, pci-scan.c, pci-scan.h を入手しておきます.


(FNW-9802T の場合):
* これらはすべて1行で記述します.

# gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o tulip.o tulip.c

# gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o pci-scan.o pci-scan.c

# install -m 644 tulip.o /lib/modules/`uname -r`/net/
# install -m 644 pci-scan.o /lib/modules/`uname -r`/net/


FNW-9802T に付属する実行ファイルで行われる内容は上記のようなものです. 実際には trans という実行形式のファイルが用意されています. しかし, これでは Red Hat Linux 7.0 以降の場合, コンパイラの互換性などから失敗してしまいます. 下記のように編集することによってコンパイルとインストールがうまくいきます.

# kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DMODULE -include /usr/src/linux/include/linux/modversions.h -c -o tulip.o tulip.c

# kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DMODULE -include /usr/src/linux/include/linux/modversions.h -c -o pci-scan.o pci-scan.c

# install -m644 -o root -g root tulip.o /lib/modules/ `uname -r`/net/
# install -m644 -o root -g root pci-scan.o /lib/modules/ `uname -r`/net/

または,

# egcs -DMODULE -D __KERNEL __ -DEXPORT_SYMTAB -Wall -Wstrict-prototypes -O2 -c pci-scan.c
# egcs -DMODULE -Wall -Wstrict-prototypes -O2 -c tulip.c

# install -m644 -o root -g root tulip.o /lib/modules/ `uname -r`/net/
# install -m644 -o root -g root pci-scan.o /lib/modules/ `uname -r`/net/

インストールが終わったら /etc/modules.conf にこの tulip ドライバをロードするための記述があるかどうかを確認します. 通常は次のように書かれています.

alias eth0 tulip

eth0 の部分は2枚目の NIC の場合は eth1 になります. この行が書かれていなければ書き足せば良いでしょう. そしてその後, ネットワークの設定を行ってから, 次のコマンドを実行します.

# /etc/init.d/network stop
# depmod -av
# rmmod tulip
# modprobe tulip
# /etc/init.d/network start



HOME