From 5e6218929d8d0ab704b26463f2bee0504cfedc1f Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 10 Jun 2021 14:08:27 +0100 Subject: image_types: add zsync conversions Add image conversion types to create zsync[1] metadata. Use .zsync if the image is already compressed and .gzsync if zsync should compress the image itself. The required tool, zsync-curl, has been submitted to meta-oe. [1] http://zsync.moria.org.uk (From OE-Core rev: e04113f8b139754c512278555558a1b88b35bc9e) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/image_types.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 2a45d45c71..954d6739ec 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -278,7 +278,7 @@ IMAGE_TYPES = " \ # CONVERSION_CMD/DEPENDS. COMPRESSIONTYPES ?= "" -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 ${COMPRESSIONTYPES}" +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 gzsync zsync ${COMPRESSIONTYPES}" CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" @@ -302,6 +302,8 @@ CONVERSION_CMD_vhd = "qemu-img convert -O vpc -o subformat=fixed ${IMAGE_NAME}${ CONVERSION_CMD_vdi = "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi" CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2" CONVERSION_CMD_base64 = "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64" +CONVERSION_CMD_zsync = "zsyncmake_curl ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" +CONVERSION_CMD_gzsync = "zsyncmake_curl -z ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" CONVERSION_DEPENDS_lzma = "xz-native" CONVERSION_DEPENDS_gz = "pigz-native" CONVERSION_DEPENDS_bz2 = "pbzip2-native" @@ -319,6 +321,8 @@ CONVERSION_DEPENDS_qcow2 = "qemu-system-native" CONVERSION_DEPENDS_base64 = "coreutils-native" CONVERSION_DEPENDS_vhdx = "qemu-system-native" CONVERSION_DEPENDS_vhd = "qemu-system-native" +CONVERSION_DEPENDS_zsync = "zsync-curl-native" +CONVERSION_DEPENDS_gzsync = "zsync-curl-native" RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" RUNNABLE_MACHINE_PATTERNS ?= "qemu" -- cgit v1.2.3-54-g00ecf