]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass: inherit image_types_uboot when needed
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 5 Dec 2016 14:54:40 +0000 (06:54 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Dec 2016 10:26:13 +0000 (10:26 +0000)
Fixed:
MACHINE = "qemuarm"
IMAGE_FSTYPES += "ext3.bz2.u-boot"
[snip]
No IMAGE_CMD defined for IMAGE_FSTYPES entry 'ext3.bz2.u-boot' - possibly invalid type name or missing support class
[snip]

This is because image_types_uboot is not inherited, inherit it when
needed will fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image.bbclass

index 6111f6d266044b02fdeea85a03271d1c3ab337ca..b10272a4153e14f169ce20ab6c1916f8229fb538 100644 (file)
@@ -144,6 +144,15 @@ inherit ${IMAGE_TYPE_live}
 IMAGE_TYPE_vm = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vdi", "qcow2", "hdddirect"], "image-vm", "", d)}'
 inherit ${IMAGE_TYPE_vm}
 
+def build_uboot(d):
+    if 'u-boot' in (d.getVar('IMAGE_FSTYPES', True) or ''):
+        return "image_types_uboot"
+    else:
+        return ""
+
+IMAGE_TYPE_uboot = "${@build_uboot(d)}"
+inherit ${IMAGE_TYPE_uboot}
+
 python () {
     deps = " " + imagetypes_getdepends(d)
     d.appendVarFlag('do_rootfs', 'depends', deps)