diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-05-06 17:58:44 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-14 23:05:14 +0100 |
commit | dc939724c2e2b3bbbe93a970b9a1bcf5a2e763cd (patch) | |
tree | a8ff440781c2a85b6666e65cdf6d022d93f606ec | |
parent | c589aff0804ea14f06ac93e1adcfbbae65ee9b3b (diff) | |
download | poky-dc939724c2e2b3bbbe93a970b9a1bcf5a2e763cd.tar.gz |
image_types: add support for zip compression
Support for the other compression format is not always readily
available on all OSes. Using zip instead of, say, xz is less
efficient, but perhaps more user-friendly for users on such OSes.
(From OE-Core rev: 27764738aa928959ca564e7299cf205c08684661)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/image_types.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 6315fc4820..a4ed5bd531 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -38,6 +38,8 @@ XZ_COMPRESSION_LEVEL ?= "-3" | |||
38 | XZ_INTEGRITY_CHECK ?= "crc32" | 38 | XZ_INTEGRITY_CHECK ?= "crc32" |
39 | XZ_THREADS ?= "-T 0" | 39 | XZ_THREADS ?= "-T 0" |
40 | 40 | ||
41 | ZIP_COMPRESSION_LEVEL ?= "-9" | ||
42 | |||
41 | JFFS2_SUM_EXTRA_ARGS ?= "" | 43 | JFFS2_SUM_EXTRA_ARGS ?= "" |
42 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" | 44 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" |
43 | 45 | ||
@@ -260,12 +262,13 @@ IMAGE_TYPES = " \ | |||
260 | wic wic.gz wic.bz2 wic.lzma \ | 262 | wic wic.gz wic.bz2 wic.lzma \ |
261 | " | 263 | " |
262 | 264 | ||
263 | COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum" | 265 | COMPRESSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum" |
264 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 266 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
265 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" | 267 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" |
266 | COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 268 | COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
267 | COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz" | 269 | COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz" |
268 | COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" | 270 | COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" |
271 | COMPRESS_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | ||
269 | COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" | 272 | COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" |
270 | COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" | 273 | COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" |
271 | COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" | 274 | COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" |
@@ -278,6 +281,7 @@ COMPRESS_DEPENDS_gz = "" | |||
278 | COMPRESS_DEPENDS_bz2 = "pbzip2-native" | 281 | COMPRESS_DEPENDS_bz2 = "pbzip2-native" |
279 | COMPRESS_DEPENDS_xz = "xz-native" | 282 | COMPRESS_DEPENDS_xz = "xz-native" |
280 | COMPRESS_DEPENDS_lz4 = "lz4-native" | 283 | COMPRESS_DEPENDS_lz4 = "lz4-native" |
284 | COMPRESS_DEPENDS_zip = "zip-native" | ||
281 | COMPRESS_DEPENDS_sum = "mtd-utils-native" | 285 | COMPRESS_DEPENDS_sum = "mtd-utils-native" |
282 | 286 | ||
283 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" | 287 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" |