Message ID | 20230607121848.31306-1-ubely@ilbers.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [isar-cip-core,v2] IMAGE_TYPEDEP:swu: Don't depend on wic | expand |
On 07.06.23 14:18, Uladzimir Bely wrote: > 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. > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > --- > 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 > > diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass > index 6934c0f..ac59c00 100644 > --- a/classes/swupdate.bbclass > +++ b/classes/swupdate.bbclass > @@ -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" > diff --git a/recipes-core/images/efibootguard.inc b/recipes-core/images/efibootguard.inc > index 604c9d7..e6824eb 100644 > --- a/recipes-core/images/efibootguard.inc > +++ b/recipes-core/images/efibootguard.inc > @@ -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
diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index 6934c0f..ac59c00 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -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" diff --git a/recipes-core/images/efibootguard.inc b/recipes-core/images/efibootguard.inc index 604c9d7..e6824eb 100644 --- a/recipes-core/images/efibootguard.inc +++ b/recipes-core/images/efibootguard.inc @@ -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"
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. Signed-off-by: Uladzimir Bely <ubely@ilbers.de> --- 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