Skip to content

Commit 24b8db1

Browse files
dwmw2ynezz
authored andcommitted
image: add CONFIG_EXTRA_IMAGE_NAME
This allows an optional tag to be put in the .config file which is included in the filename of the resulting images, so it's easier to build images with different functionality for the same target hardware. Signed-off-by: David Woodhouse <[email protected]> Link: openwrt/openwrt#20984 Signed-off-by: Petr Štetiar <[email protected]>
1 parent b15628e commit 24b8db1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

include/image.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ KDIR=$(KERNEL_BUILD_DIR)
4141
KDIR_TMP=$(KDIR)/tmp
4242
DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
4343

44+
ifeq ($(EXTRA_IMAGE_NAME),)
45+
EXTRA_IMAGE_NAME:=$(call qstrip,$(CONFIG_EXTRA_IMAGE_NAME))
46+
endif
4447
IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-)
4548
IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
4649
IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)

package/base-files/image-config.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
# See /LICENSE for more information.
66
#
77

8+
config EXTRA_IMAGE_NAME
9+
string
10+
prompt "Extra image filename" if IMAGEOPT
11+
default ""
12+
help
13+
Add this to the output image filenames, to distinguish between
14+
different builds for the same hardware type.
15+
816
config TARGET_DEFAULT_LAN_IP_FROM_PREINIT
917
bool "Use preinit IP configuration as default LAN IP" if IMAGEOPT
1018
default n

0 commit comments

Comments
 (0)