summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-11-20 12:41:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-04 12:30:58 +0000
commite05e4b5b4ba7fd6be13b3be151e27d3eafc0b5d8 (patch)
tree260efc975192cac2541f9cd9bf5713086cbb9ea2 /meta/classes
parent4f82d1e59a00916d79f1df22579ff9c05a7519b1 (diff)
downloadpoky-e05e4b5b4ba7fd6be13b3be151e27d3eafc0b5d8.tar.gz
image_types: add Zstandard conversion support
Add Zstandard (or just Zstd) compression support. This allows to create Zstd compressed tarballs by using tar.zst as IMAGE_FSTYPES. (From OE-Core rev: 77e0f502020085875bbc74da66815c89f19a9351) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index c7af889075..f82f1d8862 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -59,6 +59,8 @@ XZ_INTEGRITY_CHECK ?= "crc32"
59 59
60ZIP_COMPRESSION_LEVEL ?= "-9" 60ZIP_COMPRESSION_LEVEL ?= "-9"
61 61
62ZSTD_COMPRESSION_LEVEL ?= "-3"
63
62JFFS2_SUM_EXTRA_ARGS ?= "" 64JFFS2_SUM_EXTRA_ARGS ?= ""
63IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" 65IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}"
64 66
@@ -269,7 +271,7 @@ IMAGE_TYPES = " \
269 hddimg \ 271 hddimg \
270 squashfs squashfs-xz squashfs-lzo squashfs-lz4 \ 272 squashfs squashfs-xz squashfs-lzo squashfs-lz4 \
271 ubi ubifs multiubi \ 273 ubi ubifs multiubi \
272 tar tar.gz tar.bz2 tar.xz tar.lz4 \ 274 tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \
273 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \ 275 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
274 wic wic.gz wic.bz2 wic.lzma \ 276 wic wic.gz wic.bz2 wic.lzma \
275 container \ 277 container \
@@ -282,7 +284,7 @@ IMAGE_TYPES = " \
282# CONVERSION_CMD/DEPENDS. 284# CONVERSION_CMD/DEPENDS.
283COMPRESSIONTYPES ?= "" 285COMPRESSIONTYPES ?= ""
284 286
285CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}" 287CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}"
286CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 288CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
287CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" 289CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
288CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 290CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
@@ -290,6 +292,7 @@ CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check=
290CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" 292CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
291CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 293CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
292CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 294CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
295CONVERSION_CMD_zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst"
293CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" 296CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
294CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" 297CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
295CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" 298CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
@@ -310,6 +313,7 @@ CONVERSION_DEPENDS_xz = "xz-native"
310CONVERSION_DEPENDS_lz4 = "lz4-native" 313CONVERSION_DEPENDS_lz4 = "lz4-native"
311CONVERSION_DEPENDS_lzo = "lzop-native" 314CONVERSION_DEPENDS_lzo = "lzop-native"
312CONVERSION_DEPENDS_zip = "zip-native" 315CONVERSION_DEPENDS_zip = "zip-native"
316CONVERSION_DEPENDS_zst = "zstd-native"
313CONVERSION_DEPENDS_sum = "mtd-utils-native" 317CONVERSION_DEPENDS_sum = "mtd-utils-native"
314CONVERSION_DEPENDS_bmap = "bmap-tools-native" 318CONVERSION_DEPENDS_bmap = "bmap-tools-native"
315CONVERSION_DEPENDS_u-boot = "u-boot-tools-native" 319CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"