summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-05-06 17:58:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:14 +0100
commitdc939724c2e2b3bbbe93a970b9a1bcf5a2e763cd (patch)
treea8ff440781c2a85b6666e65cdf6d022d93f606ec
parentc589aff0804ea14f06ac93e1adcfbbae65ee9b3b (diff)
downloadpoky-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.bbclass6
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"
38XZ_INTEGRITY_CHECK ?= "crc32" 38XZ_INTEGRITY_CHECK ?= "crc32"
39XZ_THREADS ?= "-T 0" 39XZ_THREADS ?= "-T 0"
40 40
41ZIP_COMPRESSION_LEVEL ?= "-9"
42
41JFFS2_SUM_EXTRA_ARGS ?= "" 43JFFS2_SUM_EXTRA_ARGS ?= ""
42IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" 44IMAGE_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
263COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum" 265COMPRESSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum"
264COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 266COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
265COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" 267COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
266COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" 268COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
267COMPRESS_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" 269COMPRESS_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"
268COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4" 270COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
271COMPRESS_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
269COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" 272COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
270COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum" 273COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
271COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum" 274COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
@@ -278,6 +281,7 @@ COMPRESS_DEPENDS_gz = ""
278COMPRESS_DEPENDS_bz2 = "pbzip2-native" 281COMPRESS_DEPENDS_bz2 = "pbzip2-native"
279COMPRESS_DEPENDS_xz = "xz-native" 282COMPRESS_DEPENDS_xz = "xz-native"
280COMPRESS_DEPENDS_lz4 = "lz4-native" 283COMPRESS_DEPENDS_lz4 = "lz4-native"
284COMPRESS_DEPENDS_zip = "zip-native"
281COMPRESS_DEPENDS_sum = "mtd-utils-native" 285COMPRESS_DEPENDS_sum = "mtd-utils-native"
282 286
283RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" 287RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"