Sysupgrade out of memory (wndr3300v1 a 4/16 device)

Hi,

I found a wndr3300v1 lying in the closet a while ago, and decided to see if I can get anything useful out of it.

I custom built an image with current master head stripping away most of everything but included sqm-scripts, htop and bmon on it getting a ~3.3M image with custom configs built in.

Flashing from stock it actually worked and rebooted into a working LEDE environment. I benchmarked it and found it can do ~58Mbps as a transparent sqm bridge device (no nat firewall etc).

However, when I tried to download a new firmware image on /tmp it rebooted. Later I unloaded most kmods and kill most processes and managed to issue a sysupgrade command, however it went out of memory (I assume) and reboot. Firmware partition is still intact with original lede firmware so I can get back in.

Are there any ways of getting sysupgrade to work? One way that I was thinking of:

Suppose mtd/dd uses less memory than sysupgrade, perhaps using mtd/dd to write directly to firmware partition may work?

Another way - is it possible to pipe the image from wget so that it doesn't occupy the device's memory?

Thanks.

You are talking about a device with only 16 MB of RAM. There are already warnings about 32 MB RAM devices, so you are likely of out luck.

Flashing requires you to have the firmware either on flash or RAM.

Many Netgear devices have a TFTP recovery mode in the u-boot bootloader, so if that exists in you device, you might be able to avoid booting Linux at all. (see e.g. WNDR3700 wiki pages)

Yes, I used

mtd erase firmware

to force the device in tftp mode and managed to flash new openwrt image on it. I was looking to see if there are alternative solution :slight_smile:

Specifically if it is possible for sysupgrade/dd/mtd to accept pipe from wget so that the firmware image doesn't need to be on the device's memory when it is flashing, which should buy ~3.3 mb of additional memory.

Per @hnyman:

Also see: Sysupgrade via URL - #5 by jow. It explains why upgrading via URL is not currently available in software.