include $(TOPDIR)/rules.mk
PKG_NAME:=qemu
-PKG_VERSION:=4.2.0
-PKG_RELEASE:=3
+PKG_VERSION:=5.0.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0
+PKG_HASH:=2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6
PKG_SOURCE_URL:=http://download.qemu.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
QEMU_DEPS_IN_GUEST := @(TARGET_x86_64||TARGET_armvirt||TARGET_arm64||TARGET_malta)
QEMU_DEPS_IN_HOST := @(TARGET_x86_64||TARGET_sunxi)
+QEMU_DEPS_IN_HOST += $(CXX_DEPENDS)
define Package/virtio-console-helper
SECTION:=utils
SUBMENU:=Virtualization
TITLE:=QEMU bridge helper
URL:=http://www.qemu.org
- DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
+ DEPENDS:=+glib2 $(QEMU_DEPS_IN_HOST)
endef
define Package/qemu-bridge-helper/install
SUBMENU:=Virtualization
TITLE:=QEMU target $(1)
URL:=http://www.qemu.org
- DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
+ DEPENDS:= +glib2 +libpthread +zlib $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
+QEMU_UI_VNC:qemu-keymaps \
+QEMU_UI_VNC_JPEG:libjpeg \
+QEMU_UI_VNC_PNG:libpng \
--enable-vhost-net \
--enable-vhost-scsi \
--enable-vhost-user \
+ --enable-vhost-user-fs \
--enable-vhost-vsock \
# Image formats support
--audio-drv-list='' \
--disable-attr \
--disable-auth-pam \
- --disable-bluez \
--disable-brlapi \
--disable-bzip2 \
--disable-cap-ng \
--disable-capstone \
+ --disable-containers \
--disable-curl \
--disable-debug-info \
--disable-debug-mutex \
--disable-lzfse \
--disable-lzo \
--disable-modules \
+ --disable-module-upgrades \
--disable-mpath \
--disable-netmap \
--disable-nettle \
--disable-numa \
--disable-opengl \
+ --disable-plugins \
--disable-pvrdma \
--disable-qom-cast-debug \
--disable-rbd \
--disable-vxhs \
--disable-werror \
--disable-xen-pci-passthrough \
+ --disable-xkbcommon \
--disable-xfsctl \
+ --disable-zstd \
CONFIGURE_ARGS += --target-list='$(foreach target,$(qemu-target-list),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
-From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001
+From 871bc03884e8dd4a4b50d05022e347e72f4733d9 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:43:19 +0800
+Date: Mon, 11 May 2020 10:46:09 +0800
Subject: [PATCH] configure: allow disable fortify_source
Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
-index 6099be1d84..b52d2cb406 100755
+index 23b5e93752..c8d2ac1c3e 100755
--- a/configure
+++ b/configure
-@@ -1539,6 +1539,8 @@ for opt do
+@@ -1601,6 +1601,8 @@ for opt do
;;
- --disable-plugins) plugins="no"
+ --gdb=*) gdb_bin="$optarg"
;;
+ --disable-fortify-source) fortify_source="no"
+ ;;
-From 2a6ab8342245c8dc2a09478d8eb0292e2dbcecf2 Mon Sep 17 00:00:00 2001
+From 608b183335725bcc1c2dd8b615551c49ec3b9c88 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Tue, 2 Apr 2019 06:31:31 +0000
+Date: Mon, 11 May 2020 10:46:37 +0800
Subject: [PATCH] configure: allow enabling/disabling libudev from command line
---
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
-index b52d2cb406..efe06f3c2b 100755
+index c8d2ac1c3e..cf3f8ffdd7 100755
--- a/configure
+++ b/configure
-@@ -1539,6 +1539,10 @@ for opt do
+@@ -1601,6 +1601,10 @@ for opt do
;;
- --disable-plugins) plugins="no"
+ --gdb=*) gdb_bin="$optarg"
;;
+ --enable-libudev) libudev=yes
+ ;;
-From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001
+From 3f07c9cb96b361f07ce637088f818bbe0edbcde3 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 7 Feb 2020 03:02:44 +0800
Subject: [PATCH] configure: enable guest_agent no matter whether softmmu is
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
-index efe06f3c2b..552d16ca8f 100755
+index cf3f8ffdd7..b4af83a01f 100755
--- a/configure
+++ b/configure
-@@ -6246,7 +6246,7 @@ fi
+@@ -6414,7 +6414,7 @@ fi
# Probe for guest agent support/options
if [ "$guest_agent" != "no" ]; then
-From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001
+From 26dd9766757895c04b33a89865e3886f18146332 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:45:25 +0800
Subject: [PATCH] disas: fix compilation failure when isnan is a macro
-From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001
+From 905f3b7b6115f303f964b5aa1d3bc9bdae9d5bec Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:46:31 +0800
Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver
+++ /dev/null
-From c59279437eda91841b9d26079c70b8a540d41204 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Mon, 26 Aug 2019 00:55:03 +0200
-Subject: [PATCH] ip_reass: Fix use after free
-
-Using ip_deq after m_free might read pointers from an allocation reuse.
-
-This would be difficult to exploit, but that is still related with
-CVE-2019-14378 which generates fragmented IP packets that would trigger this
-issue and at least produce a DoS.
-
-Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
----
-Taken from https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943
-
- slirp/src/ip_input.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
-index 7364ce0..aa514ae 100644
---- a/slirp/src/ip_input.c
-+++ b/slirp/src/ip_input.c
-@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
- */
- while (q != (struct ipasfrag *)&fp->frag_link &&
- ip->ip_off + ip->ip_len > q->ipf_off) {
-+ struct ipasfrag *prev;
- i = (ip->ip_off + ip->ip_len) - q->ipf_off;
- if (i < q->ipf_len) {
- q->ipf_len -= i;
-@@ -299,9 +300,10 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
- m_adj(dtom(slirp, q), i);
- break;
- }
-+ prev = q;
- q = q->ipf_next;
-- m_free(dtom(slirp, q->ipf_prev));
-- ip_deq(q->ipf_prev);
-+ ip_deq(prev);
-+ m_free(dtom(slirp, prev));
- }
-
- insert:
---
-2.22.0
-
-From f385b623c14b5208df88b0be479a9ab30ab68c72 Mon Sep 17 00:00:00 2001
+From e1e0a76305927290d75b4aae56f1ed89d83da741 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Mon, 30 Mar 2020 12:48:58 +0800
Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC