aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2012-12-10 20:55:25 -0500
committerSaul Wold <sgw@linux.intel.com>2012-12-14 15:17:18 -0800
commit9efa0aa914cae9e13d90ddf99b482ccf0936573c (patch)
treeb2ceb05a6f67f70fb446d391191ec7790366b5dc /scripts/runqemu-internal
parent4d0b2ca464cec9588178100b601eda96faec0ad7 (diff)
downloadopenembedded-core-contrib-9efa0aa914cae9e13d90ddf99b482ccf0936573c.tar.gz
runqemu: add support for FSTYPE=vmdk
Allow vmdk images to be run through the 'runqemu' facility. Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index d5c00570ad..7fbe0a0976 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -260,13 +260,13 @@ case "$MACHINE" in
;;
esac
-if [ ! -f "$KERNEL" ]; then
+if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then
echo "Error: Kernel image file $KERNEL doesn't exist"
cleanup
return
fi
-if [ "$FSTYPE" != "nfs" -a ! -f "$ROOTFS" ]; then
+if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a ! -f "$ROOTFS" ]; then
echo "Error: Image file $ROOTFS doesn't exist"
cleanup
return
@@ -342,6 +342,9 @@ if [ "$MACHINE" = "qemux86" ]; then
KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
fi
+ if [ "$FSTYPE" = "vmdk" ]; then
+ QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
+ fi
# Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
# qemux86 and qemux86-64. We can use timer interrupt mode for now.
KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
@@ -366,6 +369,9 @@ if [ "$MACHINE" = "qemux86-64" ]; then
KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
fi
+ if [ "$FSTYPE" = "vmdk" ]; then
+ QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
+ fi
# Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
# qemux86 and qemux86-64. We can use timer interrupt mode for now.
KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
@@ -561,8 +567,14 @@ fi
echo "Running $QEMU..."
# -no-reboot is a mandatory option - see bug #100
-echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
-LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
+if [ "$FSTYPE" = "vmdk" ]; then
+ echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
+ LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
+else
+ echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
+ LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
+fi
+
cleanup