summaryrefslogtreecommitdiff
path: root/scripts/poky-qemu-internal
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-02-04 19:29:39 +0000
committerRichard Purdie <richard@openedhand.com>2008-02-04 19:29:39 +0000
commitca2c506f96b9d5af5d40ee66e3b0508052100630 (patch)
treedb522a634574bd160e7dbab84528b81a642c0c82 /scripts/poky-qemu-internal
parent1888ad6cb8e419d94e7b520565eea5e7854269a0 (diff)
downloadopenembedded-core-ca2c506f96b9d5af5d40ee66e3b0508052100630.tar.gz
openembedded-core-ca2c506f96b9d5af5d40ee66e3b0508052100630.tar.bz2
openembedded-core-ca2c506f96b9d5af5d40ee66e3b0508052100630.tar.xz
openembedded-core-ca2c506f96b9d5af5d40ee66e3b0508052100630.zip
scripts/poky-qemu-internal: Fix PATH usage to find qemu binary
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3667 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-xscripts/poky-qemu-internal14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index b43639eb7..46e168872 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -61,7 +61,7 @@ if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita"
fi
if [ "$MACHINE" = "qemuarm" ]; then
- QEMU=`which qemu-system-arm`
+ QEMU=qemu-system-arm
if [ "$TYPE" = "ext2" ]; then
KERNCMDLINE="root=/dev/sda console=ttyAMA0 console=tty0 mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet"
@@ -80,7 +80,7 @@ if [ "$MACHINE" = "qemuarm" ]; then
fi
if [ "$MACHINE" = "qemux86" ]; then
- QEMU=`which qemu`
+ QEMU=qemu
if [ "$TYPE" = "ext2" ]; then
KERNCMDLINE="root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
QEMUOPTIONS="-std-vga $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet"
@@ -99,7 +99,7 @@ if [ "$MACHINE" = "qemux86" ]; then
fi
if [ "$MACHINE" = "spitz" ]; then
- QEMU=`which qemu-system-arm`
+ QEMU=qemu-system-arm
if [ "$TYPE" = "ext3" ]; then
echo $HDIMAGE
HDIMAGE=`readlink -f $HDIMAGE`
@@ -113,7 +113,7 @@ if [ "$MACHINE" = "spitz" ]; then
fi
if [ "$MACHINE" = "akita" ]; then
- QEMU=`which qemu-system-arm`
+ QEMU=qemu-system-arm
if [ "$TYPE" = "jffs2" ]; then
HDIMAGE=`readlink -f $HDIMAGE`
if [ ! -e "$HDIMAGE.qemuflash" ]; then
@@ -139,6 +139,8 @@ if [ "$MACHINE" = "qemux86" ]; then
fi
PATH=$CROSSPATH:$SDKPATH:$PATH
+QEMUBIN=`which $QEMU`
+
function _quit() {
if [ -n "$PIDFILE" ]; then
#echo kill `cat $PIDFILE`
@@ -161,8 +163,8 @@ else
fi
echo "Running $QEMU using sudo..."
-echo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE"
-sudo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true
+echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE"
+sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true
trap - INT TERM QUIT
return