diff options
author | Steve Sakoman <steve@sakoman.com> | 2023-02-08 09:42:49 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-24 16:41:41 +0000 |
commit | 485370563552d99e158a907bba9143dc5cd3cea1 (patch) | |
tree | 2be02c0a886fbba07dec54fdc7b373d8c5d697c9 /meta | |
parent | c58bdcd15c13c18273825324292101de205a1944 (diff) | |
download | poky-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.bb | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu_4.2.0.bb | 4 |
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 | ||
10 | EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" | 10 | EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}" |
11 | 11 | ||
12 | PACKAGECONFIG ??= "fdt alsa kvm" | 12 | PACKAGECONFIG ??= "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 |
15 | PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | 15 | PACKAGECONFIG_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" | |||
279 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" | 279 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" |
280 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" | 280 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" |
281 | PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" | 281 | PACKAGECONFIG[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 | ||
283 | PACKAGECONFIG[slirp] = "--enable-slirp=git,--disable-slirp" | ||
282 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd" | 284 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd" |
283 | PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" | 285 | PACKAGECONFIG[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 | ||
26 | PACKAGECONFIG ??= " \ | 26 | PACKAGECONFIG ??= " \ |
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 | " |
31 | PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" | 31 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm slirp" |