ar71xx: image: use the MultiProfile helper for the Madwifi profile
[openwrt.git] / target / linux / ar71xx / image / Makefile
index b3989a7..c0a1a9d 100644 (file)
@@ -29,10 +29,13 @@ define mkcmdline
 $(if $(1),board=$(1) )$(if $(2),console=$(2)$(COMMA)$(3))
 endef
 
+SINGLE_PROFILES:=
+
 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))
   endef
+  SINGLE_PROFILES += $(3)
 endef
 
 define MultiProfile
@@ -788,10 +791,7 @@ $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBU
 $(eval $(call SingleProfile,Planex,$(fs_64k),MZKW04NU,mzk-w04nu,MZK-W04NU,ttyS0,115200))
 $(eval $(call SingleProfile,Planex,$(fs_64k),MZKW300NH,mzk-w300nh,MZK-W300NH,ttyS0,115200))
 
-nbg460n_cmdline=board=NBG460N console=ttyS0,115200
-define Image/Build/Profile/NBG_460N_550N_550NH
-       $(call Image/Build/Template/$(fs_64k)/$(1),ZyXEL,nbg460n_550n_550nh,$(nbg460n_cmdline),NBG-460N)
-endef
+$(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550nh,NBG460N,ttyS0,115200,NBG-460N))
 
 $(eval $(call SingleProfile,OpenMesh,$(fs_squash),OM2P,om2p,OM2P))
 
@@ -859,10 +859,7 @@ $(eval $(call SingleProfile,Netgear,$(fs_64k),WNDRMAC,wndrmac,WNDR3700,ttyS0,115
 $(eval $(call SingleProfile,Netgear,$(fs_64k),WNDRMACV2,wndrmacv2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),3701,WNDRMACv2,"",-H 29763654+16+128))
 $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC WNDRMACV2))
 
-wr400n_cmdline=board=WRT400N console=ttyS0,115200
-define Image/Build/Profile/WRT400N
-       $(call Image/Build/Template/$(fs_64k)/$(1),WRT400N,wrt400n,$(wr400n_cmdline))
-endef
+$(eval $(call SingleProfile,WRT400N,$(fs_64k),WRT400N,wrt400n,WRT400N,ttyS0,115200))
 
 $(eval $(call SingleProfile,DIR825B1,$(fs_64k),DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
 $(eval $(call SingleProfile,DIR825B1,$(fs_64k),TEW673GRU,tew-637gru,TEW-673GRU,ttyS0,115200,01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01))
@@ -884,101 +881,13 @@ $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPAG300H,wzr-hp-ag300h,WZR-
 $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPG450H,wzr-hp-g450h,WZR-HP-G450H,ttyS0,115200,WZR-HP-AG450H))
 
 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)
-zcn1523h28_cmdline=board=ZCN-1523H-2 console=ttyS0,115200 $(zcn1523h_mtdlayout)
-define Image/Build/Profile/ZCN1523H28
-       $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-2-8,$(zcn1523h28_cmdline))
-endef
-
-zcn1523h516_cmdline=board=ZCN-1523H-5 console=ttyS0,115200 $(zcn1523h_mtdlayout)
-define Image/Build/Profile/ZCN1523H516
-       $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-5-16,$(zcn1523h516_cmdline))
-endef
-
-define Image/Build/Profile/Default
-       $(call Image/Build/Profile/ALFAAP96,$(1))
-       $(call Image/Build/Profile/ALFANX,$(1))
-       $(call Image/Build/Profile/ALL0258N,$(1))
-       $(call Image/Build/Profile/ALL0305,$(1))
-       $(call Image/Build/Profile/AP113,$(1))
-       $(call Image/Build/Profile/AP121,$(1))
-       $(call Image/Build/Profile/AP121MINI,$(1))
-       $(call Image/Build/Profile/AP136,$(1))
-       $(call Image/Build/Profile/AP81,$(1))
-       $(call Image/Build/Profile/AP83,$(1))
-       $(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/EWDORIN,$(1))
-       $(call Image/Build/Profile/FR54RTR,$(1))
-       $(call Image/Build/Profile/HORNETUB,$(1))
-       $(call Image/Build/Profile/JA76PF,$(1))
-       $(call Image/Build/Profile/JA76PF2,$(1))
-       $(call Image/Build/Profile/JWAP003,$(1))
-       $(call Image/Build/Profile/MZKW04NU,$(1))
-       $(call Image/Build/Profile/MZKW300NH,$(1))
-       $(call Image/Build/Profile/NBG_460N_550N_550NH,$(1))
-       $(call Image/Build/Profile/OM2P,$(1))
-       $(call Image/Build/Profile/PB42,$(1))
-       $(call Image/Build/Profile/PB44,$(1))
-       $(call Image/Build/Profile/PB92,$(1))
-       $(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/TEW712BR,$(1))
-       $(call Image/Build/Profile/TLMR11U,$(1))
-       $(call Image/Build/Profile/TLMR3020,$(1))
-       $(call Image/Build/Profile/TLMR3040,$(1))
-       $(call Image/Build/Profile/TLMR3220,$(1))
-       $(call Image/Build/Profile/TLMR3420,$(1))
-       $(call Image/Build/Profile/TLWA701,$(1))
-       $(call Image/Build/Profile/TLWA901,$(1))
-       $(call Image/Build/Profile/TLWDR4300,$(1))
-       $(call Image/Build/Profile/TLWR703,$(1))
-       $(call Image/Build/Profile/TLWR740,$(1))
-       $(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/TLWR1041,$(1))
-       $(call Image/Build/Profile/TLWR1043,$(1))
-       $(call Image/Build/Profile/TLWR2543,$(1))
-       $(call Image/Build/Profile/UBNT,$(1))
-       $(call Image/Build/Profile/WP543,$(1))
-       $(call Image/Build/Profile/WPE72,$(1))
-       $(call Image/Build/Profile/WNDR3700,$(1))
-       $(call Image/Build/Profile/AP96,$(1))
-       $(call Image/Build/Profile/WRT400N,$(1))
-       $(call Image/Build/Profile/WRT160NL,$(1))
-       $(call Image/Build/Profile/WHRG301N,$(1))
-       $(call Image/Build/Profile/WHRHPG300N,$(1))
-       $(call Image/Build/Profile/WHRHPGN,$(1))
-       $(call Image/Build/Profile/WLAEAG300N,$(1))
-       $(call Image/Build/Profile/WZRHPG300NH,$(1))
-       $(call Image/Build/Profile/WZRHPG300NH2,$(1))
-       $(call Image/Build/Profile/WZRHPAG300H,$(1))
-       $(call Image/Build/Profile/WZRHPG450H,$(1))
-       $(call Image/Build/Profile/ZCN1523H28,$(1))
-       $(call Image/Build/Profile/ZCN1523H516,$(1))
-endef
-
-define Image/Build/Profile/Minimal
-       $(call Image/Build/Profile/Default,$(1))
-endef
-
-define Image/Build/Profile/Madwifi
-       $(call Image/Build/Profile/EAP7660D,$(1))
-       $(call Image/Build/Profile/UBNTRS,$(1))
-       $(call Image/Build/Profile/UBNTRSPRO,$(1))
-       $(call Image/Build/Profile/UBNTLSSR71,$(1))
-       $(call Image/Build/Profile/WP543,$(1))
-endef
+$(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H28,zcn-1523h-2-8,ZCN-1523H-2,ttyS0,115200,$$(zcn1523h_mtdlayout)))
+$(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,ttyS0,115200,$$(zcn1523h_mtdlayout)))
+
+
+$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
+$(eval $(call MultiProfile,Minimal,$(SINGLE_PROFILES)))
+$(eval $(call MultiProfile,Madwifi,EAP7660D UBNTRS UBNTRSPRO UBNTLSSR71 WP543))
 
 define Image/Build/squashfs
        cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-raw