summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Marko2025-05-16 11:18:46 +0000
committerRobert Marko2025-05-18 07:41:54 +0000
commit6d4554429acbf992111d1dbe8456f68af40cf258 (patch)
tree56ab054bef6179dc85f0c1950b3bbe25ba2a2b48
parentd2d9b1eaeb4268fa869d8e8766f92ee4f6e9eba9 (diff)
downloadopenwrt-6d4554429acbf992111d1dbe8456f68af40cf258.tar.gz
image: respect DEFAULT and BROKEN when Default profile is selected
Currently, when you select the Default profile it does not honor DEFAULT:=n nor BROKEN:=y in device profiles but rather just tries to build all of them. This may work when building directly, but when using Image Builder it will always fail since no kernel or anything else is present for devices that have DEFAULT:=n or BROKEN:=Y set since those are skipped during build. So, lets look for DEFAULT being set to "n" or BROKEN being set to "y" and then remove clear _PROFILE_SET so they dont end up being marked for installation. Fixes: #18410 Link: https://github.com/openwrt/openwrt/pull/18814 Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit f060615a78e5c5e86829b2e40c3f77e5cf7033bf)
-rw-r--r--include/image.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index 9a4dff2167..c1d71f1cc4 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -569,6 +569,13 @@ endef
define Device/Check/Common
_PROFILE_SET = $$(strip $$(foreach profile,$$(PROFILES) DEVICE_$(1),$$(call DEVICE_CHECK_PROFILE,$$(profile))))
+ # Check if device is disabled and if so do not mark to be installed
+ ifeq ($$(DEFAULT),n)
+ _PROFILE_SET :=
+ endif
+ ifeq ($$(BROKEN),y)
+ _PROFILE_SET :=
+ endif
DEVICE_PACKAGES += $$(call extra_packages,$$(DEVICE_PACKAGES))
ifdef TARGET_PER_DEVICE_ROOTFS
$$(eval $$(call merge_packages,_PACKAGES,$$(DEVICE_PACKAGES) $$(call DEVICE_EXTRA_PACKAGES,$(1))))