summaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2024-04-08 08:05:29 +0200
committerPaul Spooren <mail@aparcar.org>2024-04-08 21:53:05 +0200
commitd997477775bf5447000f1d300a027878b566f5d1 (patch)
tree182215d7e6843ec0d4e02a53d8af567005f0411e /include/image.mk
parent3ce1e4c3d3da3885c2f42e1aa5bc97e0d421445b (diff)
downloadopenwrt-d997477775bf5447000f1d300a027878b566f5d1.tar.gz
openwrt-d997477775bf5447000f1d300a027878b566f5d1.tar.bz2
openwrt-d997477775bf5447000f1d300a027878b566f5d1.zip
treewide: remove implicit SUBTARGET
Historically it's possible to leave the `SUBTARGETS` undefined and automatically fallback to a "generic" subtarget. This however breaks various downstream scripts which may have expectations around filenames: While some targets with an explicit generic subtarget contain `generic` in the filenames of artifacts, implicit "subtargets" don't. Right now this breaks the CI[1], possibly also scripts using the ImageBuilders. This commit removes all code that support implicit handling of subtargets and instead requires every target to define "SUBTARGETS". [1]: https://github.com/openwrt/openwrt/actions/runs/8592821105/job/23548273630 Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/image.mk b/include/image.mk
index 4b6acbe1aa..b6b796dd97 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -39,7 +39,7 @@ IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-
IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)
-IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
+IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)-$(SUBTARGET)
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
IMG_COMBINED:=$(IMG_PREFIX)-combined
ifeq ($(DUMP),)
@@ -477,10 +477,10 @@ endef
ifdef IB
DEVICE_CHECK_PROFILE = $(filter $(1),DEVICE_$(PROFILE) $(PROFILE))
else
- DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_$(1))
+ DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)_$(SUBTARGET))_$(1))
endif
-DEVICE_EXTRA_PACKAGES = $(call qstrip,$(CONFIG_TARGET_DEVICE_PACKAGES_$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_DEVICE_$(1)))
+DEVICE_EXTRA_PACKAGES = $(call qstrip,$(CONFIG_TARGET_DEVICE_PACKAGES_$(call target_conf,$(BOARD)_$(SUBTARGET))_DEVICE_$(1)))
define merge_packages
$(1) :=
@@ -558,7 +558,7 @@ define Device/Build/initramfs
DEVICE_TITLE="$$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
- SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+ SUBTARGET="$(SUBTARGET)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
@@ -692,7 +692,7 @@ define Device/Build/image
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
- SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+ SUBTARGET="$(SUBTARGET)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
@@ -746,7 +746,7 @@ define Device/Build/artifact
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
- SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+ SUBTARGET="$(SUBTARGET)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \