ar71xx: stop image building if a loader is missing
[openwrt.git] / target / linux / ar71xx / image / Makefile
index bd5e945..8fcaa08 100644 (file)
@@ -145,14 +145,14 @@ define Image/Build/DIR825B1
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                ( \
                        dd if=$(call sysupname,$(1),$(2)); \
-                       echo -n "01AP94-AR7161-RT-080619-00"; \
+                       echo -n "$(4)"; \
                ) > $(call imgname,$(1),$(2))-backup-loader.bin; \
                if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \
                        echo "Warning: $(call sysupname,$(1),$(2)) is too big"; \
                else \
                        ( \
                                dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
-                               echo -n "00AP94-AR7161-RT-080619-00"; \
+                               echo -n "$(5)"; \
                        ) > $(call factoryname,$(1),$(2)); \
                fi; \
        fi
@@ -195,7 +195,7 @@ define Image/Build/WHRHPG300N
 endef
 
 define Image/Build/Cameo
-       $(call MkuImageLzma,$(2),$(3) $($(4)))
+       $(call MkuImageLzma,$(2),$(3) $(4))
        $(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6))
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                ( \
@@ -206,14 +206,14 @@ define Image/Build/Cameo
        fi
 endef
 
-cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,896k(kernel),2944k(rootfs),64k(art)ro,3840k@0x30000(firmware)
+cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,960k(kernel),2880k(rootfs),64k(art)ro,3840k@0x30000(firmware)
 define Image/Build/Cameo913x
-       $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo913x_mtdlayout),917504,2949120,$(4))
+       $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo913x_mtdlayout),983040,2949120,$(4))
 endef
 
-cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,896k(kernel),2816k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware)
+cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,960k(kernel),2752k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware)
 define Image/Build/Cameo7240
-       $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo7240_mtdlayout),917504,2818048,$(4))
+       $(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo7240_mtdlayout),983040,2818048,$(4))
 endef
 
 define Image/Build/Ath
@@ -273,7 +273,7 @@ define Image/Build/UBNTXM
        $(call Sysupgrade/KRuImage,$(1),$(2),1048576,6684672)
        dd if=$(KDIR_TMP)/vmlinux-$(2).uImage of=$(KDIR_TMP)/vmlinux-$(2).uImage.bin bs=1024k conv=sync
        -$(STAGING_DIR_HOST)/bin/mkfwimage \
-               -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
+               -B $(4) -v $(5).$(6).v6.0.0-OpenWrt-$(REVISION) \
                -k $(KDIR_TMP)/vmlinux-$(2).uImage.bin \
                -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
                -o $(call factoryname,$(1),$(2))
@@ -299,6 +299,7 @@ define Image/Build/Planex/loader
 endef
 
 define Image/Build/Planex
+       [ -e "$(KDIR)/loader-$(2).gz" ]
        $(call MkuImage,gzip,,$(KDIR)/loader-$(2).gz,$(KDIR_TMP)/vmlinux-$(2).uImage)
        $(call MkuImageOKLI,$(2))
        ( \
@@ -338,6 +339,7 @@ define Image/Build/TPLINKOLD/loader
 endef
 
 define Image/Build/TPLINKOLD
+       [ -e "$(KDIR)/loader-$(2).gz" ]
        $(call MkuImageOKLI,$(2))
        ( \
                dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
@@ -368,6 +370,7 @@ define Image/Build/TPLINK/loader
 endef
 
 define Image/Build/TPLINK
+       [ -e "$(KDIR)/loader-$(2).gz" ]
        $(call MkuImageOKLI,$(2))
        ( \
                dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
@@ -698,6 +701,16 @@ define Image/Build/Profile/DIR600A1
        $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-600-a1,$(dir600a1_cmdline),"AP91-AR7240-RT-090223-00")
 endef
 
+dir601a1_cmdline=board=DIR-600-A1 console=ttyS0,115200
+define Image/Build/Profile/DIR601A1
+       $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-601-a1,$(dir600a1_cmdline),"AP91-AR7240-RT-090223-02")
+endef
+
+dir615e4_cmdline=board=DIR-615-E4 console=ttyS0,115200
+define Image/Build/Profile/DIR615E4
+       $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-615-e4,$(dir615e4_cmdline),"AP99-AR7240-RT-091105-05")
+endef
+
 eap7660d_cmdline=board=EAP7660D console=ttyS0,115200
 define Image/Build/Profile/EAP7660D
        $(call Image/Build/Template/$(fs_128k)/$(1),PB4X,eap7660d,$(eap7660d_cmdline))
@@ -771,22 +784,22 @@ endef
 
 ubntbulletm_cmdline=board=UBNT-BM console=ttyS0,115200
 define Image/Build/Profile/UBNTBULLETM
-       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-bullet-m,$(ubntbulletm_cmdline),XM,UBNTXM,ar7240)
+       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-bullet-m,$(ubntbulletm_cmdline),XM,XM,ar7240)
 endef
 
 ubntrocketm_cmdline=board=UBNT-RM console=ttyS0,115200
 define Image/Build/Profile/UBNTROCKETM
-       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-rocket-m,$(ubntrocketm_cmdline),XM,UBNTXM,ar7240)
+       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-rocket-m,$(ubntrocketm_cmdline),XM,XM,ar7240)
 endef
 
 ubntnanom_cmdline=board=UBNT-NM console=ttyS0,115200
 define Image/Build/Profile/UBNTNANOM
-       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-nano-m,$(ubntnanom_cmdline),XM,UBNTXM,ar7240)
+       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-nano-m,$(ubntnanom_cmdline),XM,XM,ar7240)
 endef
 
 ubntunifi_cmdline=board=UBNT-UF console=ttyS0,115200
 define Image/Build/Profile/UBNTUNIFI
-       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-unifi,$(ubntunifi_cmdline),XM,UBNTXM,ar7240)
+       $(call Image/Build/Template/$(fs_64k)/$(1),UBNTXM,ubnt-unifi,$(ubntunifi_cmdline),XM,XM,ar7240)
 endef
 
 define Image/Build/Profile/UBNT
@@ -887,6 +900,11 @@ define Image/Build/Profile/TLWR841
        $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK,tl-wr841nd-v7,$(tlwr841v7_cmdline),0x08410007,1,4M)
 endef
 
+tlwr842_cmdline=board=TL-MR3420 console=ttyS0,115200
+define Image/Build/Profile/TLWR842
+       $(call Image/Build/Template/$(fs_64kraw)/$(1),TPLINK,tl-wr842n-v1,$(tlwr842_cmdline),0x08420001,1,8M)
+endef
+
 tlwr941v2_cmdline=board=TL-WR941ND console=ttyS0,115200
 tlwr941v4_cmdline=board=TL-WR741ND console=ttyS0,115200
 define Image/Build/Profile/TLWR941
@@ -923,7 +941,12 @@ endef
 
 dir825b1_cmdline=board=DIR-825-B1 console=ttyS0,115200
 define Image/Build/Profile/DIR825B1
-       $(call Image/Build/Template/$(fs_64k)/$(1),DIR825B1,dir-825-b1,$(dir825b1_cmdline))
+       $(call Image/Build/Template/$(fs_64k)/$(1),DIR825B1,dir-825-b1,$(dir825b1_cmdline),01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)
+endef
+
+tew673gru_cmdline=board=TEW-673GRU console=ttyS0,115200
+define Image/Build/Profile/TEW673GRU
+       $(call Image/Build/Template/$(fs_64k)/$(1),DIR825B1,tew-673gru,$(tew673gru_cmdline),01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01)
 endef
 
 wrt160nl_cmdline=board=WRT160NL console=ttyS0,115200
@@ -994,7 +1017,9 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/A02RBW300N,$(1))
        $(call Image/Build/Profile/DB120,$(1))
        $(call Image/Build/Profile/DIR600A1,$(1))
+       $(call Image/Build/Profile/DIR601A1,$(1))
        $(call Image/Build/Profile/DIR615C1,$(1))
+       $(call Image/Build/Profile/DIR615E4,$(1))
        $(call Image/Build/Profile/DIR825B1,$(1))
        $(call Image/Build/Profile/EAP7660D,$(1))
        $(call Image/Build/Profile/FR54RTR,$(1))
@@ -1011,6 +1036,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/RW2458N,$(1))
        $(call Image/Build/Profile/TEW632BRP,$(1))
        $(call Image/Build/Profile/TEW652BRP,$(1))
+       $(call Image/Build/Profile/TEW673GRU,$(1))
        $(call Image/Build/Profile/TLMR11U,$(1))
        $(call Image/Build/Profile/TLMR3020,$(1))
        $(call Image/Build/Profile/TLMR3220,$(1))
@@ -1022,6 +1048,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/TLWR741,$(1))
        $(call Image/Build/Profile/TLWR743,$(1))
        $(call Image/Build/Profile/TLWR841,$(1))
+       $(call Image/Build/Profile/TLWR842,$(1))
        $(call Image/Build/Profile/TLWR941,$(1))
        $(call Image/Build/Profile/TLWR1043,$(1))
        $(call Image/Build/Profile/TLWR2543,$(1))
This page took 0.027664 seconds and 4 git commands to generate.