Failed to ramdisk-boot OpenWrt 21.02.1 on WNDR4300v1

I performed sysupgrade from 19.07.7 to 21.02.1 and encountered this warning. I regret for ignoring such warning - the device then bricked because of exactly the reason discussed there: kernel partition size mismatch.

I then managed to build OpenWrt 21.02.1 in order to do a ramdisk-boot. However it didn't succeed.

Part of serial console output:

U-Boot 1.1.4 (Jun 28 2012 - 10:12:47)

...

ar7240> tftpboot 80800000 wndr4300sw.bin
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.1.7; our IP address is 192.168.1.1
Filename 'wndr4300sw.bin'.
Load address: 0x80800000
Loading: #################################################################

...

ar7240> bootm
## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-5.4.154
   Created:      2021-10-24   9:01:35 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    5297454 Bytes =  5.1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... ERROR: LzmaDecode.c, 547

Decoding error = 1
LZMA ERROR 1 - must RESET board to recover

tried reinstalling 19.07, or is 21.02 a must ?

You have the answer in this thread ... from yesterday

Using 80800000 as the load address will crash because this is the same area of RAM that the uncompressed kernel will occupy. As decompression proceeds, the compressed image gets overwritten before it is finished.

Use an address of 82000000 instead. This is 32 MB past the start of the physical RAM-- since the 4300 has 128 MB of RAM that is a safe area.

Also, prebuilt initramfs images can be downloaded from the snapshots server, for debricking there is usually no need to build your own.

2 Likes

Thanks. Got it working.

It also turned out to be WNDR4300SW instead of WNDR4300, which explains why TFTP recovery didn't work - uboot refused to proceed because model ID mismatched.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.