ディズニーシーにいってきましたよっと。
昨日の疲れもあって、一日中ゆっくりとすごしました。
ダイエーに行ったけど、気づいたら帰ってきていたみたいですが。
Let's NoteにNetBSDを入れる。そろそろ、OBS200とかやりたいし。
でもまぁ、Xは深みにはまりそうなのでコンソールベースで使っていきましょうか。
朝と昼は暑いくらいだったんだけど、夜は夕立で雨。車を使う。
アキバによってPHSのコースを定額のコースに変更。Air-EDGEは解約してもいいんだけどなぁ。
あとはオーディオテクニカのテーブルタップにイーサの口がついているのを購入。580円なり。千石電商にて。
使ってみたらコンセント部分がかなり固い。使いづらいなぁ。あと、テーブルに挟むのを期待して買ったんだけど、テーブルが厚くてうまく固定できず横に取り付けたりしないとダメだった。
イマイチの買い物をしてしまった。
build.shを仕掛けて寝る。
朝は弱いが気温が上がってきたのもあってマシになってきた気がする。
2日連続で雨はやめて。
朝起きたらbuild.shが完走していたので、環境をぼちぼちと整えて、いざブート。
OPENBLOCKS200のkernelって標準で作られていたんだねぇ。
こんな感じ。でも、NFSマウントしようとするとemac0: MII timed outが連発して使いものにならず。emacが変なのかなぁ。
+4000000, 00450000-04000000 -> 007ac000-04000000 = 3854000 Board config data: mem_size = 67108864 mac_address_local = 00:80:6d:51:0e:7d processor_speed = 200000000 plb_speed = 100000000 pci_speed = 33000000 PLL Mode Register = 0xa6b2c000 Chip Pin Strapping Register = 0x6ab08c00 Loaded initial symtab at 0x70fff0, strtab at 0x733b30, # entries 9052 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 3.99.5 (OPENBLOCKS200) #0: Tue May 24 10:05:02 JST 2005 tokuda@r1.home.tokuda.net:/export/o/20050523/evbppc/sys/arch/evbppc/compile/OPENBLOCKS200 Model: OpenBlockS S/R IBM PowerPC 405GP Board total memory = 65536 KB avail memory = 57248 KB plb0 (root) cpu0 at plb0: 200MHz 405GP (Revision 1.69) Instruction cache size 8192 line size 32 Data cache size 8192 line size 32 PVR: owner 401 core family 1 cache 0 version 5 asic 5 ecc0 at plb0 irq 16: ECC controller opb0 at plb0 com0 at opb0 addr 0xef600300 irq 0: ns16550a, working fifo com0: console com1 at opb0 addr 0xef600400 irq 1: ns16550a, working fifo emac0 at opb0 addr 0xef600800 irq 9: 405GP EMAC emac0: interrupting at irqs 9 .. 15 emac0: Ethernet address 00:80:6d:51:0e:7d ukphy0 at emac0 phy 0: Generic IEEE 802.3u media interface ukphy0: 78Q2120 10/100 media interface (OUI 0x00039c, model 0x0014), rev. 11 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ukphy1 at emac0 phy 1: Generic IEEE 802.3u media interface ukphy1: 78Q2120 10/100 media interface (OUI 0x00039c, model 0x0014), rev. 11 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto gpio0 at opb0 addr 0xef600700: On-Chip GPIO controller gpiic0 at opb0 addr 0xef600500 irq 2: On-Chip IIC controller iic0 at gpiic0: I2C bus wdog0 at opb0: 5 second period pchb0 at plb0 pchb0: IBM PPC 405GP PCI Bridge (rev. 0x01) pci0 at pchb0 pci0: i/o space, memory space enabled IBM PPC 405GP PCI Bridge (host bridge, revision 0x01) at pci0 dev 0 function 0 not configured pbus at plb0 not configured biomask 1c00 netmask 1c00 ttymask 1c00 emac0: emac_wol_intr emac0: emac_txde_intr emac0: emac_rxde_intr emac0: emac_wol_intr emac0: emac_txde_intr emac0: emac_rxde_intr Setting PIT to 200000000/100 = 2000000 root device:
昔も同様の症状になっていたのを思い出し、古い (2004-04) のkernelを使うと同じ症状で、rtkでNFSマウントするkernelは動く。同じようにrtkでNFSマウントするkernelを作ってやれば-currentでも動くかなぁ (うーむ)。
朝起きられねー。
最近は、暑いような寒いような気候なのでどのような服にするか迷う。
rtk0を有効にしたkernelを作ったが、rtk0を認識してくれない。
あれぇ? と思って、昔のpatchを見るとpowerpc/ibm4xx/pci/pci_machdep.cにも手が入っていたみたい。これを当てるとうまくいく気がする。
うーむ。目やにがでるなぁ。調子悪い。
昔のpowerpc/ibm4xx/pci/pci_machdep.cのpatchを見ると、どうもよくわからないパッチ。そのまま当ててよいものかよくわからず。
かなり酔っぱらいましたよ。明日に影響があり過ぎ。
鬼怒川温泉へ一泊旅行。
道に迷いまくって、一時間ほど無駄にした気がする。
宿は改装して一年ほどなのでかなり新しい。しかも特別室らしいので、とても良い印象。
明日はどこに行こう。
鬼怒川温泉付近のロープウェイで猿山に。
猿にえさをやるのは割と怖いが楽しいものだった。
その後、なぜか那須のサファリパークに。物価がおかしいくらいに高くてビビる。
まぁ、餌やりとか楽しかったな。
結局のところ、pci_machdep.cはよくわからん。
パッチはpci_bus_maxdevs()とpci_intr_map()とpci_conf_interrupt()の三カ所。
pci_bus_maxdevs()は、数を増やさないと話にならないので増やす。これはまぁいいのかなと。
pci_intr_map()とpci_conf_interrupt()は基本的には同じような修正になっていて、devに応じたcase文を書いて*ihpや*ilineを設定してあげることになる。
元々はcase 1:〜case 4:なんだけどOBS200のrtkはdev=7になるのでcase 7:が必要になる。
で、色々試した結果、*ilineはcase 7:を足してあげるだけでよくって、*ihpは既存のロジックである、
*ihp = 27 + dev;
だとうまく動かない。dev = 7 なので*ihpは34 (0x22) になるわけで、kernel panicとなる。
まぁ、31あたりがしきい値なのかなと思って31に収まるように次のように変更する。
*ihp = 20 + dev;
panicはしなくなり、rtk0も認識されるがrtk0: watchdog timeoutとなり使えない。
元のパッチが*ihpを28に固定するパッチだったので
*ihp = 21 + dev;
とやると見事に動く。どうやらrtk0にとって*ihpは28じゃないとだめらしい。
ただ、元々のcase 1:〜case 4:の*ihpがこれまでと変わってしまう。で、pci_machdep.cを使っているのを調べてみるとWALUNT, OPENBLOCKS266, OPENBLOCKS200の三つだけのようでOPENBLOCKS266はテストできるがWALNUTはテストできない。
他への影響がわからないので、結局rtkのところだけを決め打ちにするカッコワルいpatchでいいや。
*** pci_machdep.c.orig Thu May 26 18:32:59 2005 --- pci_machdep.c Sun May 29 16:09:34 2005 *************** *** 108,114 **** * Bus number is irrelevant. Configuration Mechanism 1 is in * use, can have devices 0-32 (i.e. the `normal' range). */ ! return 5; } pcitag_t --- 108,114 ---- * Bus number is irrelevant. Configuration Mechanism 1 is in * use, can have devices 0-32 (i.e. the `normal' range). */ ! return 15; } pcitag_t *************** *** 188,193 **** --- 188,196 ---- case 4: *ihp = 27 + dev; break; + case 7: + *ihp = 28; + break; default: printf("Hmm.. PCI device %d should not exist on this board\n", dev); *************** *** 250,255 **** --- 253,259 ---- case 2: case 3: case 4: + case 7: *iline = 31 - dev; } } else {
ただ、しょせんつじつま合わせなので、
*ihp = 21 + dev;
でも良い気はする。この部分の処理ってibm4xxで共通なんだろうか。っていうのがポイントなのかなぁ。
*ihpの設定を他のarchで調べる*iline = *ihpなものや、計算式で求めているものや
pci_conf_interrupt(pci_chipset_tag_t pc, int bus, int dev, int pin, int swiz, int *iline) { (*platform->pci_intr_fixup)(bus, dev, iline); }
みたいに書いてあるものとさまざま。
最後のやつはこの処理がplatformに依存しているのでそっちに任せます、みたいな意味だろうからibm4xxとして共通の処理にならないのであれば同様の方法をとるのが正しいのかもしれない。
けどめんどくさいのでcase 7:で決め打つのでいいや。
あと一つ忘れていたけど、OPENBLOCKS200のemacのPHYはtqphyが適切のようですね。
これでemacがなおるかと思ったら、変わらなかったよ。
ということでconf/OPENBLOCKS200へのパッチ。
*** OPENBLOCKS200 18 Mar 2005 15:31:58 -0000 1.1 --- OPENBLOCKS200 29 May 2005 08:33:52 -0000 *************** *** 172,180 **** viaide* at pci? dev ? function ? # VIA/AMD/Nvidia IDE controllers atabus* at ata? ! tlp* at pci? dev ? function ? # DECchip 21x4x and clones ! lxtphy* at mii? phy ? # Level One LXT-970 PHYs ukphy* at mii? phy ? # generic unknown PHYs #cardslot* at cbb? --- 172,180 ---- viaide* at pci? dev ? function ? # VIA/AMD/Nvidia IDE controllers atabus* at ata? ! rtk* at pci? dev ? function ? # Realtek 8129/8139 ! tqphy* at mii? phy ? # TDK Semiconductor PHYs ukphy* at mii? phy ? # generic unknown PHYs #cardslot* at cbb?
emac動いてくれないかなぁ。
あと、OBS266と同様にpthreadまわりはダメっぽい。
# dig assertion "qhead->pt_spinlocks == 0" failed: file "/export/s/20050523/src/lib/libpthread/pthread_run.c", line 266, function "pthread__sched_bulk" pid 26 (dig), uid 0: exited on signal 6 (core dumped) Abort trap (core dumped)
ひたすら寝て、タワーに登って、そしてまた寝る。
明日は雨なのだろうか。
ブート時のlogを張っておく。
+4000000, 00450000-04000000 -> 007b0000-04000000 = 3850000 Board config data: mem_size = 67108864 mac_address_local = 00:80:6d:51:0e:7d processor_speed = 200000000 plb_speed = 100000000 pci_speed = 33000000 PLL Mode Register = 0xa6b2c000 Chip Pin Strapping Register = 0x6ab08c00 Loaded initial symtab at 0x713e7c, strtab at 0x737cbc, # entries 9100 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 3.99.5 (OPENBLOCKS200) #14: Sun May 29 16:11:16 JST 2005 tokuda@r1.home.tokuda.net:/export/o/20050523/evbppc/sys/arch/evbppc/compile/OPENBLOCKS200 Model: OpenBlockS S/R IBM PowerPC 405GP Board total memory = 65536 KB avail memory = 57232 KB plb0 (root) cpu0 at plb0: 200MHz 405GP (Revision 1.69) Instruction cache size 8192 line size 32 Data cache size 8192 line size 32 PVR: owner 401 core family 1 cache 0 version 5 asic 5 ecc0 at plb0 irq 16: ECC controller opb0 at plb0 com0 at opb0 addr 0xef600300 irq 0: ns16550a, working fifo com0: console com1 at opb0 addr 0xef600400 irq 1: ns16550a, working fifo emac0 at opb0 addr 0xef600800 irq 9: 405GP EMAC emac0: interrupting at irqs 9 .. 15 emac0: Ethernet address 00:80:6d:51:0e:7d tqphy0 at emac0 phy 0: 78Q2120 10/100 media interface, rev. 11 tqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto tqphy1 at emac0 phy 1: 78Q2120 10/100 media interface, rev. 11 tqphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto gpio0 at opb0 addr 0xef600700: On-Chip GPIO controller gpiic0 at opb0 addr 0xef600500 irq 2: On-Chip IIC controller iic0 at gpiic0: I2C bus wdog0 at opb0: 5 second period pchb0 at plb0 pchb0: IBM PPC 405GP PCI Bridge (rev. 0x01) pci0 at pchb0 pci0: i/o space, memory space enabled IBM PPC 405GP PCI Bridge (host bridge, revision 0x01) at pci0 dev 0 function 0 not configured rtk0 at pci0 dev 7 function 0: Realtek 8139 10/100BaseTX rtk0: interrupting at irq 28 rtk0: Ethernet address 00:80:6d:51:0e:7e ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface ukphy0: OUI 0x000000, model 0x0000, rev. 0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pbus at plb0 not configured biomask 1c00 netmask 1c08 ttymask 1c08 emac0: emac_wol_intr emac0: emac_txde_intr emac0: emac_rxde_intr emac0: emac_wol_intr emac0: emac_txde_intr emac0: emac_rxde_intr Setting PIT to 200000000/100 = 2000000 root on rtk0 nfs_boot: trying DHCP/BOOTP nfs_boot: BOOTP next-server: 192.168.100.37 nfs_boot: my_name=obs200-rtk0 nfs_boot: my_addr=192.168.100.61 nfs_boot: my_mask=255.255.255.0 root on r1.home.tokuda.net:/usr/obs200 root time: 0x42998346 inittodr: rtc not present - CHECK AND RESET THE DATE. init: copying out path `/sbin/init' 11 Sun May 29 08:54:33 UTC 2005 Checking for botched superblock upgrades: done. Starting file system checks: mount: /: unknown special file or file system. r1.home.tokuda.net:/usr/obs200: inaccurate wcc data (ctime) detected, disabling wcc Setting tty flags. Setting sysctl variables: Starting network. IPv6 mode: host Configuring network interfaces:. Adding interface aliases: Building databases... Starting syslogd. Checking for core dump... savecore: can't find device 0/0 May 29 08:54:56 obs200-rtk0 savecore: can't find device 0/0 Mounting all filesystems... Clearing /tmp. Checking quotas: done. Setting securelevel: kern.securelevel: 0 -> 1 /etc/rc: WARNING: No swap space configured! Starting virecover. Starting local daemons:. Updating motd. Starting sendmail. Starting inetd. Starting cron. Sun May 29 08:55:15 UTC 2005 NetBSD/evbppc (obs200-rtk0) (console) login: root May 29 08:55:25 obs200-rtk0 login: ROOT LOGIN (root) ON console Last login: Sun May 29 08:49:06 2005 on console Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 3.99.5 (OPENBLOCKS200) #14: Sun May 29 16:11:16 JST 2005 Welcome to NetBSD! Terminal type is vt100. We recommend creating a non-root account and using su(1) for root access. obs200-rtk0# uname -a NetBSD obs200-rtk0 3.99.5 NetBSD 3.99.5 (OPENBLOCKS200) #14: Sun May 29 16:11:16 JST 2005 tokuda@r1.home.tokuda.net:/export/o/20050523/evbppc/sys/arch/evbppc/compile/OPENBLOCKS200 evbppc obs200-rtk0#
思いっきり寝坊してしまった。
都営新宿線の新型車両に乗った。先頭と末尾だけじゃなくて全部新型のやつ。
ズボンが破れちゃった。情けない。
DVD-Rを買いにいく。DR-47WWY30BAとかいう30枚入りのやつ。国産品なら安心だろうということで。2,677円なり。
OBS200についてnetbsd-obsにメールしてみた。
developerさんよろしくお願いします。
ちょっと変わります。
これまでお世話になった皆様ありがとうございました。今後ともよろしくお願いします。
メールはこちらへ...[BSD小僧 (tokuda @(at) tokuda .(dot) net)]
この日記は、GNSを使用して作成されています。