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 /scripts/runqemu | |
parent | 6a83bb19de71176f22f23b58f7fed8ba6aa88313 (diff) | |
download | openembedded-core-67d732d5138e59588f6d98b836061f7966d10f05.tar.gz openembedded-core-67d732d5138e59588f6d98b836061f7966d10f05.tar.bz2 openembedded-core-67d732d5138e59588f6d98b836061f7966d10f05.zip |
scripts/runqemu: Remove some duplication
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@996 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/runqemu')
-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 if [ "x$HDIMAGE" == "x" ]; then HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-qemuarm.ext2 fi - echo "Running $QEMU using sudo..." - sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet + QEMUOPTIONS="-append \"root=/dev/sda mem=$QEMU_MEMORY\" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet" fi if [ "$TYPE" == "nfs" ]; then dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 - echo "Running $QEMU using sudo..." - 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 - rm /tmp/blank + 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" fi fi @@ -87,17 +84,28 @@ if [ "$MACHINE" == "qemux86" ]; then HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 fi # video=vesafb:1024x768-32@86 - echo "Running $QEMU using sudo..." - 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 + QEMUOPTIONS="-std-vga -append \"root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD\" $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet" fi if [ "$TYPE" == "nfs" ]; then dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 - echo "Running $QEMU using sudo..." - 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 - rm /tmp/blank + 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" fi fi +if [ "x$QEMUOPTIONS" == "x" ]; then + echo "Sorry, unable to support this configuration" + exit 1 +fi + +echo "Running $QEMU using sudo..." +echo "$QEMU -kernel $ZIMAGE $QEMUOPTIONS" +sudo $QEMU -kernel $ZIMAGE $QEMUOPTIONS +# -serial file:serial.log + if [ -x "$DISTCCD" ]; then killall distccd fi + +if [ -e /tmp/blank ]; then + rm /tmp/blank +fi |