diff options
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index d1e33517b0..3b4ad1bf16 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1,5 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if [ "x$BUILDDIR" == "x" ]; then | ||
4 | echo "You need to source poky-init-build-env before running this script" | ||
5 | exit 1 | ||
6 | fi | ||
7 | |||
3 | PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH | 8 | PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH |
4 | 9 | ||
5 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" | 10 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" |
@@ -40,10 +45,12 @@ if [ "$MACHINE" == "qemuarm" ]; then | |||
40 | if [ "x$HDIMAGE" == "x" ]; then | 45 | if [ "x$HDIMAGE" == "x" ]; then |
41 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2 | 46 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2 |
42 | fi | 47 | fi |
48 | echo "Running $QEMU using sudo..." | ||
43 | sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet | 49 | sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet |
44 | fi | 50 | fi |
45 | if [ "$TYPE" == "nfs" ]; then | 51 | if [ "$TYPE" == "nfs" ]; then |
46 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | 52 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 |
53 | echo "Running $QEMU using sudo..." | ||
47 | sudo $QEMU -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemuarm rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -M versatilepb -hda /tmp/blank | 54 | sudo $QEMU -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemuarm rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -M versatilepb -hda /tmp/blank |
48 | rm /tmp/blank | 55 | rm /tmp/blank |
49 | fi | 56 | fi |
@@ -61,10 +68,12 @@ if [ "$MACHINE" == "qemux86" ]; then | |||
61 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 | 68 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 |
62 | fi | 69 | fi |
63 | # video=vesafb:1024x768-32@86 | 70 | # video=vesafb:1024x768-32@86 |
71 | echo "Running $QEMU using sudo..." | ||
64 | sudo $QEMU -std-vga -kernel $ZIMAGE -append "root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet | 72 | sudo $QEMU -std-vga -kernel $ZIMAGE -append "root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet |
65 | fi | 73 | fi |
66 | if [ "$TYPE" == "nfs" ]; then | 74 | if [ "$TYPE" == "nfs" ]; then |
67 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | 75 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 |
76 | echo "Running $QEMU using sudo..." | ||
68 | sudo $QEMU -std-vga -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemux86 rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda /tmp/blank | 77 | sudo $QEMU -std-vga -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemux86 rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda /tmp/blank |
69 | rm /tmp/blank | 78 | rm /tmp/blank |
70 | fi | 79 | fi |