diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-03-02 17:50:05 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:14 +0000 |
commit | e469bb722e89d4246aa908660b22f79b8a7f1041 (patch) | |
tree | 0c0a5eeb984ee05ece19f44e71434bf2cd2998c5 | |
parent | 36103299291aaecda12f8b7ca5a21c0e50ace8e3 (diff) | |
download | poky-e469bb722e89d4246aa908660b22f79b8a7f1041.tar.gz |
runqemu: simplify checking for iso and ramfs
(From OE-Core rev: 69a1fca4374797dea56035ce56a17441a2ca9280)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu | 7 | ||||
-rwxr-xr-x | scripts/runqemu-internal | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index d95711b191..b4cc9de139 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -125,7 +125,7 @@ while true; do | |||
125 | [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \ | 125 | [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \ |
126 | error "conflicting MACHINE types [$MACHINE] and [$arg]" | 126 | error "conflicting MACHINE types [$MACHINE] and [$arg]" |
127 | ;; | 127 | ;; |
128 | "ext"[234] | "jffs2" | "nfs" | "btrfs") | 128 | "ext"[234] | "jffs2" | "nfs" | "btrfs" | "iso") |
129 | check_fstype_conflicts $arg | 129 | check_fstype_conflicts $arg |
130 | ;; | 130 | ;; |
131 | "hddimg" | "hdddirect" | "wic" | "vmdk" | "qcow2" | "vdi") | 131 | "hddimg" | "hdddirect" | "wic" | "vmdk" | "qcow2" | "vdi") |
@@ -134,12 +134,7 @@ while true; do | |||
134 | ;; | 134 | ;; |
135 | "ramfs") | 135 | "ramfs") |
136 | FSTYPE=cpio.gz | 136 | FSTYPE=cpio.gz |
137 | RAMFS=true | ||
138 | ;; | 137 | ;; |
139 | "iso") | ||
140 | FSTYPE=iso | ||
141 | ISOFS=true | ||
142 | ;; | ||
143 | "nographic") | 138 | "nographic") |
144 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic" | 139 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic" |
145 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" | 140 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" |
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 89a1e1ba27..6fa93c9d07 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
@@ -593,12 +593,12 @@ if [ "$MACHINE" = "qemuzynq" ]; then | |||
593 | fi | 593 | fi |
594 | fi | 594 | fi |
595 | 595 | ||
596 | if [ "x$RAMFS" = "xtrue" ]; then | 596 | if [ "$FSTYPE" = "cpio.gz" ]; then |
597 | QEMUOPTIONS="-initrd $ROOTFS -nographic" | 597 | QEMUOPTIONS="-initrd $ROOTFS -nographic" |
598 | KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell" | 598 | KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell" |
599 | fi | 599 | fi |
600 | 600 | ||
601 | if [ "x$ISOFS" = "xtrue" ]; then | 601 | if [ "$FSTYPE" = "iso" ]; then |
602 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS" | 602 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS" |
603 | fi | 603 | fi |
604 | 604 | ||