diff options
| author | Richard Purdie <richard@openedhand.com> | 2008-02-04 19:29:39 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2008-02-04 19:29:39 +0000 |
| commit | ca2c506f96b9d5af5d40ee66e3b0508052100630 (patch) | |
| tree | db522a634574bd160e7dbab84528b81a642c0c82 /scripts | |
| parent | 1888ad6cb8e419d94e7b520565eea5e7854269a0 (diff) | |
| download | poky-ca2c506f96b9d5af5d40ee66e3b0508052100630.tar.gz | |
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')
| -rwxr-xr-x | scripts/poky-qemu-internal | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index b43639eb77..46e1688728 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
| @@ -61,7 +61,7 @@ if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita" | |||
| 61 | fi | 61 | fi |
| 62 | 62 | ||
| 63 | if [ "$MACHINE" = "qemuarm" ]; then | 63 | if [ "$MACHINE" = "qemuarm" ]; then |
| 64 | QEMU=`which qemu-system-arm` | 64 | QEMU=qemu-system-arm |
| 65 | if [ "$TYPE" = "ext2" ]; then | 65 | if [ "$TYPE" = "ext2" ]; then |
| 66 | KERNCMDLINE="root=/dev/sda console=ttyAMA0 console=tty0 mem=$QEMU_MEMORY" | 66 | KERNCMDLINE="root=/dev/sda console=ttyAMA0 console=tty0 mem=$QEMU_MEMORY" |
| 67 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet" | 67 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet" |
| @@ -80,7 +80,7 @@ if [ "$MACHINE" = "qemuarm" ]; then | |||
| 80 | fi | 80 | fi |
| 81 | 81 | ||
| 82 | if [ "$MACHINE" = "qemux86" ]; then | 82 | if [ "$MACHINE" = "qemux86" ]; then |
| 83 | QEMU=`which qemu` | 83 | QEMU=qemu |
| 84 | if [ "$TYPE" = "ext2" ]; then | 84 | if [ "$TYPE" = "ext2" ]; then |
| 85 | KERNCMDLINE="root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" | 85 | KERNCMDLINE="root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" |
| 86 | QEMUOPTIONS="-std-vga $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet" | 86 | QEMUOPTIONS="-std-vga $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet" |
| @@ -99,7 +99,7 @@ if [ "$MACHINE" = "qemux86" ]; then | |||
| 99 | fi | 99 | fi |
| 100 | 100 | ||
| 101 | if [ "$MACHINE" = "spitz" ]; then | 101 | if [ "$MACHINE" = "spitz" ]; then |
| 102 | QEMU=`which qemu-system-arm` | 102 | QEMU=qemu-system-arm |
| 103 | if [ "$TYPE" = "ext3" ]; then | 103 | if [ "$TYPE" = "ext3" ]; then |
| 104 | echo $HDIMAGE | 104 | echo $HDIMAGE |
| 105 | HDIMAGE=`readlink -f $HDIMAGE` | 105 | HDIMAGE=`readlink -f $HDIMAGE` |
| @@ -113,7 +113,7 @@ if [ "$MACHINE" = "spitz" ]; then | |||
| 113 | fi | 113 | fi |
| 114 | 114 | ||
| 115 | if [ "$MACHINE" = "akita" ]; then | 115 | if [ "$MACHINE" = "akita" ]; then |
| 116 | QEMU=`which qemu-system-arm` | 116 | QEMU=qemu-system-arm |
| 117 | if [ "$TYPE" = "jffs2" ]; then | 117 | if [ "$TYPE" = "jffs2" ]; then |
| 118 | HDIMAGE=`readlink -f $HDIMAGE` | 118 | HDIMAGE=`readlink -f $HDIMAGE` |
| 119 | if [ ! -e "$HDIMAGE.qemuflash" ]; then | 119 | if [ ! -e "$HDIMAGE.qemuflash" ]; then |
| @@ -139,6 +139,8 @@ if [ "$MACHINE" = "qemux86" ]; then | |||
| 139 | fi | 139 | fi |
| 140 | PATH=$CROSSPATH:$SDKPATH:$PATH | 140 | PATH=$CROSSPATH:$SDKPATH:$PATH |
| 141 | 141 | ||
| 142 | QEMUBIN=`which $QEMU` | ||
| 143 | |||
| 142 | function _quit() { | 144 | function _quit() { |
| 143 | if [ -n "$PIDFILE" ]; then | 145 | if [ -n "$PIDFILE" ]; then |
| 144 | #echo kill `cat $PIDFILE` | 146 | #echo kill `cat $PIDFILE` |
| @@ -161,8 +163,8 @@ else | |||
| 161 | fi | 163 | fi |
| 162 | 164 | ||
| 163 | echo "Running $QEMU using sudo..." | 165 | echo "Running $QEMU using sudo..." |
| 164 | echo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" | 166 | echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" |
| 165 | sudo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true | 167 | sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true |
| 166 | 168 | ||
| 167 | trap - INT TERM QUIT | 169 | trap - INT TERM QUIT |
| 168 | return | 170 | return |
