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 | poky-85049069b0a5d4df154a8a1df612ab3163ed1045.tar.gz |
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 227df6ffe9..1407c25f33 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
@@ -20,22 +20,24 @@ | |||
20 | 20 | ||
21 | if [ "x$1" = "x" ]; then | 21 | if [ "x$1" = "x" ]; then |
22 | MYNAME=`basename $0` | 22 | MYNAME=`basename $0` |
23 | echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE" | 23 | echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE [OPTIONS]" |
24 | echo "where:" | 24 | echo "where:" |
25 | echo " ZIMAGE - the kernel image file to use" | 25 | echo " ZIMAGE - the kernel image file to use" |
26 | echo " IMAGEFILE - the image file/location to use" | 26 | echo " IMAGEFILE - the image file/location to use" |
27 | echo " (NFS booting assumed if IMAGEFILE not specified)" | 27 | echo " (NFS booting assumed if IMAGEFILE not specified)" |
28 | echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" | 28 | echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" |
29 | echo " OPTIONS - extra options to pass to QEMU" | ||
29 | exit 1 | 30 | exit 1 |
30 | else | 31 | else |
31 | ZIMAGE=$1 | 32 | ZIMAGE=$1 |
33 | shift | ||
32 | fi | 34 | fi |
33 | 35 | ||
34 | if [ "x$MACHINE" = "x" ]; then | 36 | if [ "x$MACHINE" = "x" ]; then |
35 | MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` | 37 | MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` |
36 | fi | 38 | fi |
37 | 39 | ||
38 | if [ "x$2" = "x" ]; then | 40 | if [ "x$1" = "x" ]; then |
39 | TYPE="nfs" | 41 | TYPE="nfs" |
40 | else | 42 | else |
41 | TYPE="ext2" | 43 | TYPE="ext2" |
@@ -51,7 +53,8 @@ else | |||
51 | if [ "$MACHINE" = "nokia800-maemo" ]; then | 53 | if [ "$MACHINE" = "nokia800-maemo" ]; then |
52 | TYPE="jffs2" | 54 | TYPE="jffs2" |
53 | fi | 55 | fi |
54 | HDIMAGE=$2 | 56 | HDIMAGE=$1 |
57 | shift | ||
55 | fi | 58 | fi |
56 | 59 | ||
57 | INTERNAL_SCRIPT=`which poky-qemu-internal` | 60 | INTERNAL_SCRIPT=`which poky-qemu-internal` |
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index ac2772d3f9..d3a662e9e1 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
@@ -215,8 +215,8 @@ else | |||
215 | fi | 215 | fi |
216 | 216 | ||
217 | echo "Running $QEMU using sudo..." | 217 | echo "Running $QEMU using sudo..." |
218 | echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" | 218 | echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" |
219 | sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true | 219 | sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true |
220 | 220 | ||
221 | trap - INT TERM QUIT | 221 | trap - INT TERM QUIT |
222 | return | 222 | return |