diff options
author | Richard Purdie <richard@openedhand.com> | 2006-12-04 12:29:41 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-12-04 12:29:41 +0000 |
commit | 67d732d5138e59588f6d98b836061f7966d10f05 (patch) | |
tree | 9f449c554a2d32e4c7c8a5b45477e0beb8a2575c | |
parent | 6a83bb19de71176f22f23b58f7fed8ba6aa88313 (diff) | |
download | poky-67d732d5138e59588f6d98b836061f7966d10f05.tar.gz |
scripts/runqemu: Remove some duplication
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@996 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rwxr-xr-x | scripts/runqemu | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 1ab174f4d1..b0273f4c38 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -70,14 +70,11 @@ if [ "$MACHINE" == "qemuarm" ]; then | |||
70 | if [ "x$HDIMAGE" == "x" ]; then | 70 | if [ "x$HDIMAGE" == "x" ]; then |
71 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-qemuarm.ext2 | 71 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-qemuarm.ext2 |
72 | fi | 72 | fi |
73 | echo "Running $QEMU using sudo..." | 73 | QEMUOPTIONS="-append \"root=/dev/sda mem=$QEMU_MEMORY\" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet" |
74 | sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet | ||
75 | fi | 74 | fi |
76 | if [ "$TYPE" == "nfs" ]; then | 75 | if [ "$TYPE" == "nfs" ]; then |
77 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | 76 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 |
78 | echo "Running $QEMU using sudo..." | 77 | QEMUOPTIONS="-append \"root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemuarm rw $KERNEL_NETWORK_CMD\" $QEMU_NETWORK_CMD -M versatilepb -hda /tmp/blank" |
79 | 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 | ||
80 | rm /tmp/blank | ||
81 | fi | 78 | fi |
82 | fi | 79 | fi |
83 | 80 | ||
@@ -87,17 +84,28 @@ if [ "$MACHINE" == "qemux86" ]; then | |||
87 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 | 84 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 |
88 | fi | 85 | fi |
89 | # video=vesafb:1024x768-32@86 | 86 | # video=vesafb:1024x768-32@86 |
90 | echo "Running $QEMU using sudo..." | 87 | QEMUOPTIONS="-std-vga -append \"root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD\" $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet" |
91 | 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 | ||
92 | fi | 88 | fi |
93 | if [ "$TYPE" == "nfs" ]; then | 89 | if [ "$TYPE" == "nfs" ]; then |
94 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 | 90 | dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 |
95 | echo "Running $QEMU using sudo..." | 91 | QEMUOPTIONS="-std-vga -append \"root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemux86 rw $KERNEL_NETWORK_CMD\" $QEMU_NETWORK_CMD -hda /tmp/blank" |
96 | 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 | ||
97 | rm /tmp/blank | ||
98 | fi | 92 | fi |
99 | fi | 93 | fi |
100 | 94 | ||
95 | if [ "x$QEMUOPTIONS" == "x" ]; then | ||
96 | echo "Sorry, unable to support this configuration" | ||
97 | exit 1 | ||
98 | fi | ||
99 | |||
100 | echo "Running $QEMU using sudo..." | ||
101 | echo "$QEMU -kernel $ZIMAGE $QEMUOPTIONS" | ||
102 | sudo $QEMU -kernel $ZIMAGE $QEMUOPTIONS | ||
103 | # -serial file:serial.log | ||
104 | |||
101 | if [ -x "$DISTCCD" ]; then | 105 | if [ -x "$DISTCCD" ]; then |
102 | killall distccd | 106 | killall distccd |
103 | fi | 107 | fi |
108 | |||
109 | if [ -e /tmp/blank ]; then | ||
110 | rm /tmp/blank | ||
111 | fi | ||