This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -1,4 +1,4 @@
From d3f1e7e9ff9aae3f770b0bcb9aa3c2f787f76a1b Mon Sep 17 00:00:00 2001
From 923d25365fbdff17fa4c8c2883960be07c3dad56 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Fri, 5 May 2017 09:07:15 +0200
Subject: [PATCH] user-exec: fix usage of mcontext structure on ARM/uClibc
@@ -14,14 +14,14 @@ uClibc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
user-exec.c | 2 +-
accel/tcg/user-exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 6db0758..2b3d116 100644
index 4be78eb9b3..0a690bec55 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -463,7 +463,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
@@ -508,7 +508,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
#if defined(__NetBSD__)
pc = uc->uc_mcontext.__gregs[_REG_R15];
@@ -31,5 +31,5 @@ index 6db0758..2b3d116 100644
#else
pc = uc->uc_mcontext.arm_pc;
--
2.7.4
2.25.3

View File

@@ -1,60 +0,0 @@
From 9672cccd64c446369b5649fe23d575917638be46 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Tue, 5 Feb 2019 15:07:43 +0100
Subject: [PATCH] configure: improve usbfs check
The current check to test if usbfs support should be compiled or not
solely relies on the presence of <linux/usbdevice_fs.h>, without
actually checking that all definition used by Qemu are provided by
this header file.
With sufficiently old kernel headers, <linux/usbdevice_fs.h> may be
present, but some of the definitions needed by Qemu may not be
available.
This commit improves the check by building a small program that
actually tests whether the necessary definitions are available.
In addition, it fixes a bug where have_usbfs was set to "yes"
regardless of the result of the test.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
configure | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 3d89870d99..799c8e3b08 100755
--- a/configure
+++ b/configure
@@ -4266,10 +4266,25 @@ fi
# check for usbfs
have_usbfs=no
if test "$linux_user" = "yes"; then
- if check_include linux/usbdevice_fs.h; then
+ cat > $TMPC << EOF
+#include <linux/usbdevice_fs.h>
+
+#ifndef USBDEVFS_GET_CAPABILITIES
+#error "USBDEVFS_GET_CAPABILITIES undefined"
+#endif
+
+#ifndef USBDEVFS_DISCONNECT_CLAIM
+#error "USBDEVFS_DISCONNECT_CLAIM undefined"
+#endif
+
+int main(void)
+{
+ return 0;
+}
+EOF
+ if compile_prog "" ""; then
have_usbfs=yes
fi
- have_usbfs=yes
fi
# check for fallocate
--
2.20.1

View File

@@ -1,337 +0,0 @@
From 6d5d5dde9adb5acb32e6b8e3dfbf47fff0f308d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Thu, 18 Jul 2019 15:06:41 +0200
Subject: [PATCH] linux-user: fix to handle variably sized SIOCGSTAMP with new
kernels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The SIOCGSTAMP symbol was previously defined in the
asm-generic/sockios.h header file. QEMU sees that header
indirectly via sys/socket.h
In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
Instead it provides only SIOCGSTAMP_OLD, which only uses a
32-bit time_t on 32-bit architectures.
The linux/sockios.h header then defines SIOCGSTAMP using
either SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. If
SIOCGSTAMP_NEW is used, then the tv_sec field is 64-bit even
on 32-bit architectures
To cope with this we must now convert the old and new type from
the target to the host one.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Message-Id: <20190718130641.15294-1-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
[Retrieved (and backported to 3.1.0) from:
https://github.com/qemu/qemu/commit/6d5d5dde9adb5acb32e6b8e3dfbf47fff0f308d2]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
linux-user/ioctls.h | 21 +++++-
linux-user/syscall.c | 140 +++++++++++++++++++++++++++++--------
linux-user/syscall_defs.h | 30 +++++++-
linux-user/syscall_types.h | 6 --
4 files changed, 159 insertions(+), 38 deletions(-)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 5e84dc7c3a7..3281c97ca26 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -222,8 +222,25 @@
IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
IOCTL(SIOCSPGRP, IOC_W, MK_PTR(TYPE_INT)) /* pid_t */
IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
- IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
- IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
+
+ /*
+ * We can't use IOCTL_SPECIAL() because it will set
+ * host_cmd to XXX_OLD and XXX_NEW and these macros
+ * are not defined with kernel prior to 5.2.
+ * We must set host_cmd to the same value as in target_cmd
+ * otherwise the consistency check in syscall_init()
+ * will trigger an error.
+ * host_cmd is ignored by the do_ioctl_XXX() helpers.
+ * FIXME: create a macro to define this kind of entry
+ */
+ { TARGET_SIOCGSTAMP_OLD, TARGET_SIOCGSTAMP_OLD,
+ "SIOCGSTAMP_OLD", IOC_R, do_ioctl_SIOCGSTAMP },
+ { TARGET_SIOCGSTAMPNS_OLD, TARGET_SIOCGSTAMPNS_OLD,
+ "SIOCGSTAMPNS_OLD", IOC_R, do_ioctl_SIOCGSTAMPNS },
+ { TARGET_SIOCGSTAMP_NEW, TARGET_SIOCGSTAMP_NEW,
+ "SIOCGSTAMP_NEW", IOC_R, do_ioctl_SIOCGSTAMP },
+ { TARGET_SIOCGSTAMPNS_NEW, TARGET_SIOCGSTAMPNS_NEW,
+ "SIOCGSTAMPNS_NEW", IOC_R, do_ioctl_SIOCGSTAMPNS },
IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT))
IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 39a37496fed..8367cb138df 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -37,6 +37,7 @@
#include <sched.h>
#include <sys/timex.h>
#include <sys/socket.h>
+#include <linux/sockios.h>
#include <sys/un.h>
#include <sys/uio.h>
#include <poll.h>
@@ -1126,8 +1127,9 @@ static inline abi_long copy_from_user_timeval(struct timeval *tv,
{
struct target_timeval *target_tv;
- if (!lock_user_struct(VERIFY_READ, target_tv, target_tv_addr, 1))
+ if (!lock_user_struct(VERIFY_READ, target_tv, target_tv_addr, 1)) {
return -TARGET_EFAULT;
+ }
__get_user(tv->tv_sec, &target_tv->tv_sec);
__get_user(tv->tv_usec, &target_tv->tv_usec);
@@ -1142,8 +1144,26 @@ static inline abi_long copy_to_user_timeval(abi_ulong target_tv_addr,
{
struct target_timeval *target_tv;
- if (!lock_user_struct(VERIFY_WRITE, target_tv, target_tv_addr, 0))
+ if (!lock_user_struct(VERIFY_WRITE, target_tv, target_tv_addr, 0)) {
+ return -TARGET_EFAULT;
+ }
+
+ __put_user(tv->tv_sec, &target_tv->tv_sec);
+ __put_user(tv->tv_usec, &target_tv->tv_usec);
+
+ unlock_user_struct(target_tv, target_tv_addr, 1);
+
+ return 0;
+}
+
+static inline abi_long copy_to_user_timeval64(abi_ulong target_tv_addr,
+ const struct timeval *tv)
+{
+ struct target__kernel_sock_timeval *target_tv;
+
+ if (!lock_user_struct(VERIFY_WRITE, target_tv, target_tv_addr, 0)) {
return -TARGET_EFAULT;
+ }
__put_user(tv->tv_sec, &target_tv->tv_sec);
__put_user(tv->tv_usec, &target_tv->tv_usec);
@@ -1153,6 +1173,48 @@ static inline abi_long copy_to_user_timeval(abi_ulong target_tv_addr,
return 0;
}
+static inline abi_long target_to_host_timespec(struct timespec *host_ts,
+ abi_ulong target_addr)
+{
+ struct target_timespec *target_ts;
+
+ if (!lock_user_struct(VERIFY_READ, target_ts, target_addr, 1)) {
+ return -TARGET_EFAULT;
+ }
+ __get_user(host_ts->tv_sec, &target_ts->tv_sec);
+ __get_user(host_ts->tv_nsec, &target_ts->tv_nsec);
+ unlock_user_struct(target_ts, target_addr, 0);
+ return 0;
+}
+
+static inline abi_long host_to_target_timespec(abi_ulong target_addr,
+ struct timespec *host_ts)
+{
+ struct target_timespec *target_ts;
+
+ if (!lock_user_struct(VERIFY_WRITE, target_ts, target_addr, 0)) {
+ return -TARGET_EFAULT;
+ }
+ __put_user(host_ts->tv_sec, &target_ts->tv_sec);
+ __put_user(host_ts->tv_nsec, &target_ts->tv_nsec);
+ unlock_user_struct(target_ts, target_addr, 1);
+ return 0;
+}
+
+static inline abi_long host_to_target_timespec64(abi_ulong target_addr,
+ struct timespec *host_ts)
+{
+ struct target__kernel_timespec *target_ts;
+
+ if (!lock_user_struct(VERIFY_WRITE, target_ts, target_addr, 0)) {
+ return -TARGET_EFAULT;
+ }
+ __put_user(host_ts->tv_sec, &target_ts->tv_sec);
+ __put_user(host_ts->tv_nsec, &target_ts->tv_nsec);
+ unlock_user_struct(target_ts, target_addr, 1);
+ return 0;
+}
+
static inline abi_long copy_from_user_timezone(struct timezone *tz,
abi_ulong target_tz_addr)
{
@@ -4899,6 +4961,54 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
return get_errno(safe_ioctl(fd, ie->host_cmd, sig));
}
+static abi_long do_ioctl_SIOCGSTAMP(const IOCTLEntry *ie, uint8_t *buf_temp,
+ int fd, int cmd, abi_long arg)
+{
+ struct timeval tv;
+ abi_long ret;
+
+ ret = get_errno(safe_ioctl(fd, SIOCGSTAMP, &tv));
+ if (is_error(ret)) {
+ return ret;
+ }
+
+ if (cmd == (int)TARGET_SIOCGSTAMP_OLD) {
+ if (copy_to_user_timeval(arg, &tv)) {
+ return -TARGET_EFAULT;
+ }
+ } else {
+ if (copy_to_user_timeval64(arg, &tv)) {
+ return -TARGET_EFAULT;
+ }
+ }
+
+ return ret;
+}
+
+static abi_long do_ioctl_SIOCGSTAMPNS(const IOCTLEntry *ie, uint8_t *buf_temp,
+ int fd, int cmd, abi_long arg)
+{
+ struct timespec ts;
+ abi_long ret;
+
+ ret = get_errno(safe_ioctl(fd, SIOCGSTAMPNS, &ts));
+ if (is_error(ret)) {
+ return ret;
+ }
+
+ if (cmd == (int)TARGET_SIOCGSTAMPNS_OLD) {
+ if (host_to_target_timespec(arg, &ts)) {
+ return -TARGET_EFAULT;
+ }
+ } else{
+ if (host_to_target_timespec64(arg, &ts)) {
+ return -TARGET_EFAULT;
+ }
+ }
+
+ return ret;
+}
+
#ifdef TIOCGPTPEER
static abi_long do_ioctl_tiocgptpeer(const IOCTLEntry *ie, uint8_t *buf_temp,
int fd, int cmd, abi_long arg)
@@ -6271,32 +6381,6 @@ static inline abi_long target_ftruncate64(void *cpu_env, abi_long arg1,
}
#endif
-static inline abi_long target_to_host_timespec(struct timespec *host_ts,
- abi_ulong target_addr)
-{
- struct target_timespec *target_ts;
-
- if (!lock_user_struct(VERIFY_READ, target_ts, target_addr, 1))
- return -TARGET_EFAULT;
- __get_user(host_ts->tv_sec, &target_ts->tv_sec);
- __get_user(host_ts->tv_nsec, &target_ts->tv_nsec);
- unlock_user_struct(target_ts, target_addr, 0);
- return 0;
-}
-
-static inline abi_long host_to_target_timespec(abi_ulong target_addr,
- struct timespec *host_ts)
-{
- struct target_timespec *target_ts;
-
- if (!lock_user_struct(VERIFY_WRITE, target_ts, target_addr, 0))
- return -TARGET_EFAULT;
- __put_user(host_ts->tv_sec, &target_ts->tv_sec);
- __put_user(host_ts->tv_nsec, &target_ts->tv_nsec);
- unlock_user_struct(target_ts, target_addr, 1);
- return 0;
-}
-
static inline abi_long target_to_host_itimerspec(struct itimerspec *host_itspec,
abi_ulong target_addr)
{
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index fffa89f2564..06622703008 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -209,16 +209,34 @@ struct target_linger {
abi_int l_linger; /* How long to linger for */
};
+#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
+struct target_timeval {
+ abi_long tv_sec;
+ abi_int tv_usec;
+};
+#define target__kernel_sock_timeval target_timeval
+#else
struct target_timeval {
abi_long tv_sec;
abi_long tv_usec;
};
+struct target__kernel_sock_timeval {
+ abi_llong tv_sec;
+ abi_llong tv_usec;
+};
+#endif
+
struct target_timespec {
abi_long tv_sec;
abi_long tv_nsec;
};
+struct target__kernel_timespec {
+ abi_llong tv_sec;
+ abi_llong tv_nsec;
+};
+
struct target_timezone {
abi_int tz_minuteswest;
abi_int tz_dsttime;
@@ -749,8 +767,16 @@ struct target_pollfd {
#define TARGET_SIOCATMARK 0x8905
#define TARGET_SIOCGPGRP 0x8904
#endif
-#define TARGET_SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
-#define TARGET_SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
+#if defined(TARGET_SH4)
+#define TARGET_SIOCGSTAMP_OLD TARGET_IOR('s', 100, struct target_timeval)
+#define TARGET_SIOCGSTAMPNS_OLD TARGET_IOR('s', 101, struct target_timespec)
+#else
+#define TARGET_SIOCGSTAMP_OLD 0x8906
+#define TARGET_SIOCGSTAMPNS_OLD 0x8907
+#endif
+
+#define TARGET_SIOCGSTAMP_NEW TARGET_IOR(0x89, 0x06, abi_llong[2])
+#define TARGET_SIOCGSTAMPNS_NEW TARGET_IOR(0x89, 0x07, abi_llong[2])
/* Networking ioctls */
#define TARGET_SIOCADDRT 0x890B /* add routing table entry */
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index b98a23b0f1b..4e369838262 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -14,12 +14,6 @@ STRUCT(serial_icounter_struct,
STRUCT(sockaddr,
TYPE_SHORT, MK_ARRAY(TYPE_CHAR, 14))
-STRUCT(timeval,
- MK_ARRAY(TYPE_LONG, 2))
-
-STRUCT(timespec,
- MK_ARRAY(TYPE_LONG, 2))
-
STRUCT(rtentry,
TYPE_ULONG, MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr),
TYPE_SHORT, TYPE_SHORT, TYPE_ULONG, TYPE_PTRVOID, TYPE_SHORT, TYPE_PTRVOID,

View File

@@ -3,7 +3,6 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
default y if BR2_arm
default y if BR2_armeb
default y if BR2_aarch64
default y if BR2_csky
default y if BR2_i386
default y if BR2_m68k
default y if BR2_microblazeel
@@ -11,14 +10,18 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
default y if BR2_mips
default y if BR2_mipsel
default y if BR2_nios2
default y if BR2_or1k
default y if BR2_powerpc
default y if BR2_powerpc64
default y if BR2_powerpc64le
default y if BR2_riscv
default y if BR2_s390x
default y if BR2_sh
default y if BR2_sparc
default y if BR2_sparc64
default y if BR2_xtensa
default y if BR2_x86_64
depends on !BR2_x86_steamroller && !BR2_x86_core_avx2
depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
@@ -83,4 +86,9 @@ config BR2_PACKAGE_HOST_QEMU_VIRTFS
Enables support for virtual filesystem in Qemu allowing
shared filesystem between Qemu and its emulated target.
config BR2_PACKAGE_HOST_QEMU_USB
bool "USB passthrough support"
help
Enables USB passthrough support from guest to host.
endif

View File

@@ -1,7 +1,4 @@
# Locally computed, tarball verified with GPG signature
sha256 6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc qemu-3.1.0.tar.xz
sha256 c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5 qemu-5.1.0.tar.xz
sha256 6f04ae8364d0079a192b14635f4b1da294ce18724c034c39a6a41d1b09df6100 COPYING
sha256 48ffe9fc7f1d5462dbd19340bc4dd1d8a9e37c61ed535813e614cbe4a5f0d4df COPYING.LIB
# Locally computed
sha256 61091767ffd16002e77f005155d096208094e69dee35e6d5ddcaa6c8a13b5e26 qemu-b517e1dc3125a57555d67a8deed9eac7b42288e2.tar.gz
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB

View File

@@ -4,14 +4,9 @@
#
################################################################################
ifeq ($(BR2_csky),y)
QEMU_VERSION = b517e1dc3125a57555d67a8deed9eac7b42288e2
QEMU_SITE = $(call github,c-sky,qemu,$(QEMU_VERSION))
else
QEMU_VERSION = 3.1.0
QEMU_VERSION = 5.1.0
QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.xz
QEMU_SITE = http://download.qemu.org
endif
QEMU_LICENSE = GPL-2.0, LGPL-2.1, MIT, BSD-3-Clause, BSD-2-Clause, Others/BSD-1c
QEMU_LICENSE_FILES = COPYING COPYING.LIB
# NOTE: there is no top-level license file for non-(L)GPL licenses;
@@ -20,8 +15,7 @@ QEMU_LICENSE_FILES = COPYING COPYING.LIB
#-------------------------------------------------------------
# Target-qemu
QEMU_DEPENDENCIES = host-pkgconf libglib2 zlib pixman
QEMU_DEPENDENCIES = host-pkgconf libglib2 zlib pixman host-python3
# Need the LIBS variable because librt and libm are
# not automatically pulled. :-(
@@ -90,11 +84,67 @@ else
QEMU_OPTS += --disable-seccomp
endif
ifeq ($(BR2_PACKAGE_LIBSSH2),y)
QEMU_OPTS += --enable-libssh2
QEMU_DEPENDENCIES += libssh2
ifeq ($(BR2_PACKAGE_LIBSSH),y)
QEMU_OPTS += --enable-libssh
QEMU_DEPENDENCIES += libssh
else
QEMU_OPTS += --disable-libssh2
QEMU_OPTS += --disable-libssh
endif
ifeq ($(BR2_PACKAGE_LIBUSB),y)
QEMU_OPTS += --enable-libusb
QEMU_DEPENDENCIES += libusb
else
QEMU_OPTS += --disable-libusb
endif
ifeq ($(BR2_PACKAGE_LIBVNCSERVER),y)
QEMU_OPTS += \
--enable-vnc \
--disable-vnc-sasl
QEMU_DEPENDENCIES += libvncserver
ifeq ($(BR2_PACKAGE_LIBPNG),y)
QEMU_OPTS += --enable-vnc-png
QEMU_DEPENDENCIES += libpng
else
QEMU_OPTS += --disable-vnc-png
endif
ifeq ($(BR2_PACKAGE_JPEG),y)
QEMU_OPTS += --enable-vnc-jpeg
QEMU_DEPENDENCIES += jpeg
else
QEMU_OPTS += --disable-vnc-jpeg
endif
else
QEMU_OPTS += --disable-vnc
endif
ifeq ($(BR2_PACKAGE_NETTLE),y)
QEMU_OPTS += --enable-nettle
QEMU_DEPENDENCIES += nettle
else
QEMU_OPTS += --disable-nettle
endif
ifeq ($(BR2_PACKAGE_NUMACTL),y)
QEMU_OPTS += --enable-numa
QEMU_DEPENDENCIES += numactl
else
QEMU_OPTS += --disable-numa
endif
ifeq ($(BR2_PACKAGE_SPICE),y)
QEMU_OPTS += --enable-spice
QEMU_DEPENDENCIES += spice
else
QEMU_OPTS += --disable-spice
endif
ifeq ($(BR2_PACKAGE_USBREDIR),y)
QEMU_OPTS += --enable-usb-redir
QEMU_DEPENDENCIES += usbredir
else
QEMU_OPTS += --disable-usb-redir
endif
# Override CPP, as it expects to be able to call it like it'd
@@ -111,25 +161,24 @@ define QEMU_CONFIGURE_CMDS
--prefix=/usr \
--cross-prefix=$(TARGET_CROSS) \
--audio-drv-list= \
--python=$(HOST_DIR)/bin/python3 \
--enable-kvm \
--enable-attr \
--enable-vhost-net \
--disable-bsd-user \
--disable-containers \
--disable-xen \
--disable-vnc \
--disable-virtfs \
--disable-brlapi \
--disable-curses \
--disable-curl \
--disable-bluez \
--disable-vde \
--disable-linux-aio \
--disable-linux-io-uring \
--disable-cap-ng \
--disable-docs \
--disable-spice \
--disable-rbd \
--disable-libiscsi \
--disable-usb-redir \
--disable-strip \
--disable-sparse \
--disable-mpath \
@@ -161,7 +210,7 @@ $(eval $(generic-package))
#-------------------------------------------------------------
# Host-qemu
HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman host-python3
# BR ARCH qemu
# ------- ----
@@ -178,6 +227,7 @@ HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
# mips64 mips64
# mips64el mips64el
# nios2 nios2
# or1k or1k
# powerpc ppc
# powerpc64 ppc64
# powerpc64le ppc64 (system) / ppc64le (usermode)
@@ -188,6 +238,7 @@ HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
# sh4aeb sh4eb
# sparc sparc
# sparc64 sparc64
# xtensa xtensa
HOST_QEMU_ARCH = $(ARCH)
ifeq ($(HOST_QEMU_ARCH),i486)
@@ -215,18 +266,14 @@ endif
ifeq ($(HOST_QEMU_ARCH),sh4aeb)
HOST_QEMU_ARCH = sh4eb
endif
ifeq ($(HOST_QEMU_ARCH),csky)
ifeq ($(BR2_ck610),y)
HOST_QEMU_ARCH = cskyv1
else
HOST_QEMU_ARCH = cskyv2
endif
endif
HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH)
HOST_QEMU_CFLAGS = $(HOST_CFLAGS)
ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
HOST_QEMU_TARGETS += $(HOST_QEMU_SYS_ARCH)-softmmu
HOST_QEMU_OPTS += --enable-system --enable-fdt
HOST_QEMU_CFLAGS += -I$(HOST_DIR)/include/libfdt
HOST_QEMU_DEPENDENCIES += host-dtc
else
HOST_QEMU_OPTS += --disable-system
@@ -250,11 +297,19 @@ HOST_QEMU_OPTS += --enable-vde
HOST_QEMU_DEPENDENCIES += host-vde2
endif
# virtfs-proxy-helper is the only user of libcap-ng.
ifeq ($(BR2_PACKAGE_HOST_QEMU_VIRTFS),y)
HOST_QEMU_OPTS += --enable-virtfs
HOST_QEMU_DEPENDENCIES += host-libcap
HOST_QEMU_OPTS += --enable-virtfs --enable-cap-ng
HOST_QEMU_DEPENDENCIES += host-libcap-ng
else
HOST_QEMU_OPTS += --disable-virtfs
HOST_QEMU_OPTS += --disable-virtfs --disable-cap-ng
endif
ifeq ($(BR2_PACKAGE_HOST_QEMU_USB),y)
HOST_QEMU_OPTS += --enable-libusb
HOST_QEMU_DEPENDENCIES += host-libusb
else
HOST_QEMU_OPTS += --disable-libusb
endif
# Override CPP, as it expects to be able to call it like it'd
@@ -268,8 +323,18 @@ define HOST_QEMU_CONFIGURE_CMDS
--interp-prefix=$(STAGING_DIR) \
--cc="$(HOSTCC)" \
--host-cc="$(HOSTCC)" \
--extra-cflags="$(HOST_CFLAGS)" \
--extra-cflags="$(HOST_QEMU_CFLAGS)" \
--extra-ldflags="$(HOST_LDFLAGS)" \
--python=$(HOST_DIR)/bin/python3 \
--disable-bzip2 \
--disable-containers \
--disable-curl \
--disable-libssh \
--disable-linux-io-uring \
--disable-sdl \
--disable-vnc-jpeg \
--disable-vnc-png \
--disable-vnc-sasl \
$(HOST_QEMU_OPTS)
endef