]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
image: only filter out images when ImageBuilder is used
authorRobert Marko <robimarko@gmail.com>
Sat, 24 May 2025 10:20:54 +0000 (12:20 +0200)
committerRobert Marko <robimarko@gmail.com>
Sat, 24 May 2025 10:25:49 +0000 (12:25 +0200)
Currently, we are filtering out images if DEFAULT:=n or BROKEN:=y are set,
so if you are building from scratch and want to build custom images that
are stripped down to fit, you must edit the image recipe or its just
filtered out.

So, to allow this behaviour when building from scratch as we can assume
that person doing that knows what they are attempting to do lets just limit
the filtering to ImageBuilder.

Fixes: f060615a78e5 ("image: respect DEFAULT and BROKEN when Default profile is selected")
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/image.mk

index c1d71f1cc4db027a0bb386dfc5b5076e1535e192..6408719bdc48e3e3eed91b8aa97e58aa1b5e42ec 100644 (file)
@@ -569,12 +569,14 @@ 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 :=
+  # Check if device is disabled and if so do not mark to be installed when ImageBuilder is used
+  ifeq ($(IB),1)
+    ifeq ($$(DEFAULT),n)
+      _PROFILE_SET :=
+    endif
+    ifeq ($$(BROKEN),y)
+      _PROFILE_SET :=
+    endif
   endif
   DEVICE_PACKAGES += $$(call extra_packages,$$(DEVICE_PACKAGES))
   ifdef TARGET_PER_DEVICE_ROOTFS