OpenWrt Forum Archive

Topic: HELP! - CFE unable to boot

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I have a bit of a problem should I say!!

I'm trying to install openwrt using a kamikaze build onto a Netgear WGT634U but I think I've unset it somewhat and it won't boot or enable the ethernet port!!

Could someone provide me with some helpful assistance please.

Here's my printenv output:
CFE> printenv
Variable Name        Value
-------------------- --------------------------------------------------
BOOT_CONSOLE         uart1
boardtype            bcm95365r
STARTUP              ifconfig eth0 -addr=10.140.2.220 -mask=255.255.255.0 -gw=10
.140.2.219 -dns=212.23.8.1;boot -elf -fs=raw doc0:flash0.os:
kernel_args          console=ttyS1,115200 root= rw noinitrd
et0macaddr           00-00-00-53-65-10
et1macaddr           00-00-00-53-65-11
CFE_VERSION          1.0.34
CFE_BOARDNAME        BCM95365R
CFE_MEMORYSIZE       32
*** command status = 0
CFE>

And here's the CFE boot sequence:

CFE version 1.0.34 for BCM95365R (32bit,SP,LE)
Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux)
Copyright (C) 2000,2001,2002 Broadcom Corporation.

Add MAC client version(DNI).
Initializing Arena.
Initializing Devices.
et0: chipattach: NVRAM_GET(et0phyaddr) not found
et0: chipattach error
et0: etc_attach failed
Could not attach bcm4710 ethernet: -2
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)

Total memory used by CFE:  0x81BB1280 - 0x82000000 (4517248)
Initialized Data:          0x81BB1280 - 0x81BB3E90 (11280)
BSS Area:                  0x81BB3E90 - 0x81BB45D0 (1856)
Local Heap:                0x81BB45D0 - 0x81FB45D0 (4194304)
Stack Area:                0x81FB45D0 - 0x81FB65D0 (8192)
Text (code) segment:       0x81FB65E0 - 0x81FFFFB0 (301520)
Boot area (physical):      0x01B70000 - 0x01BB0000
Relocation Factor:         I:E23B65E0 - D:01BB0280

Could not activate network interface 'eth0': Error
Loader:elf Filesys:raw Dev:(null) File:doc0:flash0.os: Options:(null)
***************************
****  MAC Client V1.0  ****
***************************
et0macaddr value :flag =1 value=00-00-00-53-65-10
et1macaddr value :flag =1 value=00-00-00-53-65-11
MAC LOST ...GET NEW
system ethernet mac is not exist or it's the default.....
try to get new two.....
MAC_Client enter
gpio output successLED ctl start
assign_MAC_addr cmd id 1 send packet retries #1 start
udp_alloc fail
**Exception 8: EPC=81FD4010, Cause=00000008, VAddr=00000008
                RA=81FD4010, PRID=00029007

        0  ($00) = 00000000     AT ($01) = A0000000
        v0 ($02) = 81FB6150     v1 ($03) = FFFF3BC0
        a0 ($04) = 81FB5950     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 81FB5767
        t2 ($10) = 81BB1E10     t3 ($11) = 00000001
        t4 ($12) = 81FC66D4     t5 ($13) = 0000003B
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 81FC66D4     s1 ($17) = 00000001
        s2 ($18) = 00000000     s3 ($19) = 81BB6478
        s4 ($20) = 81FD3CA0     s5 ($21) = 81BB60D0
        s6 ($22) = 81FC7860     s7 ($23) = 81FCD940
        t8 ($24) = 02000000     t9 ($25) = E23B65E0
        k0 ($26) = 81BC8D78     k1 ($27) = 0000013D
        gp ($28) = 81BB9280     sp ($29) = 81FB5940
        fp ($30) = 81BB6040     ra ($31) = 81FD4010



CFE version 1.0.34 for BCM95365R (32bit,SP,LE)

I think I need to add some defaults to nvram and also configure the boot command correctly, although I don't understand why the network won't come up. All help appreciated.

Thanks.

Ok, I've progressed a little...


here's my printenv output now:
CFE> printenv
Variable Name        Value
-------------------- --------------------------------------------------
BOOT_CONSOLE         uart1
boardtype            bcm95365r
STARTUP              ifconfig eth0 -addr=10.140.2.220 -mask=255.255.255.0 -gw=10
.140.2.219 -dns=212.23.8.1;boot -elf -fs=raw doc0:flash0.os:
kernel_args          console=ttyS1,115200 root= rw noinitrd
et0phyaddr           254
et0mdcport           0
configvlan           0x1
et0macaddr           00-09-5b-f7-0d-34
et1macaddr           00-09-5b-f7-0d-35
CFE_VERSION          1.0.34
CFE_BOARDNAME        BCM95365R
CFE_MEMORYSIZE       32
NET_DEVICE           eth0
NET_IPADDR           10.140.2.220
NET_NETMASK          255.255.255.0
NET_GATEWAY          10.140.2.219
NET_NAMESERVER       212.23.8.1
*** command status = 0
CFE>

and a corresponding boot

CFE version 1.0.34 for BCM95365R (32bit,SP,LE)
Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux)
Copyright (C) 2000,2001,2002 Broadcom Corporation.

Add MAC client version(DNI).
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)

Total memory used by CFE:  0x81BB1280 - 0x82000000 (4517248)
Initialized Data:          0x81BB1280 - 0x81BB3E90 (11280)
BSS Area:                  0x81BB3E90 - 0x81BB45D0 (1856)
Local Heap:                0x81BB45D0 - 0x81FB45D0 (4194304)
Stack Area:                0x81FB45D0 - 0x81FB65D0 (8192)
Text (code) segment:       0x81FB65E0 - 0x81FFFFB0 (301520)
Boot area (physical):      0x01B70000 - 0x01BB0000
Relocation Factor:         I:E23B65E0 - D:01BB0280

configure vlans
*****************************************************************
*********************** VLAN Driver initial  ********************
*****************************************************************
Process LAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add LAN port

Process WAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add WAN port
SUCCESS: enable ports  success
configure vlans...done
Device eth0:  hwaddr 00-09-5B-F7-0D-34, ipaddr 10.140.2.220, mask 255.255.255.0
        gateway 10.140.2.219, nameserver 212.23.8.1
Loader:elf Filesys:raw Dev:eth0 File:doc0:flash0.os: Options:(null)
***************************
****  MAC Client V1.0  ****
***************************
et0macaddr value :flag =0 value=00-09-5b-f7-0d-34
et1macaddr value :flag =0 value=00-09-5b-f7-0d-35
MAC exist at least one
system ethernet mac exist and not default....
Skip mac client process.....
Loading: Failed.
Could not load flash0.os:: File not found

So, all points to the boot statement. I'm not convinced about the File:doc0:flash0.os: statement although I don't know what device to use or how to find out. Anyone have any ideas?

Therefore, I tried booting direct from the command line like so:

CFE> boot -elf -fs=raw flash0.os:
Loader:elf Filesys:raw Dev:flash0.os File: Options:(null)
***************************
****  MAC Client V1.0  ****
***************************
et0macaddr value :flag =0 value=00-09-5b-f7-0d-34
et1macaddr value :flag =0 value=00-09-5b-f7-0d-35
MAC exist at least one
system ethernet mac exist and not default....
Skip mac client process.....
Loading: 0x80001000/3732 Entry at 0x80001000
Closing network.
et0: link down
Starting program at 0x80001000
**Exception 8: EPC=80300078, Cause=00000008, VAddr=C0000000
                RA=8000112C, PRID=00029007

        0  ($00) = 00000000     AT ($01) = 00000000
        v0 ($02) = C0000000     v1 ($03) = 00010000
        a0 ($04) = 30524448     a1 ($05) = 00002000
        a2 ($06) = 00000010     a3 ($07) = 00001000
        t0 ($08) = 10000179     t1 ($09) = 80300000
        t2 ($10) = 80300000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 80300000     s1 ($17) = 00000010
        s2 ($18) = 00001000     s3 ($19) = 00000010
        s4 ($20) = 00002000     s5 ($21) = 00000100
        s6 ($22) = 00000010     s7 ($23) = 00001000
        t8 ($24) = FFFFFFC8     t9 ($25) = E23B65E0
        k0 ($26) = 20746120     k1 ($27) = 30313030
        gp ($28) = 81BB9280     sp ($29) = 81FB5FE8
        fp ($30) = 00000010     ra ($31) = 8000112C



CFE version 1.0.34 for BCM95365R (32bit,SP,LE)
Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux)
Copyright (C) 2000,2001,2002 Broadcom Corporation.

Add MAC client version(DNI).
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)

Total memory used by CFE:  0x81BB1280 - 0x82000000 (4517248)
Initialized Data:          0x81BB1280 - 0x81BB3E90 (11280)
BSS Area:                  0x81BB3E90 - 0x81BB45D0 (1856)
Local Heap:                0x81BB45D0 - 0x81FB45D0 (4194304)
Stack Area:                0x81FB45D0 - 0x81FB65D0 (8192)
Text (code) segment:       0x81FB65E0 - 0x81FFFFB0 (301520)
Boot area (physical):      0x01B70000 - 0x01BB0000
Relocation Factor:         I:E23B65E0 - D:01BB0280

configure vlans
*****************************************************************
*********************** VLAN Driver initial  ********************
*****************************************************************
Process LAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add LAN port

Process WAN port(2-5) vlan Architecture...
SUCCESS: trying to create VLAN 0 for switch
SUCCESS: trying to add WAN port
SUCCESS: enable ports  success
configure vlans...done
Device eth0:  hwaddr 00-09-5B-F7-0D-34, ipaddr 10.140.2.220, mask 255.255.255.0
        gateway 10.140.2.219, nameserver 212.23.8.1
Loader:elf Filesys:raw Dev:eth0 File:doc0:flash0.os: Options:(null)
***************************
****  MAC Client V1.0  ****
***************************
et0macaddr value :flag =0 value=00-09-5b-f7-0d-34
et1macaddr value :flag =0 value=00-09-5b-f7-0d-35
MAC exist at least one
system ethernet mac exist and not default....
Skip mac client process.....
Loading: Failed.
Could not load flash0.os:: File not found
CFE>

The exception is worrying as I assume that's after the entry point of the kernel. Does this mean my kernel is corrupted? How do I tell?
If it is, how can I reflash it given that I can't get networking to work from within CFE?

Any ideas apprecaited!!!

Cheers.

The program is invalid.

Try reflashing; check the md5sum on your image before you flash it. If you get the same thing, try rebuilding.

How did you reflash? Via mtd, use the .trx; via TFTP, use the .bin.

Good luck,

- Yasha

P.S. I've also had this before: invalid checksum on the image.. reflashed with proper image: that fixed it.

How do you get to the CFE command line?  Is a serial cable all that's necessary?  Does CFE drop to a command line prompt if it detects a serial connection when it starts up?

Hold Ctrl+C on your serial console while booting, and CFE will drop to the command line. This is in the WGT documentation on the wiki.

Ah, thanks.  Yeah I found it buried in the wiki since I posted the question.

Thanks flyashi.

It did indeed work however, the thing that was confusing me was ping. Ping didn't work for me in CFE mode and therefore by diagnosis never arrived at the flashing stage.

Know I know that, all is well! :-)

Regards,
Hovis

The discussion might have continued from here.