diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile index bffc10b54..82bf64e1d 100644 --- a/utils/qemu/Makefile +++ b/utils/qemu/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qemu PKG_VERSION:=4.2.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0 PKG_SOURCE_URL:=http://download.qemu.org/ diff --git a/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch b/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch index d2e9823c4..e3c29dc12 100644 --- a/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch +++ b/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch @@ -1,7 +1,7 @@ From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 24 Feb 2018 13:43:19 +0800 -Subject: [PATCH 1/5] configure: allow disable fortify_source +Subject: [PATCH] configure: allow disable fortify_source Tell build system of qemu to not add _FORTIFY_SOURCE options and let the OpenWrt base build system decide flavor of fortify_source to use diff --git a/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch b/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch index cdd8b3d01..2bc6446bf 100644 --- a/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch +++ b/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch @@ -1,8 +1,7 @@ From 2a6ab8342245c8dc2a09478d8eb0292e2dbcecf2 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 2 Apr 2019 06:31:31 +0000 -Subject: [PATCH 2/5] configure: allow enabling/disabling libudev from command - line +Subject: [PATCH] configure: allow enabling/disabling libudev from command line --- configure | 4 ++++ diff --git a/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch b/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch index 8ac16c6a7..bedf363c5 100644 --- a/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch +++ b/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch @@ -1,8 +1,8 @@ From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Fri, 7 Feb 2020 03:02:44 +0800 -Subject: [PATCH 3/5] configure: enable guest_agent no matter whether softmmu - is enabled +Subject: [PATCH] configure: enable guest_agent no matter whether softmmu is + enabled guest_agent as a tool to be run on guest machines does not depend on whether there is a softmmu is to be built at this configure/make run diff --git a/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch index 8b85b5dde..c7b2f92ae 100644 --- a/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch +++ b/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch @@ -1,7 +1,7 @@ From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 24 Feb 2018 13:45:25 +0800 -Subject: [PATCH 4/5] disas: fix compilation failure when isnan is a macro +Subject: [PATCH] disas: fix compilation failure when isnan is a macro --- disas/libvixl/vixl/utils.h | 16 +++++++++++----- diff --git a/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch index 02dca03cf..a3846b373 100644 --- a/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch +++ b/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch @@ -1,8 +1,7 @@ From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 24 Feb 2018 13:46:31 +0800 -Subject: [PATCH 5/5] pc-bios: fix compilation when $(AS) is actually gcc - driver +Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver --- pc-bios/optionrom/Makefile | 4 ++-- diff --git a/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch b/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch new file mode 100644 index 000000000..53eaf08cd --- /dev/null +++ b/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch @@ -0,0 +1,50 @@ +From f385b623c14b5208df88b0be479a9ab30ab68c72 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Mon, 30 Mar 2020 12:48:58 +0800 +Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC + +Quote musl-libc commit 9b57db3f958 ("add MAP_SYNC and +MAP_SHARED_VALIDATE from linux v4.15") + + > for synchronous page faults, new in linux commit + > 1c9725974074a047f6080eecc62c50a8e840d050 and + > b6fb293f2497a9841d94f6b57bd2bb2cd222da43 + > note that only targets that use asm-generic/mman.h have this new + > flag defined, so undef it on other targets (mips*, powerpc*). + +Fixes 119906afa5c ("util/mmap-alloc: support MAP_SYNC in +qemu_ram_mmap()") + +Signed-off-by: Yousong Zhou +--- + util/mmap-alloc.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c +index 27dcccd8ec..e133e38d21 100644 +--- a/util/mmap-alloc.c ++++ b/util/mmap-alloc.c +@@ -12,9 +12,6 @@ + + #ifdef CONFIG_LINUX + #include +-#else /* !CONFIG_LINUX */ +-#define MAP_SYNC 0x0 +-#define MAP_SHARED_VALIDATE 0x0 + #endif /* CONFIG_LINUX */ + + #include "qemu/osdep.h" +@@ -27,6 +24,13 @@ + #include + #endif + ++#ifndef MAP_SYNC ++#define MAP_SYNC 0x0 ++#endif ++#ifndef MAP_SHARED_VALIDATE ++#define MAP_SHARED_VALIDATE 0x0 ++#endif ++ + size_t qemu_fd_getpagesize(int fd) + { + #ifdef CONFIG_LINUX