diff options
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 |