diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2019-11-20 12:41:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-04 12:30:58 +0000 |
commit | e05e4b5b4ba7fd6be13b3be151e27d3eafc0b5d8 (patch) | |
tree | 260efc975192cac2541f9cd9bf5713086cbb9ea2 /meta/classes | |
parent | 4f82d1e59a00916d79f1df22579ff9c05a7519b1 (diff) | |
download | poky-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.bbclass | 8 |
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 | ||
60 | ZIP_COMPRESSION_LEVEL ?= "-9" | 60 | ZIP_COMPRESSION_LEVEL ?= "-9" |
61 | 61 | ||
62 | ZSTD_COMPRESSION_LEVEL ?= "-3" | ||
63 | |||
62 | JFFS2_SUM_EXTRA_ARGS ?= "" | 64 | JFFS2_SUM_EXTRA_ARGS ?= "" |
63 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" | 65 | IMAGE_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. |
283 | COMPRESSIONTYPES ?= "" | 285 | COMPRESSIONTYPES ?= "" |
284 | 286 | ||
285 | CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}" | 287 | CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}" |
286 | CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 288 | CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
287 | CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" | 289 | CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" |
288 | CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 290 | CONVERSION_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= | |||
290 | CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" | 292 | CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" |
291 | CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 293 | CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
292 | CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 294 | CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
295 | CONVERSION_CMD_zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst" | ||
293 | CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" | 296 | CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" |
294 | CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" | 297 | CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" |
295 | CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" | 298 | CONVERSION_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" | |||
310 | CONVERSION_DEPENDS_lz4 = "lz4-native" | 313 | CONVERSION_DEPENDS_lz4 = "lz4-native" |
311 | CONVERSION_DEPENDS_lzo = "lzop-native" | 314 | CONVERSION_DEPENDS_lzo = "lzop-native" |
312 | CONVERSION_DEPENDS_zip = "zip-native" | 315 | CONVERSION_DEPENDS_zip = "zip-native" |
316 | CONVERSION_DEPENDS_zst = "zstd-native" | ||
313 | CONVERSION_DEPENDS_sum = "mtd-utils-native" | 317 | CONVERSION_DEPENDS_sum = "mtd-utils-native" |
314 | CONVERSION_DEPENDS_bmap = "bmap-tools-native" | 318 | CONVERSION_DEPENDS_bmap = "bmap-tools-native" |
315 | CONVERSION_DEPENDS_u-boot = "u-boot-tools-native" | 319 | CONVERSION_DEPENDS_u-boot = "u-boot-tools-native" |