Skip to content
Snippets Groups Projects
Verified Commit b6c0e8ad authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

qemu: Drop version 5.2.0


oe-core now comes with a newer version: 6.1.0. 5.2.0 version was an
upgrade for dunfell but now that we move to newer layers, we can drop it
and use the latest in upstream.

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent fb297405
No related branches found
No related tags found
1 merge request!30flavours/zephyr/local.conf.sample: Bump CONF_VERSION
OE assumes that mingw files are in a unix like file layout. The
'flattening' done by configure in qemu for mingw32 breaks things
for us. We are discussing with upstream but for now, hack this to
disable it and use the unix like layout everywhere.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01073.html]
Index: qemu-5.2.0/configure
===================================================================
--- qemu-5.2.0.orig/configure
+++ qemu-5.2.0/configure
@@ -1541,7 +1541,7 @@ libdir="${libdir:-$prefix/lib}"
libexecdir="${libexecdir:-$prefix/libexec}"
includedir="${includedir:-$prefix/include}"
-if test "$mingw32" = "yes" ; then
+if test "$mingw32" = "dontwantthis" ; then
mandir="$prefix"
datadir="$prefix"
docdir="$prefix"
If mremap() is called without the MREMAP_MAYMOVE flag with a start address
just before the end of memory (reserved_va) where new_size would exceed
GUEST_ADD_MAX, the assert(end - 1 <= GUEST_ADDR_MAX) in page_set_flags()
would trigger.
Add an extra guard to the guest_range_valid() checks to prevent this and
avoid asserting binaries when reserved_va is set.
This meant a test case now gives the same behaviour regardless of whether
reserved_va is set or not.
Upstream-Status: Backport [https://github.com/qemu/qemu/commit/ccc5ccc17f8cfbfd87d9aede5d12a2d47c56e712]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
Index: qemu-5.2.0/linux-user/mmap.c
===================================================================
--- qemu-5.2.0.orig/linux-user/mmap.c
+++ qemu-5.2.0/linux-user/mmap.c
@@ -727,7 +727,9 @@ abi_long target_mremap(abi_ulong old_add
if (!guest_range_valid(old_addr, old_size) ||
((flags & MREMAP_FIXED) &&
- !guest_range_valid(new_addr, new_size))) {
+ !guest_range_valid(new_addr, new_size)) ||
+ ((flags & MREMAP_MAYMOVE) == 0 &&
+ !guest_range_valid(old_addr, new_size))) {
errno = ENOMEM;
return -1;
}
When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an
infinite loop of mremap calls of ever decreasing/increasing addresses.
I suspect something in the musl memory allocation code loops indefinitely
if it only sees ENOMEM and only exits when it hits EFAULT.
According to the docs, trying to mremap outside the address space
can/should return EFAULT and changing this allows the build to succeed.
A better return value for the other cases of invalid addresses is EINVAL
rather than ENOMEM so adjust the other part of the test to this.
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
Index: qemu-5.2.0/linux-user/mmap.c
===================================================================
--- qemu-5.2.0.orig/linux-user/mmap.c
+++ qemu-5.2.0/linux-user/mmap.c
@@ -722,12 +722,14 @@ abi_long target_mremap(abi_ulong old_add
int prot;
void *host_addr;
- if (!guest_range_valid(old_addr, old_size) ||
- ((flags & MREMAP_FIXED) &&
- !guest_range_valid(new_addr, new_size)) ||
- ((flags & MREMAP_MAYMOVE) == 0 &&
- !guest_range_valid(old_addr, new_size))) {
- errno = ENOMEM;
+ if (!guest_range_valid(old_addr, old_size)) {
+ errno = EFAULT;
+ return -1;
+ }
+
+ if (((flags & MREMAP_FIXED) && !guest_range_valid(new_addr, new_size)) ||
+ ((flags & MREMAP_MAYMOVE) == 0 && !guest_range_valid(old_addr, new_size))) {
+ errno = EINVAL;
return -1;
}
File deleted
#!/bin/sh
#
#This script is used to run qemu test suites
#
ptestdir=$(dirname "$(readlink -f "$0")")
export SRC_PATH=$ptestdir
cd $ptestdir/tests
tests=$(find . -name "test-*" ! -name "*.p")
for f in $tests; do
$f | sed '/^ok/ s/ok/PASS:/g'
done
BBCLASSEXTEND = "nativesdk"
require qemu.inc
# error: a parameter list without types is only allowed in a function definition
# void (*_function)(sigval_t);
COMPATIBLE_HOST_libc-musl = 'null'
DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
RDEPENDS_${PN}_class-target += "bash"
EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}"
EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
do_install_append_class-nativesdk() {
${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
}
PACKAGECONFIG ??= " \
fdt sdl kvm \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \
"
PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \
"
SUMMARY = "QEMU wrapper script"
HOMEPAGE = "http://qemu.org"
LICENSE = "MIT"
S = "${WORKDIR}"
DEPENDS += "qemu-native"
inherit qemu
do_populate_sysroot[depends] = ""
do_install () {
install -d ${D}${bindir_crossscripts}/
qemu_binary=${@qemu_target_binary(d)}
qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}'
cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF
#!/bin/sh
set -x
if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False -a "${PN}" != "nativesdk-qemuwrapper-cross" ]; then
echo "qemuwrapper: qemu usermode is not supported"
exit 1
fi
$qemu_binary $qemu_options "\$@"
EOF
chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
}
SYSROOT_DIRS += "${bindir_crossscripts}"
INHIBIT_DEFAULT_DEPS = "1"
BBCLASSEXTEND = "nativesdk"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment