aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-01-02 17:10:16 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-08 11:13:47 +0000
commit75a1dd39a63329e9b2d41d3a12ff58049248d2ff (patch)
treed3bc01ea082898d44cfeb3e240dc69da6c8b4ab0
parent9d908f6369e938f1da4456dbc07c64f328656182 (diff)
downloadopenembedded-core-contrib-75a1dd39a63329e9b2d41d3a12ff58049248d2ff.tar.gz
openembedded-core-contrib-75a1dd39a63329e9b2d41d3a12ff58049248d2ff.tar.bz2
openembedded-core-contrib-75a1dd39a63329e9b2d41d3a12ff58049248d2ff.zip
qemu: Convert KVMOPTS to PACKAGECONFIG
Move the KVMOPTS configuration checks and option setting to a PACKAGECONFIG option. This also changes the checking of KVM support on the host build machine so that it is processed as a PACKAGECONFIG _remove for class-native only. The darwin/mingw32 overrides are kept and applied as _remove overrides. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc26
1 files changed, 12 insertions, 14 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 72430cc6fd..5bd41d0d90 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -65,19 +65,8 @@ do_configure_prepend_class-native() {
"${S}"/Makefile "${S}"/Makefile.target
}
-KVMENABLE = "--enable-kvm"
-KVMENABLE_darwin = "--disable-kvm"
-KVMENABLE_mingw32 = "--disable-kvm"
-
do_configure() {
- # Handle distros such as CentOS 5 32-bit that do not have kvm support
- KVMOPTS="--disable-kvm"
- if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
- || [ -f /usr/include/linux/kvm.h ] ; then
- KVMOPTS="${KVMENABLE}"
- fi
-
- ${S}/configure ${EXTRA_OECONF} $KVMOPTS
+ ${S}/configure ${EXTRA_OECONF}
test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
}
@@ -115,10 +104,18 @@ do_install_append() {
PACKAGECONFIG ??= " \
fdt sdl \
+ fdt sdl kvm \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
"
-PACKAGECONFIG_class-native ??= "fdt alsa uuid"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+PACKAGECONFIG_class-native ??= "fdt alsa uuid kvm"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
+
+# Handle distros such as CentOS 5 32-bit that do not have kvm support
+PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
+
+# Disable kvm on targets that do not support it
+PACKAGECONFIG_remove_darwin = "kvm"
+PACKAGECONFIG_remove_mingw32 = "kvm"
PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
@@ -147,5 +144,6 @@ PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
+PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
INSANE_SKIP_${PN} = "arch"