@@ -13,16 +13,16 @@ SWU_ROOTFS_TYPE ?= "squashfs"
SWU_ROOTFS_NAME ?= "${IMAGE_FULLNAME}"
# compression type as defined by swupdate (zlib or zstd)
SWU_COMPRESSION_TYPE ?= "zlib"
-ROOTFS_PARTITION_NAME ?= "${SWU_ROOTFS_NAME}.${SWU_ROOTFS_TYPE}.${@get_swu_compression_type(d)}"
+SWU_ROOTFS_PARTITION_NAME ?= "${SWU_ROOTFS_NAME}.${SWU_ROOTFS_TYPE}.${@get_swu_compression_type(d)}"
SWU_IMAGE_FILE ?= "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${MACHINE}.swu"
SWU_DESCRIPTION_FILE ?= "sw-description"
-SWU_ADDITIONAL_FILES ?= "linux.efi ${ROOTFS_PARTITION_NAME}"
+SWU_ADDITIONAL_FILES ?= "linux.efi ${SWU_ROOTFS_PARTITION_NAME}"
SWU_SIGNED ?= ""
SWU_SIGNATURE_EXT ?= "sig"
SWU_SIGNATURE_TYPE ?= "rsa"
-BUILDCHROOT_IMAGE_FILE ?= "${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE'))}"
+SWU_BUILDCHROOT_IMAGE_FILE ?= "${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE'))}"
IMAGE_TYPEDEP:swu = "wic ${SWU_ROOTFS_TYPE}.${@get_swu_compression_type(d)}"
IMAGER_INSTALL:swu += "cpio ${@'openssl' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
@@ -30,7 +30,7 @@ IMAGER_INSTALL:swu += "cpio ${@'openssl' if bb.utils.to_boolean(d.getVar('SWU_SI
IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl"
IMAGE_TEMPLATE_FILES:swu = "${SWU_DESCRIPTION_FILE}.tmpl"
IMAGE_TEMPLATE_VARS:swu = " \
- ROOTFS_PARTITION_NAME \
+ SWU_ROOTFS_PARTITION_NAME \
TARGET_IMAGE_UUID \
ABROOTFS_PART_UUID_A \
ABROOTFS_PART_UUID_B \
@@ -97,7 +97,7 @@ IMAGE_CMD:swu() {
fi
echo "$file.${SWU_SIGNATURE_EXT}"
fi
- done | cpio -ovL -H crc > "${BUILDCHROOT_IMAGE_FILE}"'
+ done | cpio -ovL -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"'
}
python do_check_swu_partition_uuids() {
@@ -13,7 +13,7 @@ software =
version = "0.2";
name = "cip software update";
images: ({
- filename = "${ROOTFS_PARTITION_NAME}";
+ filename = "${SWU_ROOTFS_PARTITION_NAME}";
device = "C:BOOT0:linux.efi->${ABROOTFS_PART_UUID_A},C:BOOT1:linux.efi->${ABROOTFS_PART_UUID_B}";
type = "roundrobin";
compressed = "${SWU_COMPRESSION_TYPE}";
@@ -21,7 +21,7 @@ software =
subtype = "image";
configfilecheck = "/etc/os-release@not_match@IMAGE_UUID=${TARGET_IMAGE_UUID}";
};
- sha256 = "${ROOTFS_PARTITION_NAME}-sha256";
+ sha256 = "${SWU_ROOTFS_PARTITION_NAME}-sha256";
});
files: ({
filename = "linux.efi";
This patch ensures that all variables used in the swupdate.bbclass are either only active when swu is selected, or are prefixed with SWU. By that, we avoid accidental name collisions in the image recipe, as this recipe always inherits the swupdate class (via the imagetype logic). Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- classes/swupdate.bbclass | 10 +++++----- recipes-core/images/swu/sw-description.tmpl | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)