@tmo26
the SoC does not matter. Both are supported from openwrt and also inside the image.
@all
I got the device, soldered serial connectors on it and i am nearly done with basic support. Nearly means: u-boot is blocking my propper image and i dont understand why.
From the beginning:
First i checked the oem firmware file with a hex editor.
device:WNR2000v5
version:V1.0.0.34
region:
hd_id:29764648+4+0+32+2x2+0
Then i read out the serial information:
hey, its already running openwrt...
...
Image Name: MIPS OpenWrt Linux-2.6.31
...
...
Kernel command line: rootfstype=squashfs console=ttyS0,115200 mem=32M board=WNR2000V5 mtdparts=ath-nor0:128k(u-boot)ro,832k(kernel),2752k(rootfs),128k(language),64k(pot),64k(traffic_meter),64k(config),64k(a)
...
...
9 cmdlinepart partitions found on MTD device ath-nor0
Creating 9 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x0000000f0000 : "kernel"
0x0000000f0000-0x0000003a0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=3A0000, len=0
0x0000003a0000-0x000000400000 : "rootfs_data"
0x0000003a0000-0x0000003c0000 : "language"
0x0000003c0000-0x0000003d0000 : "pot"
0x0000003d0000-0x0000003e0000 : "traffic_meter"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"
0x000000020000-0x0000003a0000 : "firmware"
u32 classifier
Performance counters on
Netfilter messages via NETLINK v0.30.
...
Then i took those values and added them while creating a openwrt image. I used the profile for the wnr2000v3 because it was most simple for me.
I modified following lines:
...
wnr2000v3_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,3904k(firmware),64k(art)ro
...
...
$(eval $(call SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303035,WNR2000V5,"" NA,-H 29764648+4+0+32+2x2+0))
...
After that the image get accepted from the oem installer and the device rebooted:
FILE: /tmp/uhttp-upgrade.img is download successfully!
dd: writing '/tmp/tmp11': No space left on device
1+0 records in
0+0 records out
Writing Image [## ] 8%Sending discover...
Writing Image [####### ] 28%Sending discover...
Writing Image [######### ] 36%sh: /www/cgi-bin/uhttpd.sh: not found
Writing Image [############ ] 48%Sending discover...
Writing Image [#########################] 100%sh: /sbin/ledcontrol: not found
Saving Data... Done!
Sending discover...
Restarting system.
Ok, great, i thought i am done. But then u-boot told:
...
Retry count exceeded; boot the image as usual
nmrp server is stopped or failed !
Bad Magic Number
Trying eth0
eth0 link down
FAIL
Trying eth1
The Router is in TFTP Server Firmware Recovery mode NOW!
Listening on Port : 69, IP Address: 192.168.1.1...
...
The magic is correct so far. Its 0x32303035 and its written into the first bytes of the file. Thats why the updater have accepted the image.
Ok, lets write with tftp the self made openwrt image again:
Rcv:
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
..........................................
Done!
Bytes transferred = 3539077 (360085 hex)
Bad Magic Number,it is forbidden to be written to flash!!
Trying eth0
eth0 link down
FAIL
Trying eth1
The Router is in TFTP Server Firmware Recovery mode NOW!
Listening on Port : 69, IP Address: 192.168.1.1...
???
Can someone help me? What magic does u-boot check?