From 67d732d5138e59588f6d98b836061f7966d10f05 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 4 Dec 2006 12:29:41 +0000 Subject: scripts/runqemu: Remove some duplication git-svn-id: https://svn.o-hand.com/repos/poky/trunk@996 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- scripts/runqemu | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'scripts/runqemu') 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 -- cgit v1.2.3