summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu.inc
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2024-01-25 15:03:54 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-02 10:38:28 +0000
commit069d2dfd86e8ba6cc6bcf21d908d87319ac1fcde (patch)
tree242313a9c58d11c76ddd406ad71cf73ca504beed /meta/recipes-devtools/qemu/qemu.inc
parent2608d399a2d5e12910c0625e87e7caf6db7f1fab (diff)
downloadpoky-069d2dfd86e8ba6cc6bcf21d908d87319ac1fcde.tar.gz
qemu: Allow native and nativesdk versions on Linux older then 4.17
Linux kernel 4.17 introduced two new mmap flags, MAP_FIXED_NOREPLACE and MAP_SHARED_VALIDATE. Starting with QEMU 8.1, these flags are now used and required for proper system operation. In order to build and run on a system older then 4.17, we need to emulate this new behavior. Not having a newer kernel could result in the mmap memory being allocated in a way that will cause failures without QEMU checking for these conditions. Note, memory allocation issues are rare in my experience so this is more of a 'just-in-case' behavior. SDK_OLDEST_KERNEL is currently set to 3.2.0, the only way this can claim that qemu works in an SDK is by checking the return values to emulate the expected behavior. (From OE-Core rev: 4eb0a83c7851e2eb6d7890a130dfe50f37ff8ac9) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index bc6ce0bb38..14b975db30 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -40,6 +40,18 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
40 " 40 "
41UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 41UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
42 42
43# SDK_OLDEST_KERNEL is set below 4.17, which is the minimum version required by QEMU >= 8.1
44# This is due to two MMAP flags being used at certain points
45SRC_URI:append:class-nativesdk = " \
46 file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \
47 file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \
48 "
49
50# Support building and using native version on pre 4.17 kernels
51SRC_URI:append:class-native = " \
52 file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \
53 file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \
54 "
43 55
44SRC_URI[sha256sum] = "bf00d2fa12010df8b0ade93371def58e632cb32a6bfdc5f5a0ff8e6a1fb1bf32" 56SRC_URI[sha256sum] = "bf00d2fa12010df8b0ade93371def58e632cb32a6bfdc5f5a0ff8e6a1fb1bf32"
45 57