build: Fix missing device variables for artifacts
authorPetr Štetiar <ynezz@true.cz>
Fri, 18 Jan 2019 08:25:59 +0000 (09:25 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Tue, 5 Feb 2019 18:37:30 +0000 (19:37 +0100)
It was reported to me today on IRC, that building of artifacts doesn't
work properly if the concat_cmd references DEVICE_NAME variable. I've
found out, that it's due to missing call of Device/Export in artifacts
building code path, so this patch adds the missing Device/Export call
which in turn exports DEFAULT_DEVICE_VARS into the artifacts
environment.

Fixes: 493c9a35516c ("build: Introduce building of artifacts")
Tested-by: Oskari Lemmela <oskari@lemmela.net>
Reported-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
include/image.mk

index 4307ead78be07ee8519020d689370ca929f6f3ec..4851a71bcd4a75c70e12b8a1bacabe5de9795b89 100644 (file)
@@ -527,6 +527,7 @@ endef
 
 define Device/Build/artifact
   $$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
+  $(eval $(call Device/Export,$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)))
   $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
        @rm -f $$@
        $$(call concat_cmd,$(ARTIFACT/$(1)))