I thought maybe something was wrong with the LZMA arguments but after comparing them to an older LEDE image which works, it's not that - they're the same. So maybe it really does have to do with not enough space. See this binwalk of the latest OpenWRT released build:
- Code: Select all
elijah@elijah-Latitude-E6520:~/projects/vocorev1/openwrt$ binwalk ~/Downloads/openwrt-22.03.2-ramips-rt305x-vocore_vocore-16m-squashfs-sysupgrade.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0xD690C403, created: 2022-10-14 22:44:41, image size: 1629312 bytes, Data Address: 0x80000000, Entry Point: 0x80000000, data CRC: 0x8EB6FF66, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "MIPS OpenWrt Linux-5.10.146"
64 0x40 LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 5439347 bytes
977256 0xEE968 MySQL ISAM index file Version 4
1629376 0x18DCC0 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 3481446 bytes, 1349 inodes, blocksize: 1048576 bytes, created: 2022-10-14 22:44:41
Uncompressed size is > 5MB
The original uboot source has been lost, so I started looking through noblepepper's uboot - it should be similar. The boot process happens in this file:
https://github.com/noblepepper/ralink_s ... md_bootm.c Notice that it copies the compressed kernel image from SPI flash into memory at CFG_SPINAND_LOAD_ADDR 0x80500000. The image is uncompressed at 0x80000000, leaving 5 MB of space max for the uncompressed image before it starts overwriting the compressed image.
That's my best guess for now - so maybe it would be possible to rebuild uboot and redefine CFG_SPINAND_LOAD_ADDR a few MB up higher?