summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2023-02-08 09:42:49 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-24 16:41:41 +0000
commit485370563552d99e158a907bba9143dc5cd3cea1 (patch)
tree2be02c0a886fbba07dec54fdc7b373d8c5d697c9 /meta
parentc58bdcd15c13c18273825324292101de205a1944 (diff)
downloadpoky-485370563552d99e158a907bba9143dc5cd3cea1.tar.gz
qemu: Fix slirp determinism issue
Add a PACKAGECONFIG option for slirp, defaulting to internal. This avoids the presence of libslirp on the host causing qemu to link against that instead breaking reproducibility and usability of the binary on hosts where the library isn't present. We need to add it to PACKAGECONFIG by default since users do expect slirp to be enabled in the wider community. Note: qemu version 4.2.0 doesn't support an "internal" option for enable-slirp, so use "git" instead which uses the same configure code path, avoids host libslirp contamination and forces use of the qemu internal slirp implementation. (From OE-Core rev: e5dc03e4a3b71ff144896a8ce56a34b8677e8e27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5a9a64132bf5ecac9d611d29751226a466c4a2c1) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb2
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc2
-rw-r--r--meta/recipes-devtools/qemu/qemu_4.2.0.bb4
3 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
index d83ee59375..5ae6a37f26 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
@@ -9,7 +9,7 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
9 9
10EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" 10EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
11 11
12PACKAGECONFIG ??= "fdt alsa kvm" 12PACKAGECONFIG ??= "fdt alsa kvm slirp"
13 13
14# Handle distros such as CentOS 5 32-bit that do not have kvm support 14# Handle distros such as CentOS 5 32-bit that do not have kvm support
15PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" 15PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index fff2c87780..e9fcb239b4 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -279,6 +279,8 @@ PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone"
279PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" 279PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
280PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" 280PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
281PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" 281PACKAGECONFIG[vde] = "--enable-vde,--disable-vde"
282# version 4.2.0 doesn't have an "internal" option for enable-slirp, so use "git" which uses the same configure code path
283PACKAGECONFIG[slirp] = "--enable-slirp=git,--disable-slirp"
282PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd" 284PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd"
283PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" 285PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
284 286
diff --git a/meta/recipes-devtools/qemu/qemu_4.2.0.bb b/meta/recipes-devtools/qemu/qemu_4.2.0.bb
index f9905e2812..05449afe4e 100644
--- a/meta/recipes-devtools/qemu/qemu_4.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_4.2.0.bb
@@ -24,8 +24,8 @@ do_install_append_class-nativesdk() {
24} 24}
25 25
26PACKAGECONFIG ??= " \ 26PACKAGECONFIG ??= " \
27 fdt sdl kvm \ 27 fdt sdl kvm slirp \
28 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ 28 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
29 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ 29 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
30" 30"
31PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" 31PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm slirp"