aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-02 16:10:44 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-02 16:10:44 +0000
commit0ceeb6a068a60640859f35bf9ff89d0d16b91fb3 (patch)
treed406f791e9fa4402fee820707daab4427fe288d4 /target/linux/ar71xx
parent122a61aa49a92435e6046c1a91e2214972af6e47 (diff)
downloadupstream-0ceeb6a068a60640859f35bf9ff89d0d16b91fb3.tar.gz
upstream-0ceeb6a068a60640859f35bf9ff89d0d16b91fb3.tar.bz2
upstream-0ceeb6a068a60640859f35bf9ff89d0d16b91fb3.zip
ar71xx: image: dynamically generate Image/Build/Template/* macros
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 37879
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/image/Makefile100
1 files changed, 21 insertions, 79 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 012d2faa64..4ef0667220 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -787,89 +787,31 @@ define Image/Build/Zcomax/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
-define Image/Build/Template/all/squashfs
- $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/all/jffs2-64k
- $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/all/jffs2-128k
- $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/all/jffs2-256k
- $(call Image/Build/$(1),jffs2-256k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/squashfs-only/loader
- $(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/squashfs-only/squashfs
- $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/squashfs-only/initramfs
- $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64k/loader
- $(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64k/squashfs
- $(call Image/Build/$(1),squashfs-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64k/jffs2-64k
- $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64kraw/loader
- $(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64kraw/squashfs
- $(call Image/Build/$(1),squashfs-raw,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64kraw/jffs2-64k
- $(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/128k/squashfs
- $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/128k/jffs2-128k
- $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/256k/squashfs
- $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/256k/jffs2-256k
- $(call Image/Build/$(1),jffs2-256k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64k/initramfs
- $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
-
-define Image/Build/Template/64kraw/initramfs
- $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
+define Jffs2Template
+ define Image/Build/Template/$(1)/jffs2-$(2)
+ $$(call Image/Build/$$(1),jffs2-$(2),$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8))
+ endef
endef
-define Image/Build/Template/128k/initramfs
- $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
+define BuildTemplate
+ define Image/Build/Template/$(1)/initramfs
+ $$(call Image/Build/$$(1)/initramfs,initramfs,$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8))
+ endef
+ define Image/Build/Template/$(1)/loader
+ $$(call Image/Build/$$(1)/loader,$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8))
+ endef
+ define Image/Build/Template/$(1)/squashfs
+ $$(call Image/Build/$$(1),squashfs$(2),$$(2),$$(3),$$(4),$$(5),$$(6),$$(7),$$(8))
+ endef
+ $(if $(3),$(foreach bs,$(3),$(eval $(call Jffs2Template,$(1),$(bs)))))
endef
-define Image/Build/Template/256k/initramfs
- $(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
-endef
+$(eval $(call BuildTemplate,squashfs-only))
+$(eval $(call BuildTemplate,64k,-64k,64k))
+$(eval $(call BuildTemplate,64kraw,-raw,64k))
+$(eval $(call BuildTemplate,128k,,128k))
+$(eval $(call BuildTemplate,256k,,256k))
+$(eval $(call BuildTemplate,all,,64k 128k 256k))
$(eval $(call SingleProfile,ALFA,64k,ALFANX,alfa-nx,ALFA-NX,ttyS0,115200,$$(alfa_mtdlayout_8M),1638400,6291456,vmlinux.gz.uImage,pb9x-2.6.31-jffs2))
$(eval $(call SingleProfile,ALFA,64k,HORNETUB,hornet-ub,HORNET-UB,ttyATH0,115200,$$(alfa_mtdlayout_8M),1638400,6291456,kernel_image,rootfs_image))