diff options
author | Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> | 2014-02-13 16:06:21 +0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-14 12:30:20 +0000 |
commit | aed1f0cbac478768bd1b5cd6c12293c549121275 (patch) | |
tree | 33b4ee17462d3eed03133c285010bd66ae9639f6 /meta | |
parent | b563b3bb789597320e6d4fc804f697d5f829da52 (diff) | |
download | poky-aed1f0cbac478768bd1b5cd6c12293c549121275.tar.gz |
image_types bbclass: use compression framework for jffs2 sum images
I got hit by a missing dependency in generation of sum.jffs2 images - at
runtime, when images are generated using bitbake pool, it is possible
for sum.jffs2 image to be scheduled for generation before jffs2 image is
fully generated.
Insted of adding additional hacks, reimplement sum.jffs2 generation as a
compression scheme on top of plain jffs2 images. For now support for
sum.jffs2 images is left in, it will be removed by the subsequent
commit.
(From OE-Core rev: 2a15a364fdf85b0b18ba63fdb2a745a52b96478e)
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image_types.bbclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 393bfa82eb..be56abb2f1 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -33,6 +33,7 @@ XZ_COMPRESSION_LEVEL ?= "-e -6" | |||
33 | XZ_INTEGRITY_CHECK ?= "crc32" | 33 | XZ_INTEGRITY_CHECK ?= "crc32" |
34 | XZ_THREADS ?= "-T 0" | 34 | XZ_THREADS ?= "-T 0" |
35 | 35 | ||
36 | JFFS2_SUM_EXTRA_ARGS ?= "" | ||
36 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" | 37 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" |
37 | IMAGE_CMD_sum.jffs2 = "sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}" | 38 | IMAGE_CMD_sum.jffs2 = "sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}" |
38 | 39 | ||
@@ -128,19 +129,21 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native" | |||
128 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" | 129 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" |
129 | 130 | ||
130 | # This variable is available to request which values are suitable for IMAGE_FSTYPES | 131 | # This variable is available to request which values are suitable for IMAGE_FSTYPES |
131 | IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf" | 132 | IMAGE_TYPES = "jffs2 jffs2.sum sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf" |
132 | 133 | ||
133 | COMPRESSIONTYPES = "gz bz2 lzma xz lz4" | 134 | COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum" |
134 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" | 135 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" |
135 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz" | 136 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz" |
136 | COMPRESS_CMD_bz2 = "bzip2 -f -k ${IMAGE_NAME}.rootfs.${type}" | 137 | COMPRESS_CMD_bz2 = "bzip2 -f -k ${IMAGE_NAME}.rootfs.${type}" |
137 | COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz" | 138 | COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz" |
138 | COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.lz4" | 139 | COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.lz4" |
140 | COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}.rootfs.${type} -o ${IMAGE_NAME}.rootfs.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}" | ||
139 | COMPRESS_DEPENDS_lzma = "xz-native" | 141 | COMPRESS_DEPENDS_lzma = "xz-native" |
140 | COMPRESS_DEPENDS_gz = "" | 142 | COMPRESS_DEPENDS_gz = "" |
141 | COMPRESS_DEPENDS_bz2 = "" | 143 | COMPRESS_DEPENDS_bz2 = "" |
142 | COMPRESS_DEPENDS_xz = "xz-native" | 144 | COMPRESS_DEPENDS_xz = "xz-native" |
143 | COMPRESS_DEPENDS_lz4 = "lz4-native" | 145 | COMPRESS_DEPENDS_lz4 = "lz4-native" |
146 | COMPRESS_DEPENDS_sum = "mtd-utils-native" | ||
144 | 147 | ||
145 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3" | 148 | RUNNABLE_IMAGE_TYPES ?= "ext2 ext3" |
146 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" | 149 | RUNNABLE_MACHINE_PATTERNS ?= "qemu" |