If the *.img file is larger than 0x1e8000 loading it with
flash -s 0x100000 -d 0xffe08000 -l <length>
on the bootloader prompt will destroy the bootloader and brick the device. The attached patch tries to implement a size check and renames the image into *.img.too_big. It applies to svn r11401.
Signed-off-by: Joerg Albert <jal2@…>