diff mbox series

[meta-swupdate] image_types_zchunk: creates zchunk files for delta

Message ID 20230718122352.1074699-2-sbabic@denx.de
State Accepted
Delegated to: Stefano Babic
Headers show
Series [meta-swupdate] image_types_zchunk: creates zchunk files for delta | expand

Commit Message

Stefano Babic July 18, 2023, 12:23 p.m. UTC
Delta update requires artifacts in Zchunk format. The class adds two new
IMAGE_FSTYPES:

- zck: this is the artifact in zchunk format and should be made
  available for downloading.
- zck.zckheader : this is just the header extracted from the zck file.
  This file should be added to the SWU for delta update.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 classes-recipe/image_types_zchunk.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 classes-recipe/image_types_zchunk.bbclass
diff mbox series

Patch

diff --git a/classes-recipe/image_types_zchunk.bbclass b/classes-recipe/image_types_zchunk.bbclass
new file mode 100644
index 0000000..2c477ba
--- /dev/null
+++ b/classes-recipe/image_types_zchunk.bbclass
@@ -0,0 +1,7 @@ 
+CONVERSIONTYPES += "zck zckheader"
+
+CONVERSION_CMD:zck = "zck --output ${IMAGE_NAME}.${type}.zck -u --chunk-hash-type sha256 ${IMAGE_NAME}.${type}"
+CONVERSION_CMD:zckheader = "dd if=${IMAGE_NAME}.${type} of=${IMAGE_NAME}.${type}.zckheader count=1 bs=`zck_read_header -v ${IMAGE_NAME}.${type} | grep 'Header size' | cut -d ':' -f 2 | tr -d '[:space:]'`"
+
+CONVERSION_DEPENDS_zck = "zchunk-native"
+CONVERSION_DEPENDS_zckheader = "zchunk-native"