diff options
author | Ross Burton <ross@openedhand.com> | 2008-04-24 14:30:55 +0000 |
---|---|---|
committer | Ross Burton <ross@openedhand.com> | 2008-04-24 14:30:55 +0000 |
commit | 85049069b0a5d4df154a8a1df612ab3163ed1045 (patch) | |
tree | e3095c6a430c2a4929aef05087456120dd9b2dd9 /scripts | |
parent | 5e6ec763b795ffa2329f32063d01a1fbec2c1f9d (diff) | |
download | openembedded-core-85049069b0a5d4df154a8a1df612ab3163ed1045.tar.gz openembedded-core-85049069b0a5d4df154a8a1df612ab3163ed1045.tar.bz2 openembedded-core-85049069b0a5d4df154a8a1df612ab3163ed1045.tar.xz openembedded-core-85049069b0a5d4df154a8a1df612ab3163ed1045.zip |
Allow user-specified options to be passed to qemu via poky-qemu
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4327 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/poky-qemu | 9 | ||||
-rwxr-xr-x | scripts/poky-qemu-internal | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 227df6ffe..1407c25f3 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu @@ -20,22 +20,24 @@ if [ "x$1" = "x" ]; then MYNAME=`basename $0` - echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE" + echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE [OPTIONS]" echo "where:" echo " ZIMAGE - the kernel image file to use" echo " IMAGEFILE - the image file/location to use" echo " (NFS booting assumed if IMAGEFILE not specified)" echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" + echo " OPTIONS - extra options to pass to QEMU" exit 1 else ZIMAGE=$1 + shift fi if [ "x$MACHINE" = "x" ]; then MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` fi -if [ "x$2" = "x" ]; then +if [ "x$1" = "x" ]; then TYPE="nfs" else TYPE="ext2" @@ -51,7 +53,8 @@ else if [ "$MACHINE" = "nokia800-maemo" ]; then TYPE="jffs2" fi - HDIMAGE=$2 + HDIMAGE=$1 + shift fi INTERNAL_SCRIPT=`which poky-qemu-internal` diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index ac2772d3f..d3a662e9e 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal @@ -215,8 +215,8 @@ else fi echo "Running $QEMU using sudo..." -echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" -sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true +echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" +sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true trap - INT TERM QUIT return |