]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: simplify checking for iso and ramfs
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 3 Mar 2016 01:50:05 +0000 (17:50 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Mar 2016 14:24:25 +0000 (14:24 +0000)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
scripts/runqemu
scripts/runqemu-internal

index d95711b191dd5182a2c29d96a9ad81bbe90ee4be..b4cc9de139e2434f7059cc794d6bb321385fcedc 100755 (executable)
@@ -125,7 +125,7 @@ while true; do
             [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
-        "ext"[234] | "jffs2" | "nfs" | "btrfs")
+        "ext"[234] | "jffs2" | "nfs" | "btrfs" | "iso")
             check_fstype_conflicts $arg
             ;;
         "hddimg" | "hdddirect" | "wic" | "vmdk" | "qcow2" | "vdi")
@@ -134,12 +134,7 @@ while true; do
             ;;
         "ramfs")
             FSTYPE=cpio.gz
-            RAMFS=true
             ;;
-        "iso")
-            FSTYPE=iso
-            ISOFS=true
-           ;;
         "nographic")
             SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
index 89a1e1ba279ce1978eb4e6386741d7fecfaa4652..6fa93c9d079bde3020324d814789668ad2723a7e 100755 (executable)
@@ -593,12 +593,12 @@ if [ "$MACHINE" = "qemuzynq" ]; then
     fi
 fi
 
-if [ "x$RAMFS" = "xtrue" ]; then
+if [ "$FSTYPE" = "cpio.gz" ]; then
     QEMUOPTIONS="-initrd $ROOTFS -nographic"
     KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell"
 fi
 
-if [ "x$ISOFS" = "xtrue" ]; then
+if [ "$FSTYPE" = "iso" ]; then
     QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS"
 fi