diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2017-01-02 17:10:16 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-08 11:52:57 +0000 |
commit | ed25789bc0661a5d4ff2b6219d318d5058e6b12f (patch) | |
tree | b829d6fee07e7cc5e0dc85c8c15ef32f814e81fd | |
parent | 6e7a2f0ba3a1426e1dff9b049a1281cb9517dd6e (diff) | |
download | poky-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>
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 26 |
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 | ||
68 | KVMENABLE = "--enable-kvm" | ||
69 | KVMENABLE_darwin = "--disable-kvm" | ||
70 | KVMENABLE_mingw32 = "--disable-kvm" | ||
71 | |||
72 | do_configure() { | 68 | do_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 | ||
116 | PACKAGECONFIG ??= " \ | 105 | PACKAGECONFIG ??= " \ |
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 | " |
120 | PACKAGECONFIG_class-native ??= "fdt alsa uuid" | 110 | PACKAGECONFIG_class-native ??= "fdt alsa uuid kvm" |
121 | PACKAGECONFIG_class-nativesdk ??= "fdt sdl" | 111 | PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" |
112 | |||
113 | # Handle distros such as CentOS 5 32-bit that do not have kvm support | ||
114 | PACKAGECONFIG_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 | ||
117 | PACKAGECONFIG_remove_darwin = "kvm" | ||
118 | PACKAGECONFIG_remove_mingw32 = "kvm" | ||
122 | 119 | ||
123 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl" | 120 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl" |
124 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr," | 121 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr," |
@@ -147,5 +144,6 @@ PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" | |||
147 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | 144 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" |
148 | PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" | 145 | PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" |
149 | PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" | 146 | PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" |
147 | PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm" | ||
150 | 148 | ||
151 | INSANE_SKIP_${PN} = "arch" | 149 | INSANE_SKIP_${PN} = "arch" |