Changeset 11662


Ignore:
Timestamp:
2008-07-05T15:38:19+02:00 (8 years ago)
Author:
florian
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/rdc/image/Makefile

    r11594 r11662  
    4848        cat $(KDIR)/bzSize.tmp $(KDIR)/bzImage $(KDIR)/root.$(1).gz >> $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img 
    4949        $(RM) $(KDIR)/bzSize.tmp $(KDIR)/bzSize $(KDIR)/rdSize 
     50        if [ `ls -l $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img | sed -r 's/^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+([^[:blank:]]+).+$$$$/\1/'` -gt $$$$((0xffff0000-0xffe08000)) ]; then mv $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img $(BIN_DIR)/openwrt-$(BOARD)-$(1)-$(2).img.too_big; echo "#ERR image too big"; fi  
    5051endef 
    5152 
Note: See TracChangeset for help on using the changeset viewer.