[ TOP | Recently ]

2009-07-15 mountroot


CFATTACH_DECL_NEW ではなく CFATTACH_DECL を使っていたという比較的つまらないポカだった。修正しつついろいろ試行錯誤して、mountrootまで来た。
試行錯誤と言っても com0 を attach したら止まったので、無理矢理 com attach を return させると以下まで来たのだった。
たぶん割り込みがいいかげんなせいだろう。

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) #347: Wed Jul 15 22:22:22 JST 2009
        ryo@falsie:/src/cvs/NetBSD/sys/arch/evbarm/compile/STR81xx
total memory = 32768 KB
avail memory = 28576 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 Semiconductor, STR8100/STR9100 Network Access Processor
startmr0 at star0 addr 0x79000000-0x79000047: SoC Timer
com0 at star0 addr 0x78000000-0x7800001f irq 9: XXX
boot device: <unknown>
root device: ?
use one of: md0[a-h] ddb halt reboot
root device: ddb
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x4:        mov     r15, r14

db> bt
netbsd:getdisk+0x10
        scp=0xc00accec rlv=0xc00ad128 (netbsd:setroot+0xf4)
        rsp=0xc02c4e08 rfp=0xc02c4fa0
        r10=0x00e6dcf2 r9=0x00e6de06
        r8=0x00000000 r7=0xc02c4ee8 r6=0x00000001 r5=0xc02c4f70
        r4=0x00000002
netbsd:setroot+0x10
        scp=0xc00ad044 rlv=0xc0068edc (netbsd:main+0x25c)
        rsp=0xc02c4fa4 rfp=0xc02c4fec
        r10=0x00e6dcf2 r9=0x00e6de06
        r8=0xc0210e6c r7=0xc02884dc r6=0x00000002 r5=0x00e6dca4
        r4=0x00000000
netbsd:main+0x10
        scp=0xc0068c90 rlv=0xc00081f0 (netbsd:kernel_text+0x3c)
        rsp=0xc02c4ff0 rfp=0xc02c4ffc
        r10=0x00e6dcf2 r8=0x00e6ffdc
        r7=0x00e6de06 r6=0x00000002 r5=0x00e6dca4 r4=0x20008104
netbsd:kernel_text+0x3c
        scp=0xc00081f0 rlv=0xc010e628 (netbsd:initarm+0x8b4)
        rsp=0xc02c5000 rfp=0x00000000
db> 

rebootもできるようにした。

db> reboot
syncing disks... done
unmounting file systems... done
rebooting...

U-Boot 1.1.4 (Nov 27 2007 - 09:29:18)

U-Boot code: 00000000 -> 0001AF80  BSS: -> 0001FEF4
IRQ Stack: 00e6ff7c
FIQ Stack: 00e6ef7c
RAM Configuration:
Bank #0: 00000000 32 MB
Flash Manufacturer: ST
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
PLL clock at 250MHz
CPU clock at 250MHz
AHB clock at 125MHz
APB clock at 62MHz

Hit any key to stop autoboot:  0 
Star Equuleus # 

資料見つけてから一ヶ月。思ったより時間かかるなぁ。


EOF