summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-17 11:08:32 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-17 11:08:32 +0000
commit4a9392f5a3295b900eebc81fd6fd64a8029525df (patch)
tree9211a76434c7cf72cbe4b55b4320d9574089bc3b /scripts/runqemu
parentf4a8621a19550e4168a45e69386c82f031aa37f1 (diff)
downloadpoky-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-xscripts/runqemu48
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
3PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH
4
5if [ -z "$QEMU_MEMORY" ]; then
6 QEMU_MEMORY="64M"
7fi
8
9if [ "x$1" != "x" ]; then
10 MACHINE=$1
11else
12 MACHINE="qemuarm"
13fi
14
15if [ "x$2" != "x" ]; then
16 TYPE=$1
17else
18 TYPE="ext2"
19fi
20
21if [ "x$3" != "x" ]; then
22 ZIMAGE=$3
23fi
24
25if [ "x$4" != "x" ]; then
26 HDIMAGE=$4
27fi
28
29if [ "$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
47fi
48