summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-29 15:26:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-04 09:36:21 +0000
commit4d7639edd3b5911955b1ed96ba6d01b8e614c01e (patch)
tree9976e9e1e3760c2e9f22c1ab76edc93dab247024 /meta/classes
parentbaf005b0a566908dadb1eacb9e72e16972a95fcb (diff)
downloadpoky-4d7639edd3b5911955b1ed96ba6d01b8e614c01e.tar.gz
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. (From OE-Core rev: 4a05f4f03b7d710e9e19a97f5d2c35d101e2c648) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass19
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):
7 ctypes = d.getVar('COMPRESSIONTYPES', True).split() 7 ctypes = d.getVar('COMPRESSIONTYPES', True).split()
8 cimages = {} 8 cimages = {}
9 9
10 # Image type b depends on a having been generated first
11 def addtypedepends(a, b):
12 if a in alltypes:
13 alltypes.remove(a)
14 if b not in alltypes:
15 alltypes.append(b)
16 alltypes.append(a)
17
10 # The elf image depends on the cpio.gz image already having 18 # The elf image depends on the cpio.gz image already having
11 # been created, so we add that explicit ordering here. 19 # been created, so we add that explicit ordering here.
20 addtypedepends("elf", "cpio.gz")
12 21
13 if "elf" in alltypes: 22 # jffs2 sumtool'd images need jffs2
14 alltypes.remove("elf") 23 addtypedepends("sum.jffs2", "jffs2")
15 if "cpio.gz" not in alltypes:
16 alltypes.append("cpio.gz")
17 alltypes.append("elf")
18 24
19 # Filter out all the compressed images from alltypes 25 # Filter out all the compressed images from alltypes
20 for type in alltypes: 26 for type in alltypes:
@@ -141,8 +147,7 @@ XZ_INTEGRITY_CHECK ?= "crc32"
141XZ_THREADS ?= "-T 0" 147XZ_THREADS ?= "-T 0"
142 148
143IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" 149IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
144IMAGE_CMD_sum.jffs2 = "${IMAGE_CMD_jffs2} && sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ 150IMAGE_CMD_sum.jffs2 = "sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}"
145 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sum.jffs2 ${EXTRA_IMAGECMD}"
146 151
147IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}" 152IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
148 153