summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2008-04-24 14:30:55 +0000
committerRoss Burton <ross@openedhand.com>2008-04-24 14:30:55 +0000
commit85049069b0a5d4df154a8a1df612ab3163ed1045 (patch)
treee3095c6a430c2a4929aef05087456120dd9b2dd9 /scripts
parent5e6ec763b795ffa2329f32063d01a1fbec2c1f9d (diff)
downloadpoky-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-xscripts/poky-qemu9
-rwxr-xr-xscripts/poky-qemu-internal4
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
21if [ "x$1" = "x" ]; then 21if [ "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
30else 31else
31 ZIMAGE=$1 32 ZIMAGE=$1
33 shift
32fi 34fi
33 35
34if [ "x$MACHINE" = "x" ]; then 36if [ "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#'`
36fi 38fi
37 39
38if [ "x$2" = "x" ]; then 40if [ "x$1" = "x" ]; then
39 TYPE="nfs" 41 TYPE="nfs"
40else 42else
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
55fi 58fi
56 59
57INTERNAL_SCRIPT=`which poky-qemu-internal` 60INTERNAL_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
215fi 215fi
216 216
217echo "Running $QEMU using sudo..." 217echo "Running $QEMU using sudo..."
218echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" 218echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE"
219sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true 219sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true
220 220
221trap - INT TERM QUIT 221trap - INT TERM QUIT
222return 222return