Signed-off-by: Yousong Zhou <[email protected]>
---
target/linux/ar71xx/image/Makefile | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index 8234f88..3cfd4c1 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -177,12 +177,15 @@ define CatFiles
if [ `stat -c%s $(5)` -gt $(4) ]; then \
echo "Warning: $(5) is too big (> $(4) bytes)" >&2; \
rm -f $(5); \
+ exit 1; \
fi; \
else if [ $(2) -gt 262144 ]; then \
if [ `stat -c%s "$(1)"` -gt $(2) ]; then \
echo "Warning: $(1) is too big (> $(2) bytes)" >&2; \
+ exit 1; \
else if [ `stat -c%s $(3)` -gt $(4) ]; then \
echo "Warning: $(3) is too big (> $(4) bytes)" >&2; \
+ exit 1; \
else \
( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) > $(5); \
fi; fi; \
@@ -191,6 +194,7 @@ define CatFiles
if [ `stat -c%s $(5)` -gt $(4) ]; then \
echo "Warning: $(5) is too big (> $(4) bytes)" >&2; \
rm -f $(5); \
+ exit 1; \
fi; \
fi; fi
endef
@@ -663,13 +667,13 @@ define Image/Build/TPLINKOLD
dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
dd if=$(KDIR_TMP)/vmlinux-$(2).okli conv=sync; \
) > $(KDIR_TMP)/kernel-$(2).bin
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
-X 0x40000 \
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-o $(call factoryname,$(1),$(2))
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-X 0x40000 \
-k $(KDIR_TMP)/kernel-$(2).bin \
@@ -679,7 +683,7 @@ endef
define Image/Build/TPLINKOLD/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000,-initramfs)
- -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2)-initramfs.gz \
-o $(call imgname,$(1),$(2))-initramfs-uImage.bin
@@ -695,14 +699,14 @@ define Image/Build/TPLINK
dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
dd if=$(KDIR_TMP)/vmlinux-$(2).okli conv=sync; \
) > $(KDIR_TMP)/kernel-$(2).bin
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
-X 0x40000 \
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call factoryname,$(1),$(2))
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-X 0x40000 \
-k $(KDIR_TMP)/kernel-$(2).bin \
@@ -713,7 +717,7 @@ endef
define Image/Build/TPLINK/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000,-initramfs)
- -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2)-initramfs.gz \
-o $(call imgname,$(1),$(2))-uImage.bin
@@ -723,14 +727,14 @@ endef
Image/Build/TPLINK-LZMA/buildkernel=$(call PatchKernelLzma,$(2),$(3))
define Image/Build/TPLINK-LZMA
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) \
-X 0x40000 \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call factoryname,$(1),$(2))
- -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \
-X 0x40000 \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
@@ -741,7 +745,7 @@ endef
define Image/Build/TPLINK-LZMA/initramfs
$(call PatchKernelLzma,$(2),$(3),,-initramfs)
- -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \
-k $(KDIR_TMP)/vmlinux-initramfs-$(2).bin.lzma \
-o $(call imgname,$(1),$(2))-uImage.bin
--
1.7.2.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel