]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
qemu: Allow native and nativesdk versions on Linux older then 4.17
authorMark Hatle <mark.hatle@amd.com>
Thu, 25 Jan 2024 21:03:54 +0000 (15:03 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Feb 2024 10:36:53 +0000 (10:36 +0000)
commit4eb0a83c7851e2eb6d7890a130dfe50f37ff8ac9
tree5b3145a5b605c63b03462cc99c7a2078939c25f6
parent9c67951634c2effd4fbe229338715ccb49378341
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.

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>
meta/recipes-devtools/qemu/qemu.inc
meta/recipes-devtools/qemu/qemu/0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch [new file with mode: 0644]
meta/recipes-devtools/qemu/qemu/0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch [new file with mode: 0644]