diff options
author | Saul Wold <sgw@linux.intel.com> | 2012-08-23 13:45:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-25 14:46:57 +0100 |
commit | c9669451aac820d5d18f6ad237b60516c2172d1f (patch) | |
tree | 462a83a4dc9bdcd8a1a4ad9e7c0033b146054b3f /scripts/runqemu | |
parent | c13ee359ca1f658820893bae45870c6b118de887 (diff) | |
download | poky-c9669451aac820d5d18f6ad237b60516c2172d1f.tar.gz |
runqemu: Move the KVM check after the MACHINE/KERNEL Checks
The MACHINE/KERNEL Checks setup MACHINE is it's unset, the KVM checks valid
MACHINE is qemux86 or qemux86-64 and fail if it's unset!
[YOCTO #2970]
(From OE-Core rev: 8d5e6999caff50a4b7d9a9ba69f9875285270459)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 290f9ccce5..a3c35091b4 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -191,6 +191,22 @@ elif [ ! -w /dev/net/tun ] ; then | |||
191 | exit 1 | 191 | exit 1 |
192 | fi | 192 | fi |
193 | 193 | ||
194 | # Report errors for missing combinations of options | ||
195 | if [ -z "$MACHINE" -a -z "$KERNEL" ]; then | ||
196 | error "you must specify at least a MACHINE or KERNEL argument" | ||
197 | fi | ||
198 | if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then | ||
199 | error "NFS booting without an explicit ROOTFS path is not yet supported" | ||
200 | fi | ||
201 | |||
202 | if [ -z "$MACHINE" ]; then | ||
203 | MACHINE=`basename $KERNEL | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'` | ||
204 | if [ -z "$MACHINE" ]; then | ||
205 | error "Unable to set MACHINE from kernel filename [$KERNEL]" | ||
206 | fi | ||
207 | echo "Set MACHINE to [$MACHINE] based on kernel [$KERNEL]" | ||
208 | fi | ||
209 | |||
194 | YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" | 210 | YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" |
195 | # Detect KVM configuration | 211 | # Detect KVM configuration |
196 | if [ "x$KVM_ENABLED" = "xyes" ]; then | 212 | if [ "x$KVM_ENABLED" = "xyes" ]; then |
@@ -220,21 +236,6 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then | |||
220 | fi | 236 | fi |
221 | fi | 237 | fi |
222 | 238 | ||
223 | # Report errors for missing combinations of options | ||
224 | if [ -z "$MACHINE" -a -z "$KERNEL" ]; then | ||
225 | error "you must specify at least a MACHINE or KERNEL argument" | ||
226 | fi | ||
227 | if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then | ||
228 | error "NFS booting without an explicit ROOTFS path is not yet supported" | ||
229 | fi | ||
230 | |||
231 | if [ -z "$MACHINE" ]; then | ||
232 | MACHINE=`basename $KERNEL | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'` | ||
233 | if [ -z "$MACHINE" ]; then | ||
234 | error "Unable to set MACHINE from kernel filename [$KERNEL]" | ||
235 | fi | ||
236 | echo "Set MACHINE to [$MACHINE] based on kernel [$KERNEL]" | ||
237 | fi | ||
238 | machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` | 239 | machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` |
239 | # MACHINE is now set for all cases | 240 | # MACHINE is now set for all cases |
240 | 241 | ||