LICENSE = "GPLv2 & LGPLv2.1"
DEPENDS = "zlib"
-EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu,x86_64-linux-user,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-linux-user,ppc-softmmu,mipsel-linux-user --disable-werror --disable-vnc-tls"
+EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-linux-user,i386-softmmu,x86_64-linux-user,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-linux-user,ppc-softmmu,mipsel-linux-user --disable-werror --disable-vnc-tls --enable-kvm"
#EXTRA_OECONF += "--disable-sdl"
inherit autotools
# Parse command line args without requiring specific ordering. It's a
# bit more complex, but offers a great user experience.
+KVM_ENABLED="no"
i=1
while [ $i -le $# ]; do
arg=${!i}
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
;;
+ "kvm")
+ KVM_ENABLED="yes"
+ KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo`
+ ;;
*)
# A directory name is an nfs rootfs
if [ -d "$arg" ]; then
i=$((i + 1))
done
+# Detect KVM configuration
+if [[ "x$KVM_ENABLED" == "xyes" && ! -z "$KVM_CAPABLE" ]]; then
+ if [[ "x$MACHINE" == "xqemux86" || "x$MACHINE" == "xqemux86-64" ]]; then
+ SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
+ fi
+fi
+
# Report errors for missing combinations of options
if [[ -z "$MACHINE" && -z "$KERNEL" ]]; then
echo "Error: you must specify at least a MACHINE or KERNEL argument"