diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-02 16:10:44 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-02 16:10:44 +0000 |
commit | 0927dd581ffe0bed9ad5d176f67ff3da44f5ce8f (patch) | |
tree | 047340569e9d65e967790230f938873a7c3bff63 /target/linux/ar71xx | |
parent | 78700f5495238dcd38ecc52b072207b7ab608219 (diff) | |
download | upstream-0927dd581ffe0bed9ad5d176f67ff3da44f5ce8f.tar.gz upstream-0927dd581ffe0bed9ad5d176f67ff3da44f5ce8f.tar.bz2 upstream-0927dd581ffe0bed9ad5d176f67ff3da44f5ce8f.zip |
ar71xx: image: dynamically generate Image/Build/Template/* macros
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37879 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 100 |
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)) |