aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-03-01 23:40:40 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-23 14:24:25 +0000
commit82d0014a0e1526ffa1ff7c8ea3903aeae31bada4 (patch)
treed21e4862105587123ed319051ca3acecf5391ec0 /scripts/runqemu-internal
parent88c081b10902ec52928be78ad320c474bb918e01 (diff)
downloadopenembedded-core-contrib-82d0014a0e1526ffa1ff7c8ea3903aeae31bada4.tar.gz
runqemu: simplify the checking for vm images
* So that we can add more image support easliy. * I think that wic should be vm images. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 0c00d8f9cb..89a1e1ba27 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -300,13 +300,13 @@ case "$MACHINE" in
;;
esac
-if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" -a "x$FSTYPE" != "xhddimg" -a "x$FSTYPE" != "xhdddirect" -a "x$FSTYPE" != "xwic" ]; then
+if [ ! -f "$KERNEL" -a "$IS_VM" = "false" ]; then
echo "Error: Kernel image file $KERNEL doesn't exist"
cleanup
return 1
fi
-if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a "$FSTYPE" != "hddimg" -a "$FSTYPE" != "hdddirect" -a ! -f "$ROOTFS" ]; then
+if [ "$FSTYPE" != "nfs" -a "$IS_VM" = "false" -a ! -f "$ROOTFS" ]; then
echo "Error: Image file $ROOTFS doesn't exist"
cleanup
return 1
@@ -428,7 +428,7 @@ 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" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
+ if [ "$IS_VM" = "true" ]; then
QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
fi
# Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
@@ -464,7 +464,7 @@ 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 -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS"
fi
- if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
+ if [ "$IS_VM" = "true" ]; then
QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS"
fi
# Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
@@ -721,7 +721,7 @@ fi
echo "Running $QEMU..."
# -no-reboot is a mandatory option - see bug #100
-if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
+if [ "$IS_VM" = "true" ]; then
# Check root=/dev/sdX or root=/dev/vdX
[ ! -e "$VM" ] && error "VM image is not found!"
if grep -q 'root=/dev/sd' $VM; then