diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-17 11:08:32 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-17 11:08:32 +0000 |
commit | 4a9392f5a3295b900eebc81fd6fd64a8029525df (patch) | |
tree | 9211a76434c7cf72cbe4b55b4320d9574089bc3b /scripts/runqemu | |
parent | f4a8621a19550e4168a45e69386c82f031aa37f1 (diff) | |
download | poky-4a9392f5a3295b900eebc81fd6fd64a8029525df.tar.gz |
Improve the qemu scripts and documentation (qemux86 support isn't complete yet)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@867 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu new file mode 100755 index 0000000000..49403a6167 --- /dev/null +++ b/scripts/runqemu | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH | ||
4 | |||
5 | if [ -z "$QEMU_MEMORY" ]; then | ||
6 | QEMU_MEMORY="64M" | ||
7 | fi | ||
8 | |||
9 | if [ "x$1" != "x" ]; then | ||
10 | MACHINE=$1 | ||
11 | else | ||
12 | MACHINE="qemuarm" | ||
13 | fi | ||
14 | |||
15 | if [ "x$2" != "x" ]; then | ||
16 | TYPE=$1 | ||
17 | else | ||
18 | TYPE="ext2" | ||
19 | fi | ||
20 | |||
21 | if [ "x$3" != "x" ]; then | ||
22 | ZIMAGE=$3 | ||
23 | fi | ||
24 | |||
25 | if [ "x$4" != "x" ]; then | ||
26 | HDIMAGE=$4 | ||
27 | fi | ||
28 | |||
29 | if [ "$MACHINE" == "qemuarm" ]; then | ||
30 | if [ "x$ZIMAGE" == "x" ]; then | ||
31 | ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-qemuarm.bin | ||
32 | fi | ||
33 | |||
34 | QEMU=`which qemu-system-arm` | ||
35 | |||
36 | if [ "$TYPE" == "ext2" ]; then | ||
37 | if [ "x$HDIMAGE" == "x" ]; then | ||
38 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2 | ||
39 | fi | ||
40 | sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet | ||
41 | fi | ||
42 | if [ "$TYPE" == "nfs" -a ]; then | ||
43 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | ||
44 | sudo $QEMU -kernel $1 -append "root=/dev/sda nfsroot=192.168.7.1:/srv/qemuarm rw ip=192.168.7.2::192.168.7.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -M versatilepb -hda /tmp/blank | ||
45 | rm /tmp/blank | ||
46 | fi | ||
47 | fi | ||
48 | |||