[LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images for devices not selected

Yousong Zhou yszhou4tech at gmail.com
Sat Dec 31 09:06:32 PST 2016


This commit tries to fix the following situation

 - CONFIG_TARGET_MULTIPLE_PROFILE is not set
 - CONFIG_TARGET_sunxi_DEVICE_sun7i-a20-cubieboard2=y
 - All other devices are not selected

The build system will still try to install-images for those other
devices as PROFILES and PROFILE has value DEVICE_sun7i-a20-cubieboard2

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 include/image.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index b83d589..7cef888 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -303,7 +303,6 @@ $(KDIR)/root.%: kernel_prepare
 	$(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
 
 define Device/InitProfile
-  PROFILES := $(PROFILE)
   DEVICE_TITLE :=
   DEVICE_PACKAGES :=
   DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
@@ -387,7 +386,7 @@ define merge_packages
 endef
 
 define Device/Check/Common
-  _PROFILE_SET = $$(strip $$(foreach profile,$$(PROFILES) DEVICE_$(1),$$(call DEVICE_CHECK_PROFILE,$$(profile))))
+  _PROFILE_SET = $$(strip $$(call DEVICE_CHECK_PROFILE,DEVICE_$(1)))
   ifdef TARGET_PER_DEVICE_ROOTFS
     $$(eval $$(call merge_packages,_PACKAGES,$$(DEVICE_PACKAGES) $$(call DEVICE_EXTRA_PACKAGES,$(1))))
     ROOTFS_ID/$(1) := $$(if $$(_PROFILE_SET),$$(call mkfs_packages_id,$$(_PACKAGES)))
-- 
2.6.4




More information about the Lede-dev mailing list