summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu40
1 files changed, 21 insertions, 19 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 231b1bf517..000d93a160 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -104,21 +104,19 @@ while [ $i -le $# ]; do
104 error "conflicting FSTYPE types [$FSTYPE] and [$arg]" 104 error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
105 ;; 105 ;;
106 *-image*) 106 *-image*)
107 if [ -z "$ROOTFS" ]; then 107 [ -z "$ROOTFS" ] || \
108 if [ -f "$arg" ]; then 108 error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
109 process_filename $arg 109 if [ -f "$arg" ]; then
110 elif [ -d "$arg" ]; then 110 process_filename $arg
111 # Handle the case where the nfsroot dir has -image- 111 elif [ -d "$arg" ]; then
112 # in the pathname 112 # Handle the case where the nfsroot dir has -image-
113 echo "Assuming $arg is an nfs rootfs" 113 # in the pathname
114 FSTYPE=nfs 114 echo "Assuming $arg is an nfs rootfs"
115 ROOTFS=$arg 115 FSTYPE=nfs
116 else 116 ROOTFS=$arg
117 ROOTFS=$arg
118 LAZY_ROOTFS="true"
119 fi
120 else 117 else
121 error "conflicting ROOTFS args [$ROOTFS] and [$arg]" 118 ROOTFS=$arg
119 LAZY_ROOTFS="true"
122 fi 120 fi
123 ;; 121 ;;
124 "nographic") 122 "nographic")
@@ -144,14 +142,15 @@ while [ $i -le $# ]; do
144 ;; 142 ;;
145 "audio") 143 "audio")
146 if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then 144 if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
147 echo "Enable audio on qemu. Pls. install snd_intel8x0 or snd_ens1370 driver in linux guest."; 145 echo "Enabling audio in qemu."
146 echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
148 QEMU_AUDIO_DRV="alsa" 147 QEMU_AUDIO_DRV="alsa"
149 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370" 148 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370"
150 fi 149 fi
151 ;; 150 ;;
152 "kvm") 151 "kvm")
153 KVM_ENABLED="yes" 152 KVM_ENABLED="yes"
154 KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo` 153 KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1`
155 ;; 154 ;;
156 *) 155 *)
157 # A directory name is an nfs rootfs 156 # A directory name is an nfs rootfs
@@ -190,7 +189,8 @@ YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qe
190# Detect KVM configuration 189# Detect KVM configuration
191if [ "x$KVM_ENABLED" = "xyes" ]; then 190if [ "x$KVM_ENABLED" = "xyes" ]; then
192 if [ -z "$KVM_CAPABLE" ]; then 191 if [ -z "$KVM_CAPABLE" ]; then
193 echo "You are tring to enable KVM on cpu without VT support. Remove kvm from the command-line, or refer"; 192 echo "You are trying to enable KVM on a cpu without VT support."
193 echo "Remove kvm from the command-line, or refer"
194 echo "$YOCTO_KVM_WIKI"; 194 echo "$YOCTO_KVM_WIKI";
195 exit 1; 195 exit 1;
196 fi 196 fi
@@ -199,14 +199,16 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
199 exit 1; 199 exit 1;
200 fi 200 fi
201 if [ ! -e /dev/kvm ]; then 201 if [ ! -e /dev/kvm ]; then
202 echo "Missing KVM device. Have you inserted kvm modules? Pls. refer"; 202 echo "Missing KVM device. Have you inserted kvm modules?"
203 echo "For further help see"
203 echo "$YOCTO_KVM_WIKI"; 204 echo "$YOCTO_KVM_WIKI";
204 exit 1; 205 exit 1;
205 fi 206 fi
206 if 9<>/dev/kvm ; then 207 if 9<>/dev/kvm ; then
207 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm" 208 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
208 else 209 else
209 echo "You have no rights on /dev/kvm. Pls. change the owndership as described at"; 210 echo "You have no rights on /dev/kvm."
211 echo "Please change the ownership of this file as described at"
210 echo "$YOCTO_KVM_WIKI"; 212 echo "$YOCTO_KVM_WIKI";
211 exit 1; 213 exit 1;
212 fi 214 fi