Technically not an OpenWrt question, but I was trying to revive an old RT5350 board and it did only accept an image less than 4MB in size over uboot tftp.
I am willing to update the uboot to accept 8MB (which is the flash size), but I can’t find where the 4MB is (hard?) coded into uboot.
Anyone who can point me in the right direction?
Work around now: flash in old OpenWrt image and do a sysupgrade after. Not ideal for development when I “F” it up.
I don't think there is an arbitrary such hard limit anywhere. Most likely it is rather a clash in addresses where you are trying to load it into in RAM. What exactly is the output you are getting when it fails?
*** init button is pressed
NetTxPacket = 0x81FE62C0
KSEG1ADDR(NetTxPacket) = 0xA1FE62C0
NetLoop,call eth_halt !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
TFTP server is available now.
Got ARP REQUEST, return our IP
start to receive image...
Verifying Checksum ... OK
Image size is too large!
TFTP: Checksum error
If I use an image less than 4MB it works just fine.
start to receive image...
Verifying Checksum ... OK
*** Upgrade system code. ***
imgSize = 3932342 bytes (0x003C00B6).
start to erase sectors & write image...
..................................
continues flashing then reboots as expected. Boot log shows correct Flash