summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-vmdk.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/image-vmdk.bbclass')
-rw-r--r--meta/classes/image-vmdk.bbclass35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/classes/image-vmdk.bbclass b/meta/classes/image-vmdk.bbclass
new file mode 100644
index 0000000..fac5f71
--- /dev/null
+++ b/meta/classes/image-vmdk.bbclass
@@ -0,0 +1,35 @@
1
2#NOISO = "1"
3
4SYSLINUX_ROOT = "root=/dev/hda2 "
5SYSLINUX_PROMPT ?= "0"
6SYSLINUX_TIMEOUT ?= "1"
7SYSLINUX_LABELS = "boot"
8LABELS_append = " ${SYSLINUX_LABELS} "
9
10# need to define the dependency and the ROOTFS for directdisk
11do_bootdirectdisk[depends] += "${PN}:do_rootfs"
12ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
13
14# creating VMDK relies on having a live hddimg so ensure we
15# inherit it here.
16#inherit image-live
17inherit boot-directdisk
18
19IMAGE_TYPEDEP_vmdk = "ext3"
20IMAGE_TYPES_MASKED += "vmdk"
21
22create_vmdk_image () {
23 qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
24 ln -sf ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
25}
26
27python do_vmdkimg() {
28 bb.build.exec_func('create_vmdk_image', d)
29}
30
31#addtask vmdkimg after do_bootimg before do_build
32addtask vmdkimg after do_bootdirectdisk before do_build
33
34do_vmdkimg[depends] += "qemu-native:do_populate_sysroot"
35