Firmware upgrade not working in OpenWRT GUI (XWRT)

12 posts / 0 new
Last post
achilles
achilles's picture
Firmware upgrade not working in OpenWRT GUI (XWRT)

Hi all,

I have just added the GUI feature (Xwrt) to my OpenWRT environment and found that firmware upgrade is not working here ....

I have started debugging this but it would be very helpful if anybody could tell me why is this happening and how to solve it ....

I am working first time with with Xwrt so any input is appreciated ...

Thnx in advance ,

 

achilles
achilles's picture
Well ... After some debugging

Well ... After some debugging I found out that Xwrt expects a trx file for f/w upgrade while I was trying with a .chk file needed by WGR614L ....
after some changes in the code I am able to give a .chk image for f/w upgrade ...but now with this image reboot is not happening properly and I m getting checksum error ....
Could anybody plz shed some light on this issue ....

bzing2
bzing2's picture
Sounds like your falling fowl

Sounds like your falling fowl of the "magic checksum"!

Normally in these pieces of kit you would assume that the checksum is carried in the TRX. Unfortunately Netgear have chosen to place another checksum at another (badly chosen) location in Flash. Take a look at the following.

http://www.myopenrouter.com/article/10636/Unmasking-the-NETGEAR-WGR614L-...

You probably want to also take a look at netgear flash utility. This tool allows you to manipulate the "magic checksum". You can use it in your boot scripts to fix the checksum after an upgrade. Also, and more importantly, you can override "platform-upgrade" in OpenWRT to ensure that the checksum is correctly set before a reboot!

http://www.myopenrouter.com/download/10634/Improved-Flash-Utility-for-WG...

If your trying to get OpenWRT working take a look at the following. Adding X-WRT to it should be a matter of editing feeds.conf in trunk (there is a default file) and then using trunk/scripts/feeds to pull in the bits, ie x-WRT, that you want. Basically its trivial!

http://www.myopenrouter.com/download/10652/OpenWRT-WGR614L-Bleeding-Edge...

Hope that helps!

bzing2
bzing2's picture
Oh, I should point out that

Oh, I should point out that the OpenWRT WGR614L "Bleeding Edge" Environment has all of the above patches and tools installed. This means that if you do an upgrade from the command line it will work correctly (this is what x-wrt essentially does).

(ps I just dropped a new one, not that I have tested it, I don't have time!)

achilles
achilles's picture
thnx for ur reply bzing2 ....

thnx for ur reply bzing2 .... I will look into ur suggestions ... If still there z any pblm I will let u people know ....

achilles
achilles's picture
Finally I am able to solve

Finally I am able to solve the checksum problem .... I took some help from corresponding code in tomato and now with openwrt also firmware upgrade is working for me .... :)

bzing2
bzing2's picture
I would be interested to know

I would be interested to know what you have done. I created the ngr-flash tool to help with upgrading things on the fly. It can also be done the OpenWRT way by interfacing with its platform specific handles for upgrading (it overrides the platform_do_upgrade function by placing a file in /lib/upgrade).

achilles
achilles's picture
bzing2 said: I would be

bzing2 said: I would be interested to know what you have done. I created the ngr-flash tool to help with upgrading things on the fly. It can also be done the OpenWRT way by interfacing with its platform specific handles for upgrading (it overrides the platform_do_upgrade function by placing a file in /lib/upgrade).

I changed mtd.c file under build_dir/linux_xxx/mtd/mtd.c ....

Basically I observed that in openwrt mtd_write was expecting a trx file but it was not writing the checksum at the end which is being done in case of Tomato .....

So I modified mtd_write function a bit to include those changes ....

I will try this stuff with ur tool also ....  BTW I m trying to upload my chk builds for NA and WW versions .....

Do let me know if I wz able to clarify my activity .....

bzing2
bzing2's picture
Ok, I understand...

Ok, I understand...

I had considered doing the same; however, the side effect is that the kernel source is sepcialised to the WGR614L. I chose not to do it that way as I wanted to push my changes back into OpenWRT. I was sure that the patches would be rejected as they would not work on all platforms (there is probably a way around this however, in the per-platform patching parts). Anyway, and aside!

Good luck creating some CHK images, they have been sadly absent from this site! I avoided creating any as I didn't want the responsibility for maintaining them...

achilles
achilles's picture
Yep ... these fixes r not

Yep ... these fixes r not generic ... I will try to utilize ur tool so that we have a generic fix ....
Will let u know once I start doing this and face any prblm ...

achilles
achilles's picture
Yep ... these fixes r not

Yep ... these fixes r not generic ... I will try to utilize ur tool so that we have a generic fix ....
Will let u know once I start doing this and face any prblm ...

bzing2
bzing2's picture
OK, let me know how you get

OK, let me know how you get along. As I said you may want to look at the stuff in /lib/upgrade. Have a look at package/ngr-flash in my tree, you should just be able to drop that in an it will do what you want.