Skip to contentSkip to conversation

IMAGE_TYPEDEP:swu: Don't depend on wic

PATCH Applied Uladzimir Bely 3 participants 8 messages May 16, 2023 – Jun 7, 2023

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupdate.bbclass +1 -1
index 9a4d509..6f034c1 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"
Signature · 1 line
2.20.1
#1 lore raw
Quoted 19 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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupdate.bbclass +0 -0
index 9a4d509..6f034c1 100644

classes/swupdate.bbclass SWU_SIGNATURE_TYPE ?= "rsa" · line 37

Quoted 8 lines
classes/swupdate.bbclass +1 -1
@@ -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"

Oops, this almost fell through the cracks.

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on it and then seeing a hard to understand error. Any thoughts?

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux
#2 lore raw
Quoted 27 lines · Uladzimir Bely
Quoted 26 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupdate.bbclass index renamed from classes/swupdate.bbclass +0 -0

9a4d509..6f034c1 100644

classes/swupdate.bbclass +1 -1
@@ -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 ''}"
 
Quoted 5 lines

classes/swupdate.bbclass SWU_SIGNATURE_TYPE ?= "rsa" · line 37

Quoted 1 line
classes/swupdate.bbclass +0 -0
 IMAGE_SRC_URI:swu = "file://${SWU_DESCRIPTION_FILE}.tmpl"

Oops, this almost fell through the cracks.

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to understand error. Any thoughts?

Downstream layers need to adapt to the new interface anyways (if they don't use the plain version provided by CIP). The .wic is not needed and should be removed.

Acked!

Felix

Quoted 1 line

Jan

Applied
#3 lore raw
Quoted 31 lines · Felix
Quoted 31 lines · Uladzimir Bely
Quoted 19 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupdate.bbclass index renamed from classes/swupdate.bbclass +0 -0

9a4d509..6f034c1 100644

classes/swupdate.bbclass SWU_SIGNATURE_TYPE ?= "rsa" · line 37

Quoted 8 lines
classes/swupdate.bbclass +1 -1
@@ -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"

Oops, this almost fell through the cracks.

Quoted 7 lines
Quoted 1 line

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to understand error. Any thoughts?

Downstream layers need to adapt to the new interface anyways (if they don't use the plain version provided by CIP). The .wic is not needed and should be removed.

Acked!

Thanks, applied now.

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux
#4 lore raw
Quoted 34 lines · Jan Kiszka
Quoted 33 lines · Felix
Quoted 32 lines · Uladzimir Bely
Quoted 19 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/swupdate.bbclass index renamed from classes/swupdate.bbclass +0 -0

9a4d509..6f034c1 100644

classes/swupdate.bbclass SWU_SIGNATURE_TYPE ?= "rsa" · line 37

Quoted 8 lines
classes/swupdate.bbclass +1 -1
@@ -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"

Oops, this almost fell through the cracks.

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to understand error. Any thoughts?

Quoted 8 lines
Quoted 5 lines

Downstream layers need to adapt to the new interface anyways (if they don't use the plain version provided by CIP). The .wic is not needed and should be removed.

Acked!

Thanks, applied now.

...and dropped again. Seems this requires rebasing or some other tuning, see e.g.
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/jobs/4418633832

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux
#5 lore raw
Quoted 59 lines · Jan Kiszka
Quoted 48 lines · Jan Kiszka
Quoted 47 lines · Felix
Quoted 46 lines · Uladzimir Bely
Quoted 30 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/classes/swupdate.bbclass index
9a4d509..6f034c1 100644

classes/swupdate.bbclass +0 -0
@@ -31,7 +31,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"


 SWU_BUILDCHROOT_IMAGE_FILE ?= "${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE')) }"

Quoted 8 lines

-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"

Oops, this almost fell through the cracks.

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to understand error. Any thoughts?

Quoted 9 lines
Quoted 6 lines

Downstream layers need to adapt to the new interface anyways (if they don't use the plain version provided by CIP).
The .wic is not needed and should be removed.

Acked!

Thanks, applied now.

Quoted 7 lines

...and dropped again. Seems this requires rebasing or some other tuning,
see e.g.
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/jobs/4418633832

Jan

Probably, for 'isar-cip-core' project itself, "wic" (or at least some "wic.xz") is needed and should be added to .yml. I tested the patch with a downstream that uses 'isar-cip-core'...

#6 lore raw
In reply to Jan Kiszka
Quoted 59 lines · Jan Kiszka
Quoted 48 lines · Jan Kiszka
Quoted 47 lines · Felix
Quoted 46 lines · Uladzimir Bely
Quoted 30 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/classes/swupdate.bbclass index
9a4d509..6f034c1 100644

classes/swupdate.bbclass +0 -0
@@ -31,7 +31,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"


 SWU_BUILDCHROOT_IMAGE_FILE ?= "${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE')) }"

Quoted 8 lines

-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"

Oops, this almost fell through the cracks.

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to understand error. Any thoughts?

Quoted 9 lines
Quoted 6 lines

Downstream layers need to adapt to the new interface anyways (if they don't use the plain version provided by CIP).
The .wic is not needed and should be removed.

Acked!

Thanks, applied now.

Quoted 7 lines

...and dropped again. Seems this requires rebasing or some other tuning,
see e.g.
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/jobs/4418633832

Jan

Reproduced the issue locally, for one of failing targets, kas- cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml

It seems the problem is not directly related to removing "wic" but to missing dependencies. Task do_image_swu finally failed with the following message:

```
sha256sum: /home/builder/cip-core-image-qemu-amd64/work/swu/linux.efi:
No such file or directory
```

Default value of SWU_ADDITIONAL_FILES is "linux.efi ${SWU_ROOTFS_PARTITION_NAME}" but the recipe that provides "linux.efi" is built later due to some missing dependency.

Without any changes in the code, build was OK on second (or third) attempt.

#7 lore raw
Quoted 84 lines · Uladzimir Bely
Quoted 63 lines · Jan Kiszka
Quoted 56 lines · Jan Kiszka
Quoted 55 lines · Felix
Quoted 44 lines · Uladzimir Bely
Quoted 32 lines

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 add "wic" or "wic.xz" to IMAGE_FSTYPE.

---
 classes/swupdate.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/classes/swupdate.bbclass index
9a4d509..6f034c1 100644

classes/swupdate.bbclass +0 -0
@@ -31,7 +31,7 @@ SWU_SIGNATURE_TYPE ?= "rsa"


 SWU_BUILDCHROOT_IMAGE_FILE ?=
" ${PP_DEPLOY}/${@os.path.basename(d.getVar('SWU_IMAGE_FILE')) }"

Quoted 8 lines

-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"

Oops, this almost fell through the cracks.

Quoted 5 lines

I'm indeed not seeing anything in this class referencing wic, so this removal seems logical to me. I'm just concerned if we have downstream users relying on >it and then seeing a hard to
understand error. Any thoughts?

Downstream layers need to adapt to the new interface anyways (if
they don't use the plain version provided by CIP). The .wic is not needed and should be removed.

Quoted 5 lines
Quoted 2 lines

Acked!

Thanks, applied now.

Quoted 7 lines

...and dropped again. Seems this requires rebasing or some other tuning,
see e.g.
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/jobs/4418633832

Jan

Reproduced the issue locally, for one of failing targets, kas- cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml

It seems the problem is not directly related to removing "wic" but to missing dependencies. Task do_image_swu finally failed with the following message:

```
sha256sum: /home/builder/cip-core-image-qemu-
amd64/work/swu/linux.efi:
No such file or directory
```
Quoted 8 lines

Default value of  SWU_ADDITIONAL_FILES is "linux.efi ${SWU_ROOTFS_PARTITION_NAME}" but the recipe that provides "linux.efi"
is built later due to some missing dependency.

Without any changes in the code, build was OK on second (or third) attempt.

Prepared and sent patch v2 where restored swu dependency on wic image for targets with efibootguard (swupdate bundle depends on "linux.efi" file in deploy dir that is created by do_image_wic).