diff options
-rwxr-xr-x | scripts/runqemu | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 49403a6167..1eda1c99b8 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -13,7 +13,7 @@ else | |||
13 | fi | 13 | fi |
14 | 14 | ||
15 | if [ "x$2" != "x" ]; then | 15 | if [ "x$2" != "x" ]; then |
16 | TYPE=$1 | 16 | TYPE=$2 |
17 | else | 17 | else |
18 | TYPE="ext2" | 18 | TYPE="ext2" |
19 | fi | 19 | fi |
@@ -39,10 +39,30 @@ if [ "$MACHINE" == "qemuarm" ]; then | |||
39 | fi | 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 | 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 | 41 | fi |
42 | if [ "$TYPE" == "nfs" -a ]; then | 42 | if [ "$TYPE" == "nfs" ]; then |
43 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | 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 | 44 | sudo $QEMU -kernel $1 -append "root=/dev/nfs 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 | 45 | rm /tmp/blank |
46 | fi | 46 | fi |
47 | fi | 47 | fi |
48 | 48 | ||
49 | if [ "$MACHINE" == "qemux86" ]; then | ||
50 | if [ "x$ZIMAGE" == "x" ]; then | ||
51 | ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-qemux86.bin | ||
52 | fi | ||
53 | |||
54 | QEMU=`which qemu` | ||
55 | |||
56 | if [ "$TYPE" == "ext2" ]; then | ||
57 | if [ "x$HDIMAGE" == "x" ]; then | ||
58 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 | ||
59 | fi | ||
60 | # video=vesafb:1024x768-32@86 | ||
61 | sudo $QEMU -std-vga -kernel $ZIMAGE -append "root=/dev/hda mem=$QEMU_MEMORY" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -hda $HDIMAGE -usb -usbdevice wacom-tablet | ||
62 | fi | ||
63 | if [ "$TYPE" == "nfs" ]; then | ||
64 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | ||
65 | sudo $QEMU -std-vga -kernel $1 -append "root=/dev/nfs 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 -hda /tmp/blank | ||
66 | rm /tmp/blank | ||
67 | fi | ||
68 | fi | ||