OpenWrt Forum Archive

Topic: flash impossible on wrt54gl

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

Hello i have a problem to flash my router wrt54gl. Yesterday i flash my router with the firmware kamikaze 8.09 (brcm-2.4) and now i can't flash with an other firmware because i have a error message  "The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform." I need help. thank you.

What other firmware are you trying to flash?

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

If you want to change to another version of OpenWRT you need to download and flash the version that comes in a .trx file. This is the header-less version.

Hope this helps. If you have any more questions feel free to ask.

Velda2 wrote:

What other firmware are you trying to flash?

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

If you want to change to another version of OpenWRT you need to download and flash the version that comes in a .trx file. This is the header-less version.

Hope this helps. If you have any more questions feel free to ask.

For flash the new openwrt version into my router, do I need serial console to my router? I could have this situation in the future:

I could compile another openwrt with more packages included. So I will need flash the new openwrt firmware into the router. I have been using DD-WRT for a long time and always use the GUI to load the new firmware into the router. For openwrt, I don't know it's possible in its CLI to flash the new firmware. Please clarify. Thanks a lot.

Lou

madmatrix wrote:
Velda2 wrote:

What other firmware are you trying to flash?

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

If you want to change to another version of OpenWRT you need to download and flash the version that comes in a .trx file. This is the header-less version.

Hope this helps. If you have any more questions feel free to ask.

For flash the new openwrt version into my router, do I need serial console to my router? I could have this situation in the future:

I could compile another openwrt with more packages included. So I will need flash the new openwrt firmware into the router. I have been using DD-WRT for a long time and always use the GUI to load the new firmware into the router. For openwrt, I don't know it's possible in its CLI to flash the new firmware. Please clarify. Thanks a lot.

Lou

First, don't hijack someone elses post. It's rude.

The basic installation instructions can be found here, in the wiki.
On most routers you can download the firmware directly from the CLI with something like:

wget http://www.somesite.com/firmware.trx -O /tmp/firmware.trx

and then flash it with the following command

mtd -r write /tmp/firmware.trx linux

Do not use the above commands on a firmware that has a header, strip it off first.

Hi, i have a wrt54gl too. In Kamikaze 8.09.1 2.6 kernel nvram is not present. How I can set the boot wait to flash via tftp? I tried to search for, but I could not find something about.
Thanks a lot.

(Last edited by eryter on 19 Aug 2009, 11:33)

Velda2 wrote:
madmatrix wrote:
Velda2 wrote:

What other firmware are you trying to flash?

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

If you want to change to another version of OpenWRT you need to download and flash the version that comes in a .trx file. This is the header-less version.

Hope this helps. If you have any more questions feel free to ask.

For flash the new openwrt version into my router, do I need serial console to my router? I could have this situation in the future:

I could compile another openwrt with more packages included. So I will need flash the new openwrt firmware into the router. I have been using DD-WRT for a long time and always use the GUI to load the new firmware into the router. For openwrt, I don't know it's possible in its CLI to flash the new firmware. Please clarify. Thanks a lot.

Lou

First, don't hijack someone elses post. It's rude.

The basic installation instructions can be found here, in the wiki.
On most routers you can download the firmware directly from the CLI with something like:

wget http://www.somesite.com/firmware.trx -O /tmp/firmware.trx

and then flash it with the following command

mtd -r write /tmp/firmware.trx linux

Do not use the above commands on a firmware that has a header, strip it off first.

Thanks a lot. Your answer is really helpful.

I will never hijack the other one's post. Thanks for the reminder. :-)

Lou

I have a question is it possible to flash the router with this solution but with a firmware .bin?

tono25 wrote:

I have a question is it possible to flash the router with this solution but with a firmware .bin?

Yes. I addressed that here.

Velda2 wrote:

Download the firmware (.bin) then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

Since i flash with the firmware .trx i don't configure the wifi.

I test with teh hex editor and flash the router but i have alwys the same problem i can't configure my wifi and i test in text mode with command line nvram... but it's don't work. If you have an idea? Thank you velda2 for your responses and excuse me for my nasty english but i'm french.

eryter wrote:

Hi, i have a wrt54gl too. In Kamikaze 8.09.1 2.6 kernel nvram is not present. How I can set the boot wait to flash via tftp? I tried to search for, but I could not find something about.
Thanks a lot.

I think that you should flash the 2.4 version first in order to set boot wait via serial cable.

Velda2 wrote:

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

Sorry for reviving this nearly dead post but it saved my skinny ass. Thanks for clarifying this.

mokum wrote:
Velda2 wrote:

If you want to go back to the manufactures firmware try this. Download the firmware then open it in a hex editor and trim the first 32 bytes (0x20h) from the file. After you do this the first line should be 'HDR0' (or 48 44 52 30h). Do not flash the firmware if this doesn't match.

The reason for this is, the original Linksys firmware uses a 32 byte header. OpenWRT does not need or want this header, so you simply trim it off.

Sorry for reviving this nearly dead post but it saved my skinny ass. Thanks for clarifying this.

same here, thanks! smile

Do you know if the TFTP mode is still there?

If so you can flash it with stock firmware and restart the process.

The discussion might have continued from here.