aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-04-12 21:21:44 +0000
committerJohn Crispin <blogic@openwrt.org>2014-04-12 21:21:44 +0000
commit9f3447fc0e3c5933c2b215bb6298b525404f0283 (patch)
tree5e8d333f3a693f3ddde5c49841adebe08fff9845
parentf1d12e3ba1015149b9a010723d6528fd35fcbcc8 (diff)
downloadupstream-9f3447fc0e3c5933c2b215bb6298b525404f0283.tar.gz
upstream-9f3447fc0e3c5933c2b215bb6298b525404f0283.tar.bz2
upstream-9f3447fc0e3c5933c2b215bb6298b525404f0283.zip
Don't try to generate whr-g300n image if it's going to be more than 4M
Signed-off-by: Roman Yeryomin <roman@advem.lv> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40489 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ramips/image/Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index c6a42ad8e7..63f7425a9e 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -456,13 +456,15 @@ define BuildFirmware/WHRG300N/squashfs
$(call BuildFirmware/Default4M/$(1),$(1),whr-g300n,WHR-G300N)
# the following line has a bad argument 3 ... the old Makefile was already broken
$(call BuildFirmware/Buffalo,$(1),whr-g300n,whr-g300n)
- ( \
- echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
- dd bs=512 count=1 conv=sync; \
- dd if=$(call sysupname,$(1),whr-g300n); \
- ) > $(KDIR)/whr-g300n-tftp.tmp
- buffalo-tftp -i $(KDIR)/whr-g300n-tftp.tmp \
- -o $(call imgname,$(1),whr-g300n)-tftp.bin
+ if [ -e "$(call sysupname,$(1),$(2))" ]; then \
+ ( \
+ echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
+ dd bs=512 count=1 conv=sync; \
+ dd if=$(call sysupname,$(1),whr-g300n); \
+ ) > $(KDIR)/whr-g300n-tftp.tmp && \
+ buffalo-tftp -i $(KDIR)/whr-g300n-tftp.tmp \
+ -o $(call imgname,$(1),whr-g300n)-tftp.bin; \
+ fi
endef
BuildFirmware/WHRG300N/initramfs=$(call BuildFirmware/OF/initramfs,$(1),whr-g300n,WHR-G300N)
Image/Build/Profile/WHRG300N=$(call BuildFirmware/WHRG300N/$(1),$(1))