summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu.inc
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:52:57 +0000
commited25789bc0661a5d4ff2b6219d318d5058e6b12f (patch)
treeb829d6fee07e7cc5e0dc85c8c15ef32f814e81fd /meta/recipes-devtools/qemu/qemu.inc
parent6e7a2f0ba3a1426e1dff9b049a1281cb9517dd6e (diff)
downloadpoky-ed25789bc0661a5d4ff2b6219d318d5058e6b12f.tar.gz
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. (From OE-Core rev: 75a1dd39a63329e9b2d41d3a12ff58049248d2ff) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-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() {
65 "${S}"/Makefile "${S}"/Makefile.target 65 "${S}"/Makefile "${S}"/Makefile.target
66} 66}
67 67
68KVMENABLE = "--enable-kvm"
69KVMENABLE_darwin = "--disable-kvm"
70KVMENABLE_mingw32 = "--disable-kvm"
71
72do_configure() { 68do_configure() {
73 # Handle distros such as CentOS 5 32-bit that do not have kvm support 69 ${S}/configure ${EXTRA_OECONF}
74 KVMOPTS="--disable-kvm"
75 if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
76 || [ -f /usr/include/linux/kvm.h ] ; then
77 KVMOPTS="${KVMENABLE}"
78 fi
79
80 ${S}/configure ${EXTRA_OECONF} $KVMOPTS
81 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh 70 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
82} 71}
83 72
@@ -115,10 +104,18 @@ do_install_append() {
115 104
116PACKAGECONFIG ??= " \ 105PACKAGECONFIG ??= " \
117 fdt sdl \ 106 fdt sdl \
107 fdt sdl kvm \
118 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ 108 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
119 " 109 "
120PACKAGECONFIG_class-native ??= "fdt alsa uuid" 110PACKAGECONFIG_class-native ??= "fdt alsa uuid kvm"
121PACKAGECONFIG_class-nativesdk ??= "fdt sdl" 111PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
112
113# Handle distros such as CentOS 5 32-bit that do not have kvm support
114PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
115
116# Disable kvm on targets that do not support it
117PACKAGECONFIG_remove_darwin = "kvm"
118PACKAGECONFIG_remove_mingw32 = "kvm"
122 119
123PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl" 120PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
124PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr," 121PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
@@ -147,5 +144,6 @@ PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
147PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" 144PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
148PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" 145PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
149PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" 146PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
147PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
150 148
151INSANE_SKIP_${PN} = "arch" 149INSANE_SKIP_${PN} = "arch"