OpenWrt Forum Archive

Topic: Help with how to flash Broadcom router

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

So I have a no-name chinese router with a BCM4706 I want to experiment with but I have no idea how to flash openwrt on to it!

I have a serial port attached and can ctrl-C to get to the CFE prompt.  From there I have the following commands available:

CFE> help
Available commands:

show clocks         Show current values of the clocks.
nvram               NVRAM utility.
reboot              Reboot.
flash               Update a flash memory device
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
help                Obtain help for CFE commands

For more information about a command, enter 'help command-name'
*** command status = 0

So I have tried about everything I can think of without any success, and can't find much documentation.  I have a valid/working tftp server up, but issuing the following command just hangs:

CFE> ifconfig eth0 -addr=192.0168.100.237
Device eth0:  hwaddr C8-3A-35-40-C1-A8, ipaddr 192.168.100.237, mask 255.255.255.0
        gateway not set, nameserver not set
*** command status = 0
CFE> boot -raw 192.168.100.161:openwrt-squashfs.bin
Loader:raw Filesys:tftp Dev:eth0 File:192.168.100.161:openwrt-squashfs.bin Options:(null)
Loading:

Anybody have any wisdom they can pass along?

(Last edited by humanus.contemno on 20 Jan 2013, 23:43)

Is this just a stupid noob question or am I not supplying enough info for this to have a definitive answer?  I assumed that you all had done this a million times already.

Just off the top of my head.. Since you're using boot (instead of flash), did you try using a ramdisk image instead of a squashfs image? I'm not sure since I haven't checked the downloads section (I have a router that isn't officially supported yet and requires compiling from source).. you might have to compile from source to get the ramdisk image, I know it's an option when you 'make menuconfig'.

Thanks Stevenh for the reply but that particular example I gave was just one example of not getting this thing to do anything.

However... I have been able to gain access to the root login so I have the following info on this thing:

# cat /proc/partitions
major minor  #blocks  name

  31     0       8192 mtdblock0
  31     1        128 mtdblock1
  31     2       7616 mtdblock2
  31     3        320 mtdblock3
  31     4         64 mtdblock4
  31     5         64 mtdblock5

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00800000 00010000 "All"
mtd1: 00020000 00010000 "Bootloader"
mtd2: 00770000 00010000 "KernelFS"
mtd3: 00050000 00010000 "WebFS"
mtd4: 00010000 00010000 "CFM"
mtd5: 00010000 00010000 "nvram"

So at this point I am trying to figure out how to move a .bin file to the router and then erase and write it to flash. 

Can this be done through the linux command line or am I back trying to figure out what CFE command to issue to make this work?

So I suppose that this was just too much of a noob question for anyone to answer... so I'll post the answer I came up with in case anyone else runs across it.

To flash openwrt to a generic Broadcom router:

CFE> flash -noheader <tftp server address>:openwrt-brcm-2.4-squashfs.trx flash1.trx

And thats really all there is to it.  This information is probably somewhere in the wiki but I couldn't seem to find it.

How can i help Broadcom?

drug testing

(Last edited by Sabbir3223 on 20 Mar 2013, 16:16)

The discussion might have continued from here.