diff options
author | Liping Ke <liping.ke@intel.com> | 2010-12-16 01:45:30 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-16 15:53:09 +0000 |
commit | ae4f5c942ef0561335313d676ff8defc0f0bdbbc (patch) | |
tree | 336f09c5dd7cd7c1ed76f79247750509fd3fbb69 /scripts/poky-qemu | |
parent | fded7535b7ebca161f63443815026ee7aa6c2fa5 (diff) | |
download | openembedded-core-ae4f5c942ef0561335313d676ff8defc0f0bdbbc.tar.gz openembedded-core-ae4f5c942ef0561335313d676ff8defc0f0bdbbc.tar.bz2 openembedded-core-ae4f5c942ef0561335313d676ff8defc0f0bdbbc.zip |
Add extra parameters options for poky-qemu scripts
In order to support qemu user's flexibility requirement, we add extra
parameter options, user can add extra params such as "<-m 256>"
in poky-qemu script command.
Signed-off-by: Liping ke <liping.ke@intel.com>
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() { echo " Additional 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" + echo " \"<extra-qemu-options>\" - enables extra qemu options, excluding serial and kvm" echo "" echo "Examples:" echo " $MYNAME qemuarm" echo " $MYNAME qemux86-64 poky-image-sato ext3" echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" + echo " $MYNAME qemux86 \"<-m 256>\"" exit 1 } @@ -47,6 +50,7 @@ FSTYPE="" ROOTFS="" LAZY_ROOTFS="" SCRIPT_QEMU_OPT="" +SCRIPT_QEMU_EXTRA_OPT="" SCRIPT_KERNEL_OPT="" TMPDIR="" @@ -129,6 +133,16 @@ 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 |