diff options
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 |