2009-07-30 00:aa:bb:cc:dd:10
糞エアリアの LAN EVOLUTION の firmware として最初から入ってる Linux を立ち上げて、(初めて)WEB画面にアクセスして確認してみたら、mac adderss は 00:22:ec:02:00:f3 になってた。
今使ってる 00:aa:bb:cc:dd:10 は、LAN EVOLUTION の U-Boot の flash の環境変数領域に設定されていた値で、U-Boot の tftpboot はこのふざけた mac address で boot しやがるのですが、 やっぱりどっかにちゃんとした mac address が書かれているんだなぁ。どこだろう。まぁ 00:aa:bb:cc:dd:10 のままでもいいんですが。
というわけで、イーサの続きを書く。
受信時のCRCを含めるか含めないかのビット操作に気づかなくて少しハマったものの、一応 nfsboot でシングルユーザまで動いた。
たまに boot 中に RX FIFO FULL でドライバが止まったりするけど。
パフォーマンス出てないっぽい。CPU のデータキャッシュが disable なままだったり、ドライバがまだヘボヘボチューニングなのもあるけど、根本的に遅いのは RX ring buffer の充填を auto polling にしてるのが悪いんじゃなかろうか。
自前でDMAをハンドリングするように変えてみよう…
NetBSD/evbarm STR81xx/91xx Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 5.99.15 (STR81xx) #868: Thu Jul 30 03:44:56 JST 2009 ryo@falsie:/src/cvs/NetBSD/sys/arch/evbarm/compile/STR81xx total memory = 32768 KB avail memory = 28288 KB mainbus0 (root) cpu0 at mainbus0: FA526 rev 1 (ARMv4 core) cpu0: DC disabled IC enabled WB enabled LABT cpu0: 8KB/16B 2-way Instruction cache cpu0: 8KB/16B 2-way write-back-locking-B Data cache star0 at mainbus0: Star STR8100 Equuleus Family SoC (0x8131eeee) starclk0 at star0 addr 0x79000000-0x79000047 irq 0: Programmable Timer com0 at star0 addr 0x78000000-0x7800001f irq 9: ns16550a, working fifo com0: console com1 at star0 addr 0x78800000-0x7880001f irq 10: ns16550a, working fifo gec0 at star0 addr 0x70000000-0x70000133 irq 18: Gigabit Ethernet Controller gec0: Ethernet address 00:aa:bb:cc:dd:10 ukphy0 at gec0 phy 0: Generic IEEE 802.3u media interface ukphy0: OUI 0x000e4e, model 0x0025, rev. 1 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto gec_mib_intr:390: sc=0xc4098000, status=0x4<PORT_STATUS_CHG> boot device: <unknown> root device: gec_mib_intr:390: sc=0xc4098000, status=0x4<PORT_STATUS_CHG> gec0 dump device: file system (default generic): root on gec0 nfs_boot: trying static nfs_boot: client_addr=172.31.185.8 nfs_boot: gateway=172.31.185.65 nfs_boot: netmask=255.255.254.0 nfs_boot: server=172.31.185.65 nfs_boot: root=172.31.185.65:/src/boot/str8132 gec_init:707: ifp=0xc4099858 gec_stop:809: ifp=0xc4099858 gec_reset:1064 gec_miibus_statchg:1053: status=>00040114 gec_mib_intr:390: sc=0xc4098000, status=0x4<PORT_STATUS_CHG> root on 172.31.185.65:/src/boot/str8132 root file system type: nfs WARNING: no TOD clock present WARNING: using filesystem time WARNING: CHECK AND RESET THE DATE! init path (default /sbin/init): init: trying /sbin/init Thu Jul 30 03:48:37 UTC 2009 eval: cannot open /etc/fstab: no such file mount: Cannot open `/etc/fstab': No such file or directory mount: Cannot open `/etc/fstab': No such file or directory mount: Cannot open `/etc/fstab': No such file or directory mount: Cannot open `/etc/fstab': No such file or directory mount: /: unknown special file or file system. swapctl: Cannot open `/etc/fstab': No such file or directory Starting file system checks: fsck: Cannot open `/etc/fstab': No such file or directory fsck: Can't open checklist file: /etc/fstab Automatic file system check failed; help! ERROR: ABORTING BOOT (sending SIGTERM to parent)! 1 2009-07-30T03:55:47.998088+00:Enter pathname of shell or RETURN for /bin/sh: Terminal type is vt100. We recommend that you create a non-root account and use su(1) for root access. # # uname -a NetBSD 5.99.15 NetBSD 5.99.15 (STR81xx) #868: Thu Jul 30 03:44:56 JST 2009 ryo@falsie:/src/cvs/NetBSD/sys/arch/evbarm/compile/STR81xx evbarm # cd /etc # cat > fstab 172.31.185.65:/src/boot/str8132 / nfs rw ^D # mount / # df Filesystem 1K-blocks Used Avail %Cap Mounted on 172.31.185.65:/src/boot/str8132 479777102 130617864 325170384 28% / # ifconfig -a gec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 address: 00:aa:bb:cc:dd:10 media: Ethernet autoselect (100baseTX full-duplex) status: active inet 172.31.185.8 netmask 0xfffffe00 broadcast 172.31.185.255 inet6 fe80::2aa:bbff:fecc:dd10%gec0 prefixlen 64 scopeid 0x1 lo0: flags=8048<LOOPBACK,RUNNING,MULTICAST> mtu 33192 #
調子にのってマルチユーザにしたら落ちた。
# ^DThu Jul 30 03:51:19 UTC 2009 Not checking /: nfs mounted Starting file system checks: Setting tty flags. Setting sysctl variables: ddb.onpanic: 1 -> 0 Starting network. /etc/rc: WARNING: $hostname not set. IPv6 mode: host Configuring network interfaces:. Adding interface aliases:. Building databases: dev, utmp, utmpx, servicespanic: kernel diagnostic assertion "si->si_active" failed: file "../../../../kern/kern_softint.c", line 506 cpu0: Begin traceback... 0xc3ffdf70 scp=0xc3ffdf70 rlv=0xc3ffdf54 (0xc3ffdf54) rsp=0xc3ffdf44 rfp=0xc0131960 Bad frame pointer: 0xc0131960 cpu0: End traceback... rebooting...
kern_softintってまたイヤそうな所だな…
EOF