OpenWrt Forum Archive

Topic: wgt634u flash help

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

i have a wgt634u with an old embedded linux distro on it (old MIT roofnet firmware). i want to flash the kamikaze image to it. i dont have a serial console but i have a static version of mtd and the openwrt-brcm-2.4-squashfs.trx (1.6MB) in /tmp/ of the device.

what im not sure about is the MTD arrangement and which partition to write to.

WGT634U: -root-
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00060000 00020000 "cfe"
mtd1: 00020000 00020000 "config"
mtd2: 00140000 00020000 "linux"
mtd3: 00620000 00020000 "jffs"
mtd4: 00020000 00020000 "nvram"

the openwrt uninstall/upgrade docs say to write to 'linux' but the partition is not large enough (0x140000 = 1.3MB).

which is the correct partition?

Don

(Last edited by donpdonp on 11 Jun 2007, 03:12)

use the 2.6 kernel with "mtd -r write openwrt-brcm47xx-2.6-squashfs.trx linux", cause with the 2.4 you end up with a serial cable flashing 2.6 soon (read: 2.4 doesn't work).

i just tried it using the 2.6 image and got:
# ./mtd -e linux -r write openwrt-brcm47xx-2.6-squashfs.trx linux
Image too big for partition: linux
Image check failed.

can someone post the /proc/mtd of a working wgt634u with kamikaze?

Here's what I have under Kamikaze 7.06

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000a0000 00020000 "cfe"
mtd1: 00740000 00020000 "linux"
mtd2: 00690000 00020000 "rootfs"
mtd3: 00580000 00020000 "rootfs_data"
mtd4: 00020000 00020000 "nvram"

Not sure if that will help much as it seems yours is completely different. 

In the case of your output, I'm guessing mtd2 is either the kernel or squashfs and obviously mtd3 is jffs.  The way I see it, you have three choices:
1.  Build/hack a console cable.  Frankly the best advice I can give.
2.  Create an image that will fit into mtd2 by getting rid of packages you don't need.  Then once OpenWrt is installed and working you can run the command given earlier to flash a full image.
3.  Split the image to span mtd2 and mtd3 then let Kamikaze take over.

I'm no expert....just going by what I've done on other systems.  Don't attempt options 2 or 3 unless you know what you're doing!

Again, the best advise I can give is to make up a console cable.  Lots of good examples in this thread:  http://forum.openwrt.org/viewtopic.php?id=9603


Kamikaze 7.06 default package list:

base-files-brcm47xx-2.6 - 8-7431 - 
bridge - 1.0.6-1 - 
busybox - 1.4.2-1 - 
dnsmasq - 2.38-1 - 
dropbear - 0.49-1 - 
hotplug2 - 0.9-1 - 
iptables - 1.3.5-1 - 
kernel - 2.6.19.2-brcm47xx-1 - 
kmod-diag - 1+2.6.19.2-brcm47xx-1 - 
kmod-ipt-nathelper - 2.6.19.2-brcm47xx-1 - 
kmod-madwifi - 2.6.19.2+0.9.2.1-brcm47xx-1 - 
kmod-ppp - 2.6.19.2-brcm47xx-1 - 
kmod-pppoe - 2.6.19.2-brcm47xx-1 - 
kmod-switch - 2.6.19.2-brcm47xx-1 - 
libgcc - 4.1.2-8 - 
mtd - 5 - 
ppp - 2.4.3-7 - 
ppp-mod-pppoe - 2.4.3-7 - 
uclibc - 0.9.28-8 - 
udevtrigger - 106-1 - 
wireless-tools - 28-1 -

Try the following.  It might just fit in 1.3MB??

base-files-brcm47xx-2.6 - 8-7431 - 
bridge - 1.0.6-1 - 
busybox - 1.4.2-1 - 
dropbear - 0.49-1 - 
hotplug2 - 0.9-1 - 
iptables - 1.3.5-1 - 
kernel - 2.6.19.2-brcm47xx-1 - 
kmod-diag - 1+2.6.19.2-brcm47xx-1 - 
kmod-ipt-nathelper - 2.6.19.2-brcm47xx-1 - 
kmod-switch - 2.6.19.2-brcm47xx-1 - 
libgcc - 4.1.2-8 - 
mtd - 5 - 
uclibc - 0.9.28-8 - 
udevtrigger - 106-1 -

i could tell mtd to ignore the partition boundary and write to mtd2 but im not sure if that will work.
mtd2 is the raw kernel image. mtd3 is the jffs filesystem. i dont think the squashfs.trx file starts immeadiately with
the kernel image, does it?

The current mtd layout is described in 'Making Permanent Changes to the Flash' on this wiki page.
http://pdos.csail.mit.edu/roofnet/doku. … &s=mtd

im learning that the image is not that different from the stock WGT image.
it still has a web interface and firmware upload option. I tried sending the openwrt-brcm47xx-2.6-squashfs.trx
file via the web interface but it doesnt like it.

also your flashram total comes to about 14MB where as mine is 8MB.

The discussion might have continued from here.