aboutsummaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-05-09 16:50:46 +0200
committerFelix Fietkau <nbd@nbd.name>2016-05-11 19:03:34 +0200
commitbcf67b69744d014c72201fa997268b6530ad8039 (patch)
treeae1078e689999aaed1e5666fa3a3087a55f9acb1 /include/image.mk
parent40f933d7ffd2256ea44e3fa5a3202a0437426438 (diff)
downloadupstream-bcf67b69744d014c72201fa997268b6530ad8039.tar.gz
upstream-bcf67b69744d014c72201fa997268b6530ad8039.tar.bz2
upstream-bcf67b69744d014c72201fa997268b6530ad8039.zip
image.mk: prepare for defining device profile data in the Device section
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/image.mk b/include/image.mk
index 9e342e0a42..47a47c096c 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -439,6 +439,9 @@ endef
define Device/Init
PROFILES := $(PROFILE)
DEVICE_NAME := $(1)
+ DEVICE_TITLE :=
+ DEVICE_PACKAGES :=
+ DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
KERNEL:=
KERNEL_INITRAMFS = $$(KERNEL)
KERNEL_SIZE:=
@@ -548,17 +551,37 @@ define Device/Build
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))
endef
+define Device/DumpInfo
+Target-Profile: DEVICE_$(1)
+Target-Profile-Name: $(DEVICE_TITLE)
+Target-Profile-Packages: $(DEVICE_PACKAGES)
+Target-Profile-Description:
+$(DEVICE_DESCRIPTION)
+@@
+
+endef
+
+define Device/Dump
+$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
+endef
+
define Device
$(call Device/Init,$(1))
$(call Device/Default,$(1))
$(call Device/Check,$(1))
$(call Device/$(1),$(1))
- $(call Device/Build,$(1))
+ $(call Device/$(if $(DUMP),Dump,Build),$(1))
endef
define BuildImage
+ ifneq ($(DUMP),)
+ all: dumpinfo
+ dumpinfo: FORCE
+ @true
+ endif
+
download:
prepare:
compile: