diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-17 21:29:33 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-17 21:29:33 +0100 |
commit | cac2cd65b190f7eb2b678886052621405d30e9de (patch) | |
tree | c00fee30f2297681c98fe4d9b0e4aed28449eac7 /target/ag241 | |
parent | ae9865fdf285cd9176cca74d4f9592ed75a0a1c4 (diff) |
check image size
Diffstat (limited to 'target/ag241')
-rw-r--r-- | target/ag241/Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/target/ag241/Makefile b/target/ag241/Makefile index abfaf7bef..e1c5b47a5 100644 --- a/target/ag241/Makefile +++ b/target/ag241/Makefile @@ -31,14 +31,17 @@ kernel-install: tools-compile ifeq ($(FS),squashfs) imageinstall: $(BIN_DIR)/$(ROOTFSSQUASHFS) - ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} $(BIN_DIR)/$(ROOTFSSQUASHFS) - @echo - @echo The image file is $(ROOTFSSQUASHFS) - @echo 'You can flash the image via tftp:' - @echo 'tftp 192.168.1.1' - @echo 'tftp> binary' - @echo "tftp> put $(ROOTFSSQUASHFS) upgrade_code.bin" - @echo 'Login as user root with password linux123 via ssh or console' + @if [ $$(stat --format=%s ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 4063233 ];then \ + echo 'Image is too big!'; \ + else \ + ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} $(BIN_DIR)/$(ROOTFSSQUASHFS); \ + echo The image file is $(ROOTFSSQUASHFS); \ + echo 'You can flash the image via tftp:'; \ + echo 'tftp 192.168.1.1'; \ + echo 'tftp> binary'; \ + echo "tftp> put $(ROOTFSSQUASHFS) upgrade_code.bin"; \ + echo 'Login as user root with password linux123 via ssh or console'; \ + fi endif ifeq ($(FS),nfsroot) |