summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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 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"
61fi 61fi
62 62
63if [ "$MACHINE" = "qemuarm" ]; then 63if [ "$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
80fi 80fi
81 81
82if [ "$MACHINE" = "qemux86" ]; then 82if [ "$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
99fi 99fi
100 100
101if [ "$MACHINE" = "spitz" ]; then 101if [ "$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
113fi 113fi
114 114
115if [ "$MACHINE" = "akita" ]; then 115if [ "$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
139fi 139fi
140PATH=$CROSSPATH:$SDKPATH:$PATH 140PATH=$CROSSPATH:$SDKPATH:$PATH
141 141
142QEMUBIN=`which $QEMU`
143
142function _quit() { 144function _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
161fi 163fi
162 164
163echo "Running $QEMU using sudo..." 165echo "Running $QEMU using sudo..."
164echo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" 166echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE"
165sudo $QEMU -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true 167sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS --append "$KERNCMDLINE" || /bin/true
166 168
167trap - INT TERM QUIT 169trap - INT TERM QUIT
168return 170return