From 929ba563f1bc7195c4981b8e139c432b2cc388ea Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 28 Jul 2017 20:14:32 -0400 Subject: image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types The vmdk/vdi/qcow2 IMAGE_FSTYPEs predate wic. As such, they provide some similar underlying functionality in order to produce a "disk" image that in turn can be converted into different formats that various hypervisor types work with. They do not however provide the ability for other disk image types to be converted into these same output types. Furthermore, they are less flexible than what wic does provide. This drops the old style vmdk/vdi/qcow2 types and re-introduces them under the CONVERSION_CMD framework. The equivalent of vmdk is now wic.vmdk and so forth for the other types. Signed-off-by: Tom Rini Signed-off-by: Richard Purdie --- scripts/runqemu | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/runqemu b/scripts/runqemu index 239c48ffac..fd2717ec87 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -96,11 +96,11 @@ Examples: runqemu qemux86-64 core-image-sato ext4 runqemu qemux86-64 wic-image-minimal wic runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial - runqemu qemux86 iso/hddimg/vmdk/qcow2/vdi/ramfs/cpio.gz... + runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz... runqemu qemux86 qemuparams="-m 256" runqemu qemux86 bootparams="psplash=false" - runqemu path/to/-.vmdk runqemu path/to/-.wic + runqemu path/to/-.wic.vmdk """) def check_tun(): @@ -220,7 +220,8 @@ class BaseConfig(object): self.snapshot = False self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs', 'tar.bz2', 'tar.gz') - self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso') + self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'wic.vmdk', + 'wic.qcow2', 'wic.vdi', 'iso') self.network_device = "-device e1000,netdev=net0,mac=@MAC@" # Use different mac section for tap and slirp to avoid # conflicts, e.g., when one is running with tap, the other is @@ -987,6 +988,8 @@ class BaseConfig(object): def setup_rootfs(self): if self.get('QB_ROOTFS') == 'none': return + if 'wic.' in self.fstype: + self.fstype = self.fstype[4:] rootfs_format = self.fstype if self.fstype in ('vmdk', 'qcow2', 'vdi') else 'raw' qb_rootfs_opt = self.get('QB_ROOTFS_OPT') -- cgit 1.2.3-korg