summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/image-artifact-names.bbclass
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-03-13 13:15:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-22 13:53:29 +0000
commitc0df9c9e92b56c33952fa3e6c050f1e4c53b66d9 (patch)
treebdbf10576b8ba1c03736dee0ea5c0ccd439d0e08 /meta/classes-recipe/image-artifact-names.bbclass
parent923a9e11b192b974a929d1dbc7258ad13923fd15 (diff)
downloadpoky-c0df9c9e92b56c33952fa3e6c050f1e4c53b66d9.tar.gz
image-artifact-names: add IMAGE_MACHINE_SUFFIX variable
* to make it easier for projects to avoid default -${MACHINE} suffix if the ${MACHINE} named DEPLOY_DIR_IMAGE works better for them * also use IMAGE_LINK_NAME in IMAGE_NAME to make it more clear that IMAGE_NAME is the same as IMAGE_LINK_NAME but with version suffix * adding it as separate variable helps us to catch the cases where we didn't respect ${IMAGE_LINK_NAME} variable and just used the common default ${IMAGE_BASENAME}-${MACHINE}. [YOCTO #12937] (From OE-Core rev: 6e82c394e98d57a2fe73e547922477cd6b0620f9) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/image-artifact-names.bbclass')
-rw-r--r--meta/classes-recipe/image-artifact-names.bbclass15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/classes-recipe/image-artifact-names.bbclass b/meta/classes-recipe/image-artifact-names.bbclass
index 9dc25b6dde..ac2376d59a 100644
--- a/meta/classes-recipe/image-artifact-names.bbclass
+++ b/meta/classes-recipe/image-artifact-names.bbclass
@@ -11,11 +11,20 @@
11IMAGE_BASENAME ?= "${PN}" 11IMAGE_BASENAME ?= "${PN}"
12IMAGE_VERSION_SUFFIX ?= "-${DATETIME}" 12IMAGE_VERSION_SUFFIX ?= "-${DATETIME}"
13IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH" 13IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH"
14IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 14IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}"
15IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" 15IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}"
16 16
17# This needs to stay in sync with IMAGE_LINK_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME 17# This needs to stay in sync with IMAGE_LINK_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME
18INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" 18INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
19
20# The default DEPLOY_DIR_IMAGE is ${MACHINE} directory:
21# meta/conf/bitbake.conf:DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images/${MACHINE}"
22# so many people find it unnecessary to include this suffix to every image
23# stored there, but other people often fetch various images for different
24# MACHINEs to the same downloads directory and then the suffix is very helpful
25# add separate variable for projects to decide which scheme works best for them
26# without understanding the IMAGE_NAME/IMAGE_LINK_NAME structure.
27IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}"
19 28
20# IMAGE_NAME is the base name for everything produced when building images. 29# IMAGE_NAME is the base name for everything produced when building images.
21# The actual image that contains the rootfs has an additional suffix (.rootfs 30# The actual image that contains the rootfs has an additional suffix (.rootfs