diff options
author | Benjamin Szőke <egyszeregy@freemail.hu> | 2022-11-07 14:31:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-07 21:57:21 +0000 |
commit | f2aff70b0ea4f2de6676615315a53bb160694b7d (patch) | |
tree | 18fbdf46e1715224f09064240db900175ccb04ba /meta/classes-recipe | |
parent | be91408e10805070f42f94e7f197aac9093b51b3 (diff) | |
download | poky-f2aff70b0ea4f2de6676615315a53bb160694b7d.tar.gz |
image_types: Add 7-Zip support in conversion types and commands
Add 7-Zip support in conversion types and commands. Default arguments of
7-Zip are compression level: 9, method: BZip2, extension: 7z. All these are
overridable from local.con for any other use case in user side. First goal
was to make an alternative zip conversion which can operate faster in
multi-thread systems (on many CPU cores), normal zip is just a single
thread compression. 7-Zip can do a compression in multi-thread processing,
so it is fine to use and speed up it and 7-Zip is supported also in many
platform to use.
(From OE-Core rev: 5931b2898b5fa964768c2abf9b5aa556859152b3)
Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/image_types.bbclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index 764e6a5574..ae00728a74 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass | |||
@@ -59,6 +59,10 @@ XZ_INTEGRITY_CHECK ?= "crc32" | |||
59 | 59 | ||
60 | ZIP_COMPRESSION_LEVEL ?= "-9" | 60 | ZIP_COMPRESSION_LEVEL ?= "-9" |
61 | 61 | ||
62 | 7ZIP_COMPRESSION_LEVEL ?= "9" | ||
63 | 7ZIP_COMPRESSION_METHOD ?= "BZip2" | ||
64 | 7ZIP_EXTENSION ?= "7z" | ||
65 | |||
62 | ZSTD_COMPRESSION_LEVEL ?= "-3" | 66 | ZSTD_COMPRESSION_LEVEL ?= "-3" |
63 | 67 | ||
64 | JFFS2_SUM_EXTRA_ARGS ?= "" | 68 | JFFS2_SUM_EXTRA_ARGS ?= "" |
@@ -304,7 +308,7 @@ IMAGE_TYPES:append:x86-64 = " hddimg iso" | |||
304 | # CONVERSION_CMD/DEPENDS. | 308 | # CONVERSION_CMD/DEPENDS. |
305 | COMPRESSIONTYPES ?= "" | 309 | COMPRESSIONTYPES ?= "" |
306 | 310 | ||
307 | 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}" | 311 | CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip 7zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 gzsync zsync ${COMPRESSIONTYPES}" |
308 | CONVERSION_CMD:lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 312 | CONVERSION_CMD:lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
309 | CONVERSION_CMD:gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" | 313 | CONVERSION_CMD:gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" |
310 | CONVERSION_CMD:bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 314 | CONVERSION_CMD:bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
@@ -312,6 +316,7 @@ CONVERSION_CMD:xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check= | |||
312 | CONVERSION_CMD:lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" | 316 | CONVERSION_CMD:lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" |
313 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 317 | CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
314 | CONVERSION_CMD:zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 318 | CONVERSION_CMD:zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
319 | CONVERSION_CMD:7zip = "7za a -mx=${7ZIP_COMPRESSION_LEVEL} -mm=${7ZIP_COMPRESSION_METHOD} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.${7ZIP_EXTENSION} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | ||
315 | CONVERSION_CMD:zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst" | 320 | CONVERSION_CMD:zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst" |
316 | CONVERSION_CMD:sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" | 321 | CONVERSION_CMD:sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" |
317 | CONVERSION_CMD:md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" | 322 | CONVERSION_CMD:md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" |
@@ -337,6 +342,7 @@ CONVERSION_DEPENDS_xz = "xz-native" | |||
337 | CONVERSION_DEPENDS_lz4 = "lz4-native" | 342 | CONVERSION_DEPENDS_lz4 = "lz4-native" |
338 | CONVERSION_DEPENDS_lzo = "lzop-native" | 343 | CONVERSION_DEPENDS_lzo = "lzop-native" |
339 | CONVERSION_DEPENDS_zip = "zip-native" | 344 | CONVERSION_DEPENDS_zip = "zip-native" |
345 | CONVERSION_DEPENDS_7zip = "p7zip-native" | ||
340 | CONVERSION_DEPENDS_zst = "zstd-native" | 346 | CONVERSION_DEPENDS_zst = "zstd-native" |
341 | CONVERSION_DEPENDS_sum = "mtd-utils-native" | 347 | CONVERSION_DEPENDS_sum = "mtd-utils-native" |
342 | CONVERSION_DEPENDS_bmap = "bmap-tools-native" | 348 | CONVERSION_DEPENDS_bmap = "bmap-tools-native" |