diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-09-24 16:53:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-28 12:00:21 +0100 |
commit | 5f371e5a0b1039c2b16842c053ee6df6551f59b6 (patch) | |
tree | 5513af2615d2f8d94e514a65ddb2b85bfd6de8be /meta | |
parent | ca52ca044ecb7f20707eca07b37c57e1055d14a8 (diff) | |
download | poky-5f371e5a0b1039c2b16842c053ee6df6551f59b6.tar.gz |
image types: add hdddirect
When image-vm.bbclass was introduced, it indirectly also introduced a
".hdddirect" image type based on boot-directdisk.bbclass. However, one
could only get that image when also enabling at least one of the
virtual machine images.
The .hdddirect images are useful by themselves. By registering
image-vm.bbclass as implementation of it, it becomes possible to
select them with:
IMAGE_FSTYPES = "hdddirect"
(From OE-Core rev: e3ff509091cbbfdef851f8a3c9e31c7b76d37e89)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image-vm.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/image_types.bbclass | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass index 0632667084..5ddd1cb274 100644 --- a/meta/classes/image-vm.bbclass +++ b/meta/classes/image-vm.bbclass | |||
@@ -18,7 +18,8 @@ inherit boot-directdisk | |||
18 | IMAGE_TYPEDEP_vmdk = "ext4" | 18 | IMAGE_TYPEDEP_vmdk = "ext4" |
19 | IMAGE_TYPEDEP_vdi = "ext4" | 19 | IMAGE_TYPEDEP_vdi = "ext4" |
20 | IMAGE_TYPEDEP_qcow2 = "ext4" | 20 | IMAGE_TYPEDEP_qcow2 = "ext4" |
21 | IMAGE_TYPES_MASKED += "vmdk vdi qcow2" | 21 | IMAGE_TYPEDEP_hdddirect = "ext4" |
22 | IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect" | ||
22 | 23 | ||
23 | create_vmdk_image () { | 24 | create_vmdk_image () { |
24 | qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk | 25 | qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 86a98bb11d..7e6822cac5 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -150,7 +150,7 @@ def build_live(d): | |||
150 | IMAGE_TYPE_live = "${@build_live(d)}" | 150 | IMAGE_TYPE_live = "${@build_live(d)}" |
151 | inherit ${IMAGE_TYPE_live} | 151 | inherit ${IMAGE_TYPE_live} |
152 | 152 | ||
153 | IMAGE_TYPE_vm = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vdi", "qcow2"], "image-vm", "", d)}' | 153 | IMAGE_TYPE_vm = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vdi", "qcow2", "hdddirect"], "image-vm", "", d)}' |
154 | inherit ${IMAGE_TYPE_vm} | 154 | inherit ${IMAGE_TYPE_vm} |
155 | 155 | ||
156 | python () { | 156 | python () { |
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index afa2e8eb8f..50369197c5 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -13,7 +13,7 @@ def imagetypes_getdepends(d): | |||
13 | deps = [] | 13 | deps = [] |
14 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() | 14 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() |
15 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): | 15 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): |
16 | if type in ["vmdk", "vdi", "qcow2", "live", "iso", "hddimg"]: | 16 | if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]: |
17 | type = "ext4" | 17 | type = "ext4" |
18 | basetype = type | 18 | basetype = type |
19 | for ctype in ctypes: | 19 | for ctype in ctypes: |
@@ -227,6 +227,7 @@ IMAGE_TYPES = " \ | |||
227 | vmdk \ | 227 | vmdk \ |
228 | vdi \ | 228 | vdi \ |
229 | qcow2 \ | 229 | qcow2 \ |
230 | hdddirect \ | ||
230 | elf \ | 231 | elf \ |
231 | wic wic.gz wic.bz2 wic.lzma \ | 232 | wic wic.gz wic.bz2 wic.lzma \ |
232 | " | 233 | " |
@@ -254,7 +255,7 @@ DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" | |||
254 | IMAGE_EXTENSION_live = "hddimg iso" | 255 | IMAGE_EXTENSION_live = "hddimg iso" |
255 | 256 | ||
256 | # The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES, | 257 | # The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES, |
257 | # images that will not be built at do_rootfs time: vmdk, vdi, qcow2, hddimg, iso, etc. | 258 | # images that will not be built at do_rootfs time: vmdk, vdi, qcow2, hdddirect, hddimg, iso, etc. |
258 | IMAGE_TYPES_MASKED ?= "" | 259 | IMAGE_TYPES_MASKED ?= "" |
259 | 260 | ||
260 | # The WICVARS variable is used to define list of bitbake variables used in wic code | 261 | # The WICVARS variable is used to define list of bitbake variables used in wic code |