WGR614 flash recovery

38 posts / 0 new
Last post
VVV
VVV's picture
Fmay said:  Something at this

Fmay said:  Something at this part causes BUG
if ( (nvram_match("boardnum", 8) || nvram_match("boardnum", 01) )
&& nvram_match ("boardtype", "0x0472")
&& nvram_match ("cardbus", "1") )

I Guess, these 8 and 01 must be in doublequotes: "8" and "01" respectively.

 

bzing2
bzing2's picture
1) My version of bcm947xx

1) My version of bcm947xx-flash.c has NO references to nvram_match.
2) The packet tool is broken! Check the header length field its zero.

As I said in previous postings; I have fixed all these problems, and the solutions are available in my build environment. Which your clearly not using as 1) you have a different version of bcm947xx-flash.c and 2) your using the packet tool.

I am sorry, but I cannot help you...

bzing2
bzing2's picture
You using a 64 bit machine

You using a 64 bit machine are you not! That header makes sense if a "unsigned long" is 8 bytes and not 4 bytes. If my mkchkimg tool has the same problem let me know.

Fmay
Fmay's picture
Bzing2,

Bzing2,

Excuse me for the confusion.

I was working with another bcm947xx-flash.c and with your contribution, you are right, it has not this part at the source. I was reviewing your original contribution and it is OK. However, the CHK problem persist with mkchkimg command, the hexdump has the same result "for me".

Thanks a lot.

bzing2
bzing2's picture
Try changing any occurances

Try changing any occurances of "unsigned long" to "uint32_t" in mkchkimg.c

Fmay
Fmay's picture
Solved with uint32_t, Thanks

Solved with uint32_t, Thanks again!!!

hexdump -C -n 58 bin/openwrt-wgr614l-squashfs-na.chk
00000000 2a 23 24 5e 00 00 00 3a 02 01 01 63 00 00 00 00 |*#$^...:...c....|
00000010 10 46 95 2d 07 dd 03 29 00 22 00 00 00 00 00 04 |.F.-...)."......|
00000020 6c d9 98 56 04 6b 0a a3 55 31 32 48 30 37 32 54 |l..V.k..U12H072T|
00000030 30 30 5f 4e 45 54 47 45 41 52 |00_NETGEAR|
0000003a

bzing2
bzing2's picture
Congratulations on finding

Congratulations on finding the first bug ;) I have now added a patch so with any luck no one else should suffer for having nice shiny 64bit kit.

Pages