diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-29 15:26:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-04 09:35:00 +0000 |
commit | 4a05f4f03b7d710e9e19a97f5d2c35d101e2c648 (patch) | |
tree | 4b69d40eec6394cd1c2fced85416935851229967 /meta/classes | |
parent | cdd8145a7f4abc75c4089a30206c277db2712649 (diff) | |
download | openembedded-core-4a05f4f03b7d710e9e19a97f5d2c35d101e2c648.tar.gz openembedded-core-4a05f4f03b7d710e9e19a97f5d2c35d101e2c648.tar.bz2 openembedded-core-4a05f4f03b7d710e9e19a97f5d2c35d101e2c648.zip |
image_types: Improve dependency handling between types (and use for sum.jffs2)
We're seeing a pattern of one image type needing to depend on another
type. A good example is jffs2 and sum.jffs2. This patch makes sum.jffs2
depend on jffs2 which will then allow a EXTRA_IMGAGECMD to be set for
sum.jffs2 individually without changing the jffs2 command. This allows the
-pad option to be configured differently.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index b8779e0c4c..505cd1cffc 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -7,14 +7,20 @@ def get_imagecmds(d): ctypes = d.getVar('COMPRESSIONTYPES', True).split() cimages = {} + # Image type b depends on a having been generated first + def addtypedepends(a, b): + if a in alltypes: + alltypes.remove(a) + if b not in alltypes: + alltypes.append(b) + alltypes.append(a) + # The elf image depends on the cpio.gz image already having # been created, so we add that explicit ordering here. + addtypedepends("elf", "cpio.gz") - if "elf" in alltypes: - alltypes.remove("elf") - if "cpio.gz" not in alltypes: - alltypes.append("cpio.gz") - alltypes.append("elf") + # jffs2 sumtool'd images need jffs2 + addtypedepends("sum.jffs2", "jffs2") # Filter out all the compressed images from alltypes for type in alltypes: @@ -141,8 +147,7 @@ XZ_INTEGRITY_CHECK ?= "crc32" XZ_THREADS ?= "-T 0" IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" -IMAGE_CMD_sum.jffs2 = "${IMAGE_CMD_jffs2} && sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ - -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}" +IMAGE_CMD_sum.jffs2 = "sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}" IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" |