ar71xx: remove obsolete MultiProfile template code
[openwrt/openwrt.git] / target / linux / ar71xx / image / legacy.mk
index 1556573b5f84bdd595ef61d5982954150afa51b2..c087a9b93d1ce89713162e0e4d87bd4700e54c27 100644 (file)
@@ -28,8 +28,6 @@ define mtdpartsize
 $(shell sz=`echo '$(2)' | sed -ne 's/.*[:$(COMMA)]\([0-9]*\)k[@]*[0-9a-zx]*($(1)).*/\1/p'`; [ -n "$$sz" ] && echo $$(($$sz * 1024)))
 endef
 
-SINGLE_PROFILES:=
-
 # $(1)      : name of image build method to be used, e.g., AthLzma.
 # $(2)      : name of the build template to be used, e.g. 64k, 64kraw, 128k, etc.
 # $(3)      : name of the profile to be defined.
@@ -42,17 +40,6 @@ define SingleProfile
   define Image/Build/Profile/$(3)
        $$(call Image/Build/Template/$(2)/$$(1),$(1),$(4),$$(call mkcmdline,$(5),$(6),$(7)),$(8),$(9),$(10),$(11),$(12),$(13),$(14))
   endef
-  SINGLE_PROFILES += $(3)
-endef
-
-# $(1), name of the MultiProfile to be added.
-# $(2), name of Profiles to be included in the MultiProfile.
-define MultiProfile
-  define Image/Build/Profile/$(1)
-       $(foreach p,$(2),
-               $$(call Image/Build/Profile/$p,$$(1))
-       )
-  endef
 endef
 
 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
@@ -145,16 +132,16 @@ endif
 # $(6): padding size.
 define CatFiles
        if [ $(2) -eq 0 ]; then \
-               filename="$(3)"; fstype=$$$${filename##*\.}; \
-               case "$$$${fstype}" in \
+               filename="$(3)"; fstype=$${filename##*\.}; \
+               case "$${fstype}" in \
                "jffs2-64k") bs=65536;; \
                "jffs2-128k") bs=131072;; \
                "jffs2-256k") bs=262144;; \
                *) bs=`stat -c%s $(1)`;; \
                esac; \
-               ( dd if=$(1) bs=$$$${bs} conv=sync;  cat $(3) ) > $(5); \
+               ( dd if=$(1) bs=$${bs} conv=sync;  cat $(3) ) > $(5); \
                if [ -n "$(6)" ]; then \
-                       case "$$$${fstype}" in \
+                       case "$${fstype}" in \
                        squashfs*) \
                                padjffs2 $(5) $(6); \
                                ;; \
@@ -307,10 +294,8 @@ r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata),256k(caldata-ba
 tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro
 wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved)
 zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware)
-mynet_n600_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
 mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro
 zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi)
-qihoo_c301_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
 yun_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6464k(rootfs),1280k(kernel),64k(nvram),64k(art),7744k@0x50000(firmware)
 yun_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware)
 wrtnode2q_mtdlayout=mtdparts=spi0.0:192k(u-boot),64k(u-boot-env),64k(art),1472k(kernel),14592k(rootfs),16064k@0x50000(firmware),16384k@0x0(fullflash)
@@ -324,7 +309,6 @@ define Image/BuildKernel
        $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
        cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf
        -mkdir -p $(KDIR_TMP)
-       $(call Image/Build/Profile/$(IMAGE_PROFILE),buildkernel)
 endef
 
 define Image/BuildKernel/Initramfs
@@ -356,7 +340,7 @@ endef
 define Image/Build/CameoAP94
        $(eval fwsize=$(call mtdpartsize,firmware,$(4)))
        $(eval fwsize_fat=$(call mtdpartsize,firmware,$(5)))
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64)
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(fwsize)-4*64*1024)),64)
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                ( \
                        dd if=$(call sysupname,$(1),$(2)); \
@@ -371,7 +355,7 @@ define Image/Build/CameoAP94
                        ) > $(call factoryname,$(1),$(2)); \
                fi; \
        fi
-       $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2)-fat.uImage,0,$(KDIR)/root.$(1),$$$$(($(fwsize_fat)-4*64*1024)),$(KDIR_TMP)/$(2)-fat.bin,64)
+       $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2)-fat.uImage,0,$(KDIR)/root.$(1),$$(($(fwsize_fat)-4*64*1024)),$(KDIR_TMP)/$(2)-fat.bin,64)
        if [ -e "$(KDIR_TMP)/$(2)-fat.bin" ]; then \
                echo -n "" > $(KDIR_TMP)/$(2)-fat.dummy; \
                sh $(TOPDIR)/scripts/combined-image.sh \
@@ -382,7 +366,7 @@ define Image/Build/CameoAP94
 endef
 
 define Image/Build/WZRHP
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(3)-4*$(4)*1024)),$(4))
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(3)-4*$(4)*1024)),$(4))
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                ( \
                        echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
@@ -412,7 +396,7 @@ Image/Build/WHRHPG300N/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
 
 define Image/Build/WHRHPG300N
        $(eval fwsize=$(call mtdpartsize,firmware,$(4)))
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64)
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(fwsize)-4*64*1024)),64)
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                ( \
                        echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
@@ -431,11 +415,11 @@ endef
 
 define Image/Build/Cameo
        $(eval fwsize=$(call mtdpartsize,firmware,$(4)))
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64)
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(fwsize)-4*64*1024)),64)
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
-               factory_size=$$$$(($(fwsize) - $(6))); \
+               factory_size=$$(($(fwsize) - $(6))); \
                ( \
-                       dd if=$(call sysupname,$(1),$(2)) bs=$$$${factory_size} conv=sync; \
+                       dd if=$(call sysupname,$(1),$(2)) bs=$${factory_size} conv=sync; \
                        echo -n $(5); \
                ) > $(call factoryname,$(1),$(2)); \
        fi
@@ -471,15 +455,15 @@ Image/Build/CameoDB120_8M/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(ca
 
 define Image/Build/CameoHornet
        $(eval fwsize=$(call mtdpartsize,firmware,$(4)))
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64)
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(fwsize)-4*64*1024)),64)
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                for r in $(7); do \
-                       [ -n "$$$$r" ] && dashr="-$$$$r" || dashr=; \
-                       [ -z "$$$$r" ] && r="DEF"; \
-                       mkcameofw -M HORNET -R "$$$$r" -S $(5) -V $(6) -c \
+                       [ -n "$$r" ] && dashr="-$$r" || dashr=; \
+                       [ -z "$$r" ] && r="DEF"; \
+                       mkcameofw -M HORNET -R "$$r" -S $(5) -V $(6) -c \
                                -K $(8) -I $(fwsize) \
                                -k "$(call sysupname,$(1),$(2))" \
-                               -o $(call imgname,$(1),$(2))-factory$$$$dashr.bin; \
+                               -o $(call imgname,$(1),$(2))-factory$$dashr.bin; \
                        true; \
                done; \
        fi
@@ -623,7 +607,7 @@ endef
 
 define Image/Build/Planex
        $(eval fwsize=$(call mtdpartsize,firmware,$(planex_mtdlayout)))
-       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64)
+       $(call Sysupgrade/KRuImage,$(1),$(2),0,$$(($(fwsize)-4*64*1024)),64)
        if [ -e "$(call sysupname,$(1),$(2))" ]; then \
                $(STAGING_DIR_HOST)/bin/mkplanexfw \
                        -B $(2) \
@@ -654,39 +638,6 @@ define Image/Build/ALFA
 endef
 
 
-Image/Build/Seama/loader=$(call Image/BuildLoader,$(1),bin,$(2) $(3),0x80060000)
-
-define Image/Build/Seama
-       [ -e "$(KDIR)/loader-$(2).bin" ]
-       $(call CompressLzma,$(KDIR)/loader-$(2).bin,$(KDIR_TMP)/loader-$(2).bin.lzma)
-       -rm -f $(KDIR_TMP)/image-$(2).tmp
-       $(call CatFiles,$(KDIR_TMP)/loader-$(2).bin.lzma,$$$$(($(6) - 64)),$(KDIR)/root.$(1),$(7),$(KDIR_TMP)/image-$(2).tmp)
-       [ -e "$(KDIR_TMP)/image-$(2).tmp" ] && { \
-               head -c -4 "$(KDIR_TMP)/image-$(2).tmp" > "$(KDIR_TMP)/image-$(2).no-jffs2mark.tmp"; \
-               $(STAGING_DIR_HOST)/bin/seama \
-               -i $(KDIR_TMP)/image-$(2).no-jffs2mark.tmp \
-               -m "dev=/dev/mtdblock/1" -m "type=firmware"; \
-               $(STAGING_DIR_HOST)/bin/seama \
-                       -s $(call imgname,$(1),$(2))-factory.bin \
-                       -m "signature=$(5)" \
-                       -i $(KDIR_TMP)/image-$(2).no-jffs2mark.tmp.seama; \
-               tail -c 4 "$(KDIR_TMP)/image-$(2).tmp" >> $(call imgname,$(1),$(2))-factory.bin; \
-       }
-       cat $(KDIR_TMP)/loader-$(2).bin.lzma > $(KDIR_TMP)/image-$(2)-sysupgrade.tmp
-       $(STAGING_DIR_HOST)/bin/seama \
-               -i $(KDIR_TMP)/image-$(2)-sysupgrade.tmp \
-               -m "dev=/dev/mtdblock/1" -m "type=firmware"
-       $(call CatFiles,$(KDIR_TMP)/image-$(2)-sysupgrade.tmp.seama,$(6),$(KDIR)/root.$(1),$(7),$(call sysupname,$(1),$(2)))
-endef
-
-define Image/Build/Seama/initramfs
-       $(call PatchKernelLzma,$(2),$(3) $(4),,-initramfs)
-       $(STAGING_DIR_HOST)/bin/seama \
-               -i $(KDIR_TMP)/vmlinux-initramfs-$(2).bin.lzma \
-               -m "dev=/dev/mtdblock/1" -m "type=firmware"
-       cat $(KDIR_TMP)/vmlinux-initramfs-$(2).bin.lzma.seama > $(call imgname,initramfs,$(2))-seama.bin
-endef
-
 Image/Build/Senao/buildkernel=$(call MkuImageLzma,$(2),$(3) $(4))
 Image/Build/Senao/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
 
@@ -760,11 +711,11 @@ define Image/Build/Netgear
        $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs,0,$(KDIR)/root.$(1),$(fwsize),$(call sysupname,$(1),$(2)),64)
        if [ -e $(call sysupname,$(1),$(2)) ]; then \
                for r in $(7) ; do \
-                       [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
+                       [ -n "$$r" ] && dashr="-$$r" || dashr= ; \
                        $(STAGING_DIR_HOST)/bin/mkdniimg \
-                               -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
+                               -B $(6) -v OpenWrt.$(REVISION) -r "$$r" $(8) \
                                -i $(call sysupname,$(1),$(2)) \
-                               -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
+                               -o $(call imgname,$(1),$(2))-factory$$dashr.img; \
                done; \
        fi
 endef
@@ -791,7 +742,7 @@ define Image/Build/NetgearNAND/buildkernel
        $(call PatchKernelLzma,$(2),$(3) $(4),-d20)
        dd if=$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
                of=$(KDIR_TMP)/vmlinux-$(2).bin.tmp \
-               bs=$$$$(($(kernelsize)-131072-2*64-1)) \
+               bs=$$(($(kernelsize)-131072-2*64-1)) \
                count=1 conv=sync
        $(call MkuImage,lzma,-M $(5),$(KDIR_TMP)/vmlinux-$(2).bin.tmp,$(KDIR_TMP)/vmlinux-$(2).uImage)
        echo -ne '\xff' >> $(KDIR_TMP)/vmlinux-$(2).uImage
@@ -830,7 +781,7 @@ define Image/Build/NetgearNAND
                dd if=$(KDIR_TMP)/$(2)-root.ubi \
        ) > $(imageraw)
        $(STAGING_DIR_HOST)/bin/mkdniimg \
-               -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
+               -B $(6) -v OpenWrt.$(REVISION) -r "$$r" $(8) \
                -i $(imageraw) \
                -o $(call imgname,ubi,$(2))-factory.img
 
@@ -865,7 +816,7 @@ define      Image/Build/ZyXELNAND/buildkernel
                --pad=$(kernelsize) --big-endian --squash-uids -v -e 128KiB \
                -o $(KDIR_TMP)/$(2)-kernel.jffs2 \
                -d $(KDIR_TMP)/$(2)/image \
-               2>&1 1>/dev/null | awk '/^.+$$$$/'
+               2>&1 1>/dev/null | awk '/^.+$$/'
        -rm -rf $(KDIR_TMP)/$(2)
 endef
 
@@ -1096,11 +1047,6 @@ $(eval $(call SingleProfile,PB4X,64k,PB44,pb44,PB44,ttyS0,115200))
 $(eval $(call SingleProfile,Planex,64kraw,MZKW04NU,mzk-w04nu,MZK-W04NU,ttyS0,115200))
 $(eval $(call SingleProfile,Planex,64kraw,MZKW300NH,mzk-w300nh,MZK-W300NH,ttyS0,115200))
 
-$(eval $(call SingleProfile,Seama,64k,MYNETN600,mynet-n600,MYNET-N600,ttyS0,115200,$$(mynet_n600_mtdlayout),wrgnd16_wd_db600,65536,16187392))
-$(eval $(call SingleProfile,Seama,64k,MYNETN750,mynet-n750,MYNET-N750,ttyS0,115200,$$(mynet_n600_mtdlayout),wrgnd13_wd_av,65536,16187392))
-
-$(eval $(call SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,115200,$$(qihoo_c301_mtdlayout),wrgac26_qihoo360_360rg,65536,16121856))
-
 $(eval $(call SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout)))
 
 $(eval $(call SingleProfile,WHRHPG300N,64kraw,WHRG301N,whr-g301n,WHR-G301N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-G301N))
@@ -1122,29 +1068,6 @@ $(eval $(call SingleProfile,Zcomax,64k,ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,tt
 
 $(eval $(call SingleProfile,ZyXEL,64k,NBG_460N_550N_550NH,nbg460n_550n_550nh,NBG460N,ttyS0,115200,NBG-460N))
 
-$(eval $(call MultiProfile,AP121,AP121_2M AP121_4M AP121_8M AP121_16M))
-$(eval $(call MultiProfile,AP136,AP136_010 AP136_020))
-$(eval $(call MultiProfile,AP143,AP143_8M AP143_16M))
-$(eval $(call MultiProfile,AP147,AP147_010))
-$(eval $(call MultiProfile,AP152,AP152_16M))
-$(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3))
-$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
-$(eval $(call MultiProfile,OPENMESH,OM2P OM5P OM5PAC MR600 MR900 MR1750))
-$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
-$(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
-$(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
-$(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
-$(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
-$(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
-$(eval $(call MultiProfile,WPJ342,WPJ342_16M))
-$(eval $(call MultiProfile,WPJ344,WPJ344_16M))
-$(eval $(call MultiProfile,WPJ531,WPJ531_16M))
-$(eval $(call MultiProfile,WPJ558,WPJ558_16M))
-$(eval $(call MultiProfile,Yun,YUN_16M YUN_8M))
-
-$(eval $(call MultiProfile,Minimal,$(SINGLE_PROFILES)))
-$(eval $(call MultiProfile,Madwifi,EAP7660D WP543))
-
 define LegacyDevice/OM2P
   DEVICE_TITLE := OpenMesh OM2P/OM2Pv2/OM2P-HS/OM2P-HSv2/OM2P-HSv3/OM2P-LC
   DEVICE_PACKAGES := kmod-ath9k om-watchdog
@@ -1161,12 +1084,8 @@ $(eval $(call SingleProfile,NetgearNAND,64k,R6100,r6100,R6100,ttyS0,115200,$$(r6
 
 $(eval $(call SingleProfile,ZyXELNAND,128k,NBG6716,nbg6716,NBG6716,ttyS0,115200,NBG6716,$$(zyx_nbg6716_mtdlayout),mem=256M))
 
-$(eval $(call MultiProfile,WNDR4300,WNDR3700V4 WNDR4300V1))
-
 endif # ifeq ($(SUBTARGET),nand)
 
-$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
-
 define Image/Build/squashfs
        cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-raw
        cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-64k
@@ -1180,10 +1099,6 @@ define Image/Build/jffs2
        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
 endef
 
-define Image/Build/Initramfs
-       $(call Image/Build/Profile/$(IMAGE_PROFILE),initramfs)
-endef
-
 define Image/Prepare
        gzip -9n -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
        $(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
@@ -1193,7 +1108,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
        $(call Image/BuildLoader,generic,elf,,,-initramfs)
 endif
        $(call Image/BuildLoader,generic,elf)
-       $(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(IMAGE_PROFILE)),loader)
 endef
 
 define Image/Prepare/Profile
@@ -1202,11 +1116,11 @@ endef
 
 define Image/Build/Profile
        $(call Image/Build/Profile/$(1),buildkernel)
+       $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/Build/Profile/$(1),initramfs))
        $(call Image/Build/Profile/$(1),$(2))
 endef
 
 # $(1): filesystem type.
 define Image/Build
        $(call Image/Build/$(call rootfs_type,$(1)),$(1))
-       $(call Image/Build/Profile/$(IMAGE_PROFILE),$(1))
 endef