In my novice opinion, we do not get detail initialisation process on the CFE. We just get a few more lines which especially do not tell us the detail about memory initialisation. And I think the only advantage to have the serial console is that we can have access to the CFE environment.
Anyway, I finally installed the serial console with the hope that I can enter some kind of CFE debug mode to get more information about memory initialisation. But here is what I got.
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: ¤G 3¤ë 1 16:49:41 CST 2005 (root@PaNLinux)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 1.3.2.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29007: 200MHz
Total memory: 0x4000000 bytes (64MB)
Total memory used by CFE: 0x80300000 - 0x80436F10 (1273616)
Initialized Data: 0x803313D0 - 0x80333760 (9104)
BSS Area: 0x80333760 - 0x80334F10 (6064)
Local Heap: 0x80334F10 - 0x80434F10 (1048576)
Stack Area: 0x80434F10 - 0x80436F10 (8192)
Text (code) segment: 0x80300000 - 0x803313D0 (201680)
Boot area (physical): 0x00437000 - 0x00477000
Relocation Factor: I:00000000 - D:00000000
Device eth0: hwaddr 00-15-F2-7E-9F-14, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Rescue Flag disable.
Reading :: TFTP Server.
Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3704 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU revision is: 00029007
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 4kB, 2-way, linesize 16 bytes.
Linux version 2.4.30 (mbm@reboot) (gcc version 3.4.4 (OpenWrt-1.0)) #1 Mon Nov 6 17:35:21 PST 2006
Setting the PFC value as 0x15
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5365 rev 1 at 200 MHz
Using 100.000 MHz high precision timer.
Calibrating delay loop... 199.47 BogoMIPS
Memory: 62836k/65536k available (1464k kernel code, 2700k reserved, 104k data, 84k init, 0k highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 0) is a 16550A
b44.c:v0.93 (Mar, 2004)
eth0: Broadcom 47xx 10/100BaseT Ethernet 00:15:f2:7e:9f:14
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0xda5f3
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x000bf400-0x001a0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x001a0000-0x003f0000 : "OpenWrt"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 332 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
Using /lib/modules/2.4.30/diag.o
diag: Detected 'ASUS WL-500g Deluxe'
Using /lib/modules/2.4.30/switch-core.o
Using /lib/modules/2.4.30/switch-robo.o
Probing device eth0: found!
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
Unlocking linux ...
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
init started: BusyBox v1.00 (2006.11.07-01:40+0000) multi-call binary
Please press Enter to activate this console. jffs2.bbc: SIZE compression mode activated.
PCI: Enabling device 01:03.0 (0004 -> 0006)
eth1: Broadcom BCM4320 802.11 Wireless Controller 3.90.37.0
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
device eth0 entered promiscuous mode
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
vlan0: dev_set_promiscuity(master, 1)
vlan0: dev_set_allmulti(master, 1)
device eth1 entered promiscuous mode
eth1: attempt to add interface with same source address.
br0: port 2(eth1) entering learning state
br0: port 1(vlan0) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
BusyBox v1.00 (2006.11.07-01:40+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
WHITE RUSSIAN (RC6) -------------------------------
* 2 oz Vodka Mix the Vodka and Kahlua together
* 1 oz Kahlua over ice, then float the cream or
* 1/2oz cream milk on the top.
---------------------------------------------------
root@OpenWrt:/#
root@OpenWrt:/#
root@OpenWrt:/#
root@OpenWrt:/# nvram show | sort
size: 806 bytes (31962 left)
boardnum=45
boardrev=0x10
boardtype=bcm95365r
boot_wait=on
clkfreq=200
dl_ram_addr=a0001000
et0macaddr=00:15:F2:7E:9F:14
et0mdcport=0
et0phyaddr=254
hardware_version=WL500gd-01-04-01-50
lan_ifname=br0
lan_ifnames=vlan0 eth1
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
lan_proto=static
os_flash_addr=bfc40000
os_ram_addr=80001000
pmon_ver=CFE 1.3.2.0
pppoe_ifname=
pppoe_ifnames=
regulation_domain=0X30DE
rescueflag=disable
reset_gpio=7
scratch=a0180000
sdram_config=0x32
sdram_init=0x2008
sdram_ncdl=0x2023e
sdram_refresh=0x0
vlan0hwname=et0
vlan0ports=1 2 3 4 5*
vlan1hwname=et0
vlan1ports=0 5
wan_device=vlan1
wan_ifname=vlan1
wan_ifnames=
wan_proto=dhcp
watchdog=5000
wifi_ifname=
wifi_ifnames=
wl0_ifname=eth1
wl0_infra=1
wl0_mode=ap
wl0_radio=1
wl0_ssid=OpenWrt
wl0id=0x4320
root@OpenWrt:/#
root@OpenWrt:/# nvram set sdram_ncdl=0
root@OpenWrt:/# nvram set sdram_init=0x2010
root@OpenWrt:/# nvram commit
root@OpenWrt:/#
root@OpenWrt:/# nvram show | sort
size: 799 bytes (31969 left)
boardnum=45
boardrev=0x10
boardtype=bcm95365r
boot_wait=on
clkfreq=200
dl_ram_addr=a0001000
et0macaddr=00:15:F2:7E:9F:14
et0mdcport=0
et0phyaddr=254
hardware_version=WL500gd-01-04-01-50
lan_ifname=br0
lan_ifnames=vlan0 eth1
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
lan_proto=static
os_flash_addr=bfc40000
os_ram_addr=80001000
pmon_ver=CFE 1.3.2.0
pppoe_ifname=
pppoe_ifnames=
regulation_domain=0X30DE
rescueflag=disable
reset_gpio=7
scratch=a0180000
sdram_config=0x32
sdram_init=0x2010
sdram_ncdl=0
sdram_refresh=0x0
vlan0hwname=et0
vlan0ports=1 2 3 4 5*
vlan1hwname=et0
vlan1ports=0 5
wan_device=vlan1
wan_ifname=vlan1
wan_ifnames=
wan_proto=dhcp
watchdog=5000
wifi_ifname=
wifi_ifnames=
wl0_ifname=eth1
wl0_infra=1
wl0_mode=ap
wl0_radio=1
wl0_ssid=OpenWrt
wl0id=0x4320
root@OpenWrt:/#
root@OpenWrt:/# reboot
root@OpenWrt:/#
The system is going down NOW !!
Sending SIGTERM to all processes.
Sending SIGKI
Please stand by while rebooting the system.
Restarting system.
Please stand by while rebooting the system...
That is all. Nothing more. My router is just plain dead after that. Whatever I did, nothing came up on the serial console. The interesting thing is that I could still ping the router. But I could not get to the firmware restoration mode, hence I could not re-flash it. I did this 3 times in a row and always get the same thing. I am not sure why it was not like this before. I had indeed bricked my router a few times but never like this, 3 times in a row.
The only way to unbrick it is by doing the nasty thing that I can not say here otherwise my post will be automatically deleted .
Now what? There is no CFE debug mode or something like that, or maybe the commands are hidden as I just got the followings.
CFE> help
Available commands:
rndis Broadcom USB RNDIS utility.
et Broadcom Ethernet utility.
nvram NVRAM utility.
reboot Reboot.
printdefault Display the environment default variables embeded in the bootloader
flash Update a flash memory device
autoboot Automatic system bootstrap.
batch Load a batch file into memory and execute it
go Verify and boot OS image.
boot Load an executable file into memory and execute it
load Load an executable file into memory without executing it
save Save a region of memory to a remote file via TFTP
ping Ping a remote IP host.
arp Display or modify the ARP Table
ifconfig Configure the Ethernet interface
unsetenv Delete an environment variable.
printenv Display the environment variables
setenv Set an environment variable.
help Obtain help for CFE commands
For more information about a command, enter 'help command-name'
*** command status = 0
CFE> printdefault
FLSH¸ 2
boardtype=bcm95365r
boardnum=45
boardrev=0x10
clkfreq=200
sdram_init=0x2008
sdram_config=0x32
sdram_refresh=0x0
sdram_ncdl=0x0
et0macaddr=00:15:F2:7E:9F:14
et0phyaddr=254
et0mdcport=0
dl_ram_addr=a0001000
os_ram_addr=80001000
os_flash_addr=bfc40000
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
scratch=a0180000
boot_wait=on
watchdog=5000
reset_gpio=7
hardware_version=WL500gd-01-04-01-50
regulation_domain=0X30DE
*** command status = 0
CFE>
CFE> printenv
Variable Name Value
-------------------- --------------------------------------------------
BOOT_CONSOLE uart0
CFE_VERSION 1.0.37
CFE_BOARDNAME BCM947XX
CFE_MEMORYSIZE 64
NET_DEVICE eth0
NET_IPADDR 192.168.1.1
NET_NETMASK 255.255.255.0
NET_GATEWAY 0.0.0.0
NET_NAMESERVER 0.0.0.0
STARTUP go;
*** command status = 0
CFE>
Do you guys know how to get the detail CFE initialisation process? Or do you have any other clues to get the RAM on WL500GD to 128MB? I really appreciate any hints. Thanks in advance.