diff options
Diffstat (limited to 'scripts/poky-qemu')
-rwxr-xr-x | scripts/poky-qemu | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 04349879c5..313248ff49 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
@@ -29,11 +29,14 @@ usage() { | |||
29 | echo " Additional QEMU command-line options can be passed with:" | 29 | echo " Additional QEMU command-line options can be passed with:" |
30 | echo " nographic - disables video console" | 30 | echo " nographic - disables video console" |
31 | echo " serial - enables a serial console on /dev/ttyS0" | 31 | echo " serial - enables a serial console on /dev/ttyS0" |
32 | echo " kvm - enables kvm" | ||
33 | echo " \"<extra-qemu-options>\" - enables extra qemu options, excluding serial and kvm" | ||
32 | echo "" | 34 | echo "" |
33 | echo "Examples:" | 35 | echo "Examples:" |
34 | echo " $MYNAME qemuarm" | 36 | echo " $MYNAME qemuarm" |
35 | echo " $MYNAME qemux86-64 poky-image-sato ext3" | 37 | echo " $MYNAME qemux86-64 poky-image-sato ext3" |
36 | echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" | 38 | echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" |
39 | echo " $MYNAME qemux86 \"<-m 256>\"" | ||
37 | exit 1 | 40 | exit 1 |
38 | } | 41 | } |
39 | 42 | ||
@@ -47,6 +50,7 @@ FSTYPE="" | |||
47 | ROOTFS="" | 50 | ROOTFS="" |
48 | LAZY_ROOTFS="" | 51 | LAZY_ROOTFS="" |
49 | SCRIPT_QEMU_OPT="" | 52 | SCRIPT_QEMU_OPT="" |
53 | SCRIPT_QEMU_EXTRA_OPT="" | ||
50 | SCRIPT_KERNEL_OPT="" | 54 | SCRIPT_KERNEL_OPT="" |
51 | 55 | ||
52 | TMPDIR="" | 56 | TMPDIR="" |
@@ -129,6 +133,16 @@ while [ $i -le $# ]; do | |||
129 | KVM_ENABLED="yes" | 133 | KVM_ENABLED="yes" |
130 | KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo` | 134 | KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo` |
131 | ;; | 135 | ;; |
136 | \<*\>) | ||
137 | SCRIPT_QEMU_EXTRA_OPT=$arg | ||
138 | serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'` | ||
139 | kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'` | ||
140 | echo "$kvm_option" | ||
141 | if [[ ! -z "$serial_option" || ! -z "$kvm_option" ]]; then | ||
142 | echo "Error: Please use serial or kvm params instead!" | ||
143 | usage | ||
144 | fi | ||
145 | ;; | ||
132 | *) | 146 | *) |
133 | # A directory name is an nfs rootfs | 147 | # A directory name is an nfs rootfs |
134 | if [ -d "$arg" ]; then | 148 | if [ -d "$arg" ]; then |