Skip to contentSkip to conversation

IMAGE_TYPEDEP:swu: Don't depend on wic

PATCH Applied Uladzimir Bely 2 participants 2 messages Jun 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 IMAGE_TYPEDEP:swu: Don't depend on wic

Settings IMAGE_FSTYPE to something like "ext4 swu" or "wic.xz swu" causes uncompressed '.wic' image left non-removed after the build finished. This is caused by indirect dependency on "wic" in swupdate bbclass that can't be overriden by the user in local.conf.

This patch removes this depencency. If the user want to use some wic partitions to be packed into .swu bundle, they could simply add directly append "wic" to IMAGE_FSTYPE and IMAGE_TYPEDEP:swu.

Similar thing is done for efibootguard-enabled images that require task 'do_image_wic' (that generates "linux.efi" in deploy directory) to be executed before the task 'do_image_swu' that uses this file.

---
 classes/swupdate.bbclass             | 2 +-
 recipes-core/images/efibootguard.inc | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Changes since v1:
- restored swu dependency from wic for efibootguard-enabled targets

classes/swupdate.bbclass +1 -1
index 6934c0f..ac59c00 100644
@@ -31,7 +31,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"
 
 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)}"
+IMAGE_TYPEDEP:swu = "${SWU_ROOTFS_TYPE}${@get_swu_compression_type(d)}"
 IMAGER_INSTALL:swu += "cpio ${@'openssl' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
 
 IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl"
recipes-core/images/efibootguard.inc +1 -0
index 604c9d7..e6824eb 100644
@@ -14,3 +14,4 @@ WIC_IMAGER_INSTALL:append = " efibootguard:${DISTRO_ARCH}"
 WDOG_TIMEOUT ?= "60"
 WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES"
 IMAGE_FSTYPES:append = " wic"
+IMAGE_TYPEDEP:swu:append = " wic"
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 40 lines · Uladzimir Bely

Settings IMAGE_FSTYPE to something like "ext4 swu" or "wic.xz swu" causes uncompressed '.wic' image left non-removed after the build finished. This is caused by indirect dependency on "wic" in swupdate bbclass that can't be overriden by the user in local.conf.

This patch removes this depencency. If the user want to use some wic partitions to be packed into .swu bundle, they could simply add directly append "wic" to IMAGE_FSTYPE and IMAGE_TYPEDEP:swu.

Similar thing is done for efibootguard-enabled images that require task 'do_image_wic' (that generates "linux.efi" in deploy directory) to be executed before the task 'do_image_swu' that uses this file.

---
 classes/swupdate.bbclass             | 2 +-
 recipes-core/images/efibootguard.inc | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Changes since v1:
- restored swu dependency from wic for efibootguard-enabled targets

classes/swupdate.bbclass +1 -1
index 6934c0f..ac59c00 100644
@@ -31,7 +31,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"
 
 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)}"
+IMAGE_TYPEDEP:swu = "${SWU_ROOTFS_TYPE}${@get_swu_compression_type(d)}"
 IMAGER_INSTALL:swu += "cpio ${@'openssl' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
 
 IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl"
recipes-core/images/efibootguard.inc +0 -0
index 604c9d7..e6824eb 100644

recipes-core/images/efibootguard.inc WIC_IMAGER_INSTALL:append = " efibootguard:${DISTRO_ARCH}" · line 17

Quoted 4 lines
recipes-core/images/efibootguard.inc +1 -0
@@ -14,3 +14,4 @@ WIC_IMAGER_INSTALL:append = " efibootguard:${DISTRO_ARCH}"
 WDOG_TIMEOUT ?= "60"
 WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES"
 IMAGE_FSTYPES:append = " wic"
+IMAGE_TYPEDEP:swu:append = " wic"

Thanks, applied. Let's see if CI stays green now ;)

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux