OpenWrt Forum Archive

Topic: Possible problems when creating big firmwareq

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

Hi all,
I'm working on some firmware with everything I need compiled in. I ended with quite a big firmware - 4.75MiB. To build it I had to edit target/utils/src/trx.c source file (changed TRX_MAX_LEN to something close to 5MiB). I have GS devices with 8MiBs of FLASH memory thus the firmware should fit in.

The question is - where (what address) is located NVRAM part of the flash memory? Is there any possibility that I'll rewrite it with this firmware? And even if I would, would it brick my WRT?

Thanks in advance
Tosuja

The limit for flashing your router via TFTP is 3 MB.
You can install your big image with "mtd".
And mtd will only write or erase the partition you say. It will not erase your nvram.

I know about TFTP limit.
I was just curious about position of NVRAM in FLASH because I have found some error message in trx.c source code saying something like "Firmware too big, there is a danger of writing over NVRAM". I suspect that NVRAM part is last 32kB from FLASH and in this case everything is OK. I'll give it a try....

The discussion might have continued from here.