电脑技术学习

在 FreeBSD 安装 notebook PCMCIA 网路卡

dn001
1. 原本 FreeBSD (2.2.5 RELEASE) 对 PCMCIA 的支援并不是很完善,
在日本的 FreeBSD user 有发展出一套 PAO 的 package, 能够让
FreeBSD 认得多种的 pcmcia 装置, 所以首先你要去抓
PAO-970201.tar.gz 和 boot-pao.flp (for 2.2.5 Release).
这两个 file 之前网友 zenlin 和 edwardc 已经 mirror 回来了
你也可到下列位置抓
ftp://turtle.ee.ncku.edu.tw/pub/bsd/mobil/PAO-971201.tar.gz
ftp://turtle.ee.ncku.edu.tw/pub/bsd/mobil/boot-pao.flp

2. 将 boot-pao.flp 做成开机片,开机
我们不用它来装 bsd, 只是要看看 notebook 上的 PCMCIA bridge 是否有被
support, 如果没有那下面就没戏唱了
如果你的 PCMCIA bridge 有被测到, 那麽接着会开始 search 你的 PCMCIA
device, 比如说网路卡, 当初我在装的时候, 出现的是

"Ethernet(Adapter)" not supported

别担心, 把这个字串记下来备用.

3. cd /usr/src
tar -xvf PAO-971201.tar.gz
cd /usr/src/PAO-971201/2.2.5-RELEASE

make backup-sys
make patch
make install-include
make devices

cd etc
make install (这个步骤会把你原来的 rc.conf rename 成 rc.conf.orig)
cd ../usr/sbin
make; make install
cd ../sbin
make; make install

cd /sys/i386/conf
修改 PAO 这个 kernel config file 以符合自己的需要,然後 make kernel

以上步骤详见 /usr/src/PAO-971201/2.2.5-RELEASE/README

4. 接着需要修改的就是 /etc/pccard.conf 了. (请先 man 一下 pccard.conf)
这个 files 其实是一个 database, 记有各种 PCMCIA 的 "辨识字串" 和
硬体组态, 把它叫出来, 在 for unsupported card 区加入

# NE2000 compatible PCMCIA
card "Ethernet" "Adapter" <----这 2 段辨识字串就是是刚记下的那串
config default "ed0" any
insert echo NE2000 inserted
insert /etc/pccard_ether $device
remove echo NE2000 removed
remove /etc/pccard_ether_remove $device

5. 修改 /etc/rc.conf (已经 PAO 被换过的版本)
在最後几行有一个 ifconfig_common="inet 10.0.0.1 netmask 255.255.255.0"
把它改成你网路卡需要的 ip/mask
还有 defaultroute 要设成你的 default gateway

6. 重新开机, 然後你会看到 (应该啦..:)

Initializing PC-card drivers: ed ep fe sn sio wdc
Probing for devices on PCI bus 0:
chip0 rev 176
vga0 rev 0 int a irq ?? on pci0:12
chip1 rev 163
pci0:18:1: UMC, device=0x0101, class=storage (ide) [no driver assigned]
pcic0 rev 254 int a irq
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^你的 PCMCIA bridge
还有

crd: ctlr(0) Cirrus Logic PD-6729/6730 (5 mem & 2 I/O Windows)
rnel: pcic: controller I/O address 0xfcfc
rnel: pcic: controller irq 9 (shared)
rnel: pcic: controller I/O address 0xfcfc
rnel: Card inserted, slot 0
pccardd[38]: Card "Ethernet"("Adapter") matched "Ethernet" ("Adapter")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^抓到了
ed0: address 00:e0:98:00:bb:bd, type NE2000 (16 bit)
pccardd[38]: pccardd started

7. 在我的 notebook 上, enable apm 会当机, 如果你有当机的情形发生,
试着关掉 apm0 看看.
ps:目前的 apm 并未 support HD (最耗电的部份...)
而且似乎 bios 的 apm 功能仍有效, 我想关掉 bsd apm 应该影响不大

标签: