aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-05 12:47:53 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-05 12:47:53 +0000
commit8a3a60fc643c8630752e56e2ce9332b128e138e5 (patch)
tree38fd0b22b9be1a441862567b76cfe2524acbaedb /target/linux
parentd3d91930d167026e95d3e792b0a188c24555c809 (diff)
downloadupstream-8a3a60fc643c8630752e56e2ce9332b128e138e5.tar.gz
upstream-8a3a60fc643c8630752e56e2ce9332b128e138e5.tar.bz2
upstream-8a3a60fc643c8630752e56e2ce9332b128e138e5.zip
ar71xx: allow WNDR3700 image creation to fail if kernel/rootfs too big
SVN-Revision: 29431
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/image/Makefile34
1 files changed, 16 insertions, 18 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 411fd16296..32c1b24c17 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -384,26 +384,24 @@ define Image/Build/Netgear
if [ `stat -c%s '$(KDIR)/vmlinux-$(2).uImage.squashfs'` -gt \
`cat '$(KDIR)/$(2)_kernel_maxsize'` ]; then \
echo "$(KDIR)/vmlinux-$(2).uImage.squashfs is too big" >& 2; \
- false; \
- fi
- if [ `stat -c%s '$(KDIR)/root.$(1)'` -gt \
+ else if [ `stat -c%s '$(KDIR)/root.$(1)'` -gt \
`cat '$(KDIR)/$(2)_rootfs_maxsize'` ]; then \
echo "$(KDIR)/root.$(1) is too big" >& 2; \
- false; \
- fi
- ( \
- set -e; \
- dd if=$(KDIR)/vmlinux-$(2).uImage.squashfs \
- bs=`cat '$(KDIR)/$(2)_kernel_maxsize'` conv=sync; \
- dd if=$(KDIR)/root.$(1) bs=64k; \
- ) > $(call sysupname,$(1),$(2))
- for r in $(7) ; do \
- [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
- $(STAGING_DIR_HOST)/bin/mkdniimg \
- -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
- -i $(call sysupname,$(1),$(2)) \
- -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
- done
+ else \
+ ( \
+ set -e; \
+ dd if=$(KDIR)/vmlinux-$(2).uImage.squashfs \
+ bs=`cat '$(KDIR)/$(2)_kernel_maxsize'` conv=sync; \
+ dd if=$(KDIR)/root.$(1) bs=64k; \
+ ) > $(call sysupname,$(1),$(2)); \
+ for r in $(7) ; do \
+ [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
+ $(STAGING_DIR_HOST)/bin/mkdniimg \
+ -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
+ -i $(call sysupname,$(1),$(2)) \
+ -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
+ done; \
+ fi; fi
endef
define Image/Build/Netgear/initramfs