summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu32
1 files changed, 18 insertions, 14 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 113088e54..74938f740 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -26,17 +26,19 @@ usage() {
echo " KERNEL - the kernel image file to use"
echo " ROOTFS - the rootfs image file or nfsroot directory to use"
echo " MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)"
- echo " Additional QEMU command-line options can be passed with:"
+ echo " Simplified QEMU command-line options can be passed with:"
echo " nographic - disables video console"
echo " serial - enables a serial console on /dev/ttyS0"
- echo " kvm - enables KVM when running qemux86/qemux86-64, VT capable CPU required"
- echo " \"<extra-qemu-options>\" - enables extra qemu options, excluding serial and kvm"
+ echo " kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
+ echo " qemuparams=\"xyz\" - specify custom parameters to QEMU"
+ echo " bootparams=\"xyz\" - specify custom kernel parameters during boot"
echo ""
echo "Examples:"
echo " $MYNAME qemuarm"
echo " $MYNAME qemux86-64 core-image-sato ext3"
echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
- echo " $MYNAME qemux86 \"<-m 256>\""
+ echo " $MYNAME qemux86 qemuparams=\"-m 256\""
+ echo " $MYNAME qemux86 bootparams=\"psplash=false\""
exit 1
}
@@ -135,6 +137,18 @@ while [ $i -le $# ]; do
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
;;
+ "qemuparams="*)
+ SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"
+
+ # Warn user if they try to specify serial or kvm options
+ # to use simplified options instead
+ serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'`
+ kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'`
+ if [[ ! -z "$serial_option" || ! -z "$kvm_option" ]]; then
+ echo "Error: Please use simplified serial or kvm options instead"
+ usage
+ fi
+ ;;
"bootparams="*)
SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
;;
@@ -149,16 +163,6 @@ while [ $i -le $# ]; do
KVM_ENABLED="yes"
KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo`
;;
- \<*\>)
- SCRIPT_QEMU_EXTRA_OPT=$arg
- serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'`
- kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'`
- echo "$kvm_option"
- if [[ ! -z "$serial_option" || ! -z "$kvm_option" ]]; then
- echo "Error: Please use serial or kvm params instead!"
- usage
- fi
- ;;
*)
# A directory name is an nfs rootfs
if [ -d "$arg" ]; then