initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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
|
||||
|
||||
user-exec.c has some conditional code to decide how to use the
|
||||
mcontext structure. Unfortunately, since uClibc defines __GLIBC__, but
|
||||
with old versions of __GLIBC__ and __GLIBC_MINOR__, an old code path
|
||||
gets used, which doesn't apply to uClibc.
|
||||
|
||||
Fix this by excluding __UCLIBC__, which ensures we fall back to the
|
||||
general case of using uc_mcontext.arm_pc, which works fine with
|
||||
uClibc.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
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 4ebe25461a..0496674fbd 100644
|
||||
--- a/accel/tcg/user-exec.c
|
||||
+++ b/accel/tcg/user-exec.c
|
||||
@@ -540,7 +540,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
pc = uc->uc_mcontext.__gregs[_REG_R15];
|
||||
-#elif defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
|
||||
+#elif defined(__GLIBC__) && !defined(__UCLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
|
||||
pc = uc->uc_mcontext.gregs[R15];
|
||||
#else
|
||||
pc = uc->uc_mcontext.arm_pc;
|
||||
--
|
||||
2.25.3
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From f82238299d3c4cd23ca60cfc0cf4271f5c860873 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 25 Aug 2021 21:55:53 +0200
|
||||
Subject: [PATCH] tests/fp: disable fp-bench build by default
|
||||
|
||||
Fixes:
|
||||
https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg00947.html
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
tests/fp/meson.build | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tests/fp/meson.build b/tests/fp/meson.build
|
||||
index 07e2cdc8d2..c96460b7f1 100644
|
||||
--- a/tests/fp/meson.build
|
||||
+++ b/tests/fp/meson.build
|
||||
@@ -631,6 +631,7 @@ fpbench = executable(
|
||||
dependencies: [qemuutil],
|
||||
include_directories: [sfinc, include_directories(tfdir)],
|
||||
c_args: fpcflags,
|
||||
+ build_by_default: false,
|
||||
)
|
||||
|
||||
fptestlog2 = executable(
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From 8c3fcbf23fe31cf56f21ce1737bf22fe65fc553b Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 27 Aug 2021 23:40:01 +0200
|
||||
Subject: [PATCH] block/export/fuse.c: fix fuse-lseek on uclibc or musl
|
||||
|
||||
Include linux/fs.h to avoid the following build failure on uclibc or
|
||||
musl raised since version 6.0.0:
|
||||
|
||||
../block/export/fuse.c: In function 'fuse_lseek':
|
||||
../block/export/fuse.c:641:19: error: 'SEEK_HOLE' undeclared (first use in this function)
|
||||
641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
|
||||
| ^~~~~~~~~
|
||||
../block/export/fuse.c:641:19: note: each undeclared identifier is reported only once for each function it appears in
|
||||
../block/export/fuse.c:641:42: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'?
|
||||
641 | if (whence != SEEK_HOLE && whence != SEEK_DATA) {
|
||||
| ^~~~~~~~~
|
||||
| SEEK_SET
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/33c90ebf04997f4d3557cfa66abc9cf9a3076137
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://patchwork.ozlabs.org/project/qemu-devel/patch/20210827220301.272887-1-fontaine.fabrice@gmail.com/]
|
||||
---
|
||||
block/export/fuse.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/block/export/fuse.c b/block/export/fuse.c
|
||||
index fc7b07d2b5..2e3bf8270b 100644
|
||||
--- a/block/export/fuse.c
|
||||
+++ b/block/export/fuse.c
|
||||
@@ -31,6 +31,9 @@
|
||||
#include <fuse.h>
|
||||
#include <fuse_lowlevel.h>
|
||||
|
||||
+#ifdef __linux__
|
||||
+#include <linux/fs.h>
|
||||
+#endif
|
||||
|
||||
/* Prevent overly long bounce buffer allocations */
|
||||
#define FUSE_MAX_BOUNCE_BYTES (MIN(BDRV_REQUEST_MAX_BYTES, 64 * 1024 * 1024))
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 304332039014679b809f606e2f227ee0fc43a451 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 22 Oct 2021 11:52:09 +0200
|
||||
Subject: [PATCH] block/export/fuse.c: fix musl build
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Include linux/falloc.h if CONFIG_FALLOCATE_ZERO_RANGE is defined to fix
|
||||
https://gitlab.com/qemu-project/qemu/-/commit/50482fda98bd62e072c30b7ea73c985c4e9d9bbb
|
||||
and avoid the following build failure on musl:
|
||||
|
||||
../block/export/fuse.c: In function 'fuse_fallocate':
|
||||
../block/export/fuse.c:643:21: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
|
||||
643 | else if (mode & FALLOC_FL_ZERO_RANGE) {
|
||||
| ^~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/be24433a429fda681fb66698160132c1c99bc53b
|
||||
|
||||
Fixes: 50482fda98b ("block/export/fuse.c: fix musl build")
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Message-Id: <20211022095209.1319671-1-fontaine.fabrice@gmail.com>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
[Retrieved from:
|
||||
https://gitlab.com/qemu-project/qemu/-/commit/304332039014679b809f606e2f227ee0fc43a451]
|
||||
---
|
||||
block/export/fuse.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/block/export/fuse.c b/block/export/fuse.c
|
||||
index 2e3bf8270b..823c126d23 100644
|
||||
--- a/block/export/fuse.c
|
||||
+++ b/block/export/fuse.c
|
||||
@@ -31,6 +31,10 @@
|
||||
#include <fuse.h>
|
||||
#include <fuse_lowlevel.h>
|
||||
|
||||
+#if defined(CONFIG_FALLOCATE_ZERO_RANGE)
|
||||
+#include <linux/falloc.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef __linux__
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
|
||||
bool
|
||||
# Only tested on these architectures
|
||||
default y if BR2_aarch64 || BR2_i386 || BR2_mips || BR2_mipsel \
|
||||
|| BR2_x86_64 || BR2_arm \
|
||||
|| BR2_powerpc64 || BR2_powerpc64le
|
||||
|
||||
comment "QEMU requires a toolchain with wchar, threads, gcc >= 8"
|
||||
depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
|
||||
depends on BR2_USE_MMU
|
||||
depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR) || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_8
|
||||
|
||||
config BR2_PACKAGE_QEMU
|
||||
bool "QEMU"
|
||||
depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_WCHAR # gettext
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
select BR2_PACKAGE_PIXMAN
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
QEMU is a generic and open source machine emulator and
|
||||
virtualizer.
|
||||
|
||||
When used as a machine emulator, QEMU can run OSes and
|
||||
programs made for one machine (e.g. an ARM board) on a
|
||||
different machine (e.g. your own PC). By using dynamic
|
||||
translation, it achieves very good performance.
|
||||
|
||||
When used as a virtualizer, QEMU achieves near native
|
||||
performances by executing the guest code directly on the
|
||||
host CPU. QEMU supports virtualization when executing under
|
||||
the Xen hypervisor or using the KVM kernel module in
|
||||
Linux. When using KVM, QEMU can virtualize x86, server and
|
||||
embedded PowerPC, and S390 guests.
|
||||
|
||||
http://qemu.org/
|
||||
|
||||
if BR2_PACKAGE_QEMU
|
||||
|
||||
comment "Emulators selection"
|
||||
|
||||
config BR2_PACKAGE_QEMU_CUSTOM_TARGETS
|
||||
string "Enable specific targets"
|
||||
help
|
||||
Enter here the list of QEMU targets you want to build. For
|
||||
example:
|
||||
|
||||
System emulation | User-land emulation
|
||||
----------------------+-----------------------
|
||||
i386-softmmu | i386-linux-user
|
||||
arm-softmmu | ppc-linux-user
|
||||
x86_64-softmmu | sparc-bsd-user
|
||||
... | ...
|
||||
|
||||
comment "Networking options"
|
||||
|
||||
config BR2_PACKAGE_QEMU_SLIRP
|
||||
bool "Enable user mode networking (SLIRP)"
|
||||
select BR2_PACKAGE_SLIRP
|
||||
help
|
||||
Enable user mode network stack, which is the default
|
||||
networking backend. It requires no administrator privileges
|
||||
and generally is the easiest to use but has some
|
||||
limitations:
|
||||
|
||||
- there is a lot of overhead so the performance is poor;
|
||||
- in general ICMP does not work (can't ping from/to a guest)
|
||||
- on Linux hosts, ping does work from within the guest, but it
|
||||
needs initial setup by root (once per host)
|
||||
- the guest is not directly accessible from the host or the
|
||||
external network
|
||||
|
||||
User Networking is implemented using "slirp", which provides a
|
||||
full TCP/IP stack within QEMU and uses that stack to implement
|
||||
a virtual NAT'd network.
|
||||
|
||||
Notice that this option does not disable other networking
|
||||
modes.
|
||||
|
||||
if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = ""
|
||||
|
||||
comment "... or you can select emulator families to enable, below:"
|
||||
|
||||
config BR2_PACKAGE_QEMU_SYSTEM
|
||||
bool "Enable all systems emulation"
|
||||
depends on !BR2_STATIC_LIBS # dtc
|
||||
select BR2_PACKAGE_QEMU_FDT
|
||||
help
|
||||
Say 'y' to build all system emulators/virtualisers that QEMU
|
||||
supports.
|
||||
|
||||
comment "systems emulation needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_QEMU_LINUX_USER
|
||||
bool "Enable all Linux user-land emulation"
|
||||
# Incompatible "struct sigevent" definition on musl
|
||||
depends on !BR2_TOOLCHAIN_USES_MUSL
|
||||
help
|
||||
Say 'y' to build all Linux user-land emulators that QEMU
|
||||
supports.
|
||||
|
||||
# Note: bsd-user can not be build on Linux
|
||||
|
||||
comment "Linux user-land emulation needs a glibc or uClibc toolchain"
|
||||
depends on BR2_TOOLCHAIN_USES_MUSL
|
||||
|
||||
endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
|
||||
|
||||
config BR2_PACKAGE_QEMU_HAS_EMULS
|
||||
def_bool y
|
||||
depends on BR2_PACKAGE_QEMU_SYSTEM || BR2_PACKAGE_QEMU_LINUX_USER || BR2_PACKAGE_QEMU_CUSTOM_TARGETS != ""
|
||||
|
||||
if BR2_PACKAGE_QEMU_HAS_EMULS
|
||||
|
||||
comment "Frontends"
|
||||
|
||||
config BR2_PACKAGE_QEMU_SDL
|
||||
bool "Enable SDL frontend"
|
||||
depends on !BR2_STATIC_LIBS # sdl2
|
||||
select BR2_PACKAGE_SDL2
|
||||
help
|
||||
Say 'y' to enable the SDL frontend, that is, a graphical
|
||||
window presenting the VM's display.
|
||||
|
||||
comment "SDL frontend needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
comment "Misc. features"
|
||||
|
||||
config BR2_PACKAGE_QEMU_FDT
|
||||
bool "Enable FDT"
|
||||
depends on !BR2_STATIC_LIBS # dtc
|
||||
select BR2_PACKAGE_DTC
|
||||
help
|
||||
Say 'y' here to have QEMU capable of constructing Device
|
||||
Trees, and passing them to the VMs.
|
||||
|
||||
comment "FDT support needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
endif # BR2_PACKAGE_QEMU_HAS_EMULS
|
||||
|
||||
config BR2_PACKAGE_QEMU_TOOLS
|
||||
bool "Enable tools"
|
||||
help
|
||||
Say 'y' here to include tools packaged with QEMU
|
||||
(e.g. qemu-img).
|
||||
|
||||
endif # BR2_PACKAGE_QEMU
|
||||
@@ -0,0 +1,105 @@
|
||||
config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_arm
|
||||
default y if BR2_armeb
|
||||
default y if BR2_aarch64
|
||||
default y if BR2_i386
|
||||
default y if BR2_m68k
|
||||
default y if BR2_microblazeel
|
||||
default y if BR2_microblazebe
|
||||
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
|
||||
bool
|
||||
default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
|
||||
default y if BR2_mips64
|
||||
default y if BR2_mips64el
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU
|
||||
bool "host qemu"
|
||||
depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS || BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
||||
depends on BR2_HOST_GCC_AT_LEAST_8
|
||||
select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE \
|
||||
if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE && BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE \
|
||||
if !BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
||||
help
|
||||
QEMU is a generic and open source machine emulator and
|
||||
virtualizer.
|
||||
|
||||
This option builds an emulator for your selected architecture.
|
||||
|
||||
http://www.qemu.org
|
||||
|
||||
comment "host-qemu needs a host gcc >= 8"
|
||||
depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS || \
|
||||
BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORT
|
||||
depends on !BR2_HOST_GCC_AT_LEAST_8
|
||||
|
||||
if BR2_PACKAGE_HOST_QEMU
|
||||
|
||||
comment "Emulators selection"
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
|
||||
bool "Enable system emulation"
|
||||
depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
|
||||
help
|
||||
Enables the build of the system emulator, which allows to
|
||||
boot an entire system in Qemu.
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
||||
bool "Enable Linux user-land emulation"
|
||||
depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
||||
help
|
||||
Enables the build of the user-land emulator, which allows to
|
||||
run user-space applications.
|
||||
|
||||
Note that system calls made by the emulated user-land are
|
||||
serviced by the running host kernel. Therefore, if the
|
||||
kernel headers used by your target are more recent than
|
||||
the running host kernel, you may run into invalid system
|
||||
calls, which may yield surprising effects.
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS
|
||||
string
|
||||
default "-cpu Nehalem,check=false" if BR2_x86_corei7
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_VDE2
|
||||
bool "VDE2 support"
|
||||
help
|
||||
Enables VDE2 support. VDE2 stands for Virtual Distributed
|
||||
Ethernet and can be used to create virtual switches to
|
||||
"plug" both physical and virtual machines in them.
|
||||
|
||||
config BR2_PACKAGE_HOST_QEMU_VIRTFS
|
||||
bool "Virtual filesystem support"
|
||||
depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
|
||||
help
|
||||
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
|
||||
@@ -0,0 +1,4 @@
|
||||
# Locally computed, tarball verified with GPG signature
|
||||
sha256 eebc089db3414bbeedf1e464beda0a7515aad30f73261abc246c9b27503a3c96 qemu-6.1.0.tar.xz
|
||||
sha256 6f04ae8364d0079a192b14635f4b1da294ce18724c034c39a6a41d1b09df6100 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
@@ -0,0 +1,387 @@
|
||||
################################################################################
|
||||
#
|
||||
# qemu
|
||||
#
|
||||
################################################################################
|
||||
|
||||
QEMU_VERSION = 6.1.0
|
||||
QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.xz
|
||||
QEMU_SITE = http://download.qemu.org
|
||||
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;
|
||||
# the non-(L)GPL license texts are specified in the affected
|
||||
# individual source files.
|
||||
QEMU_CPE_ID_VENDOR = qemu
|
||||
|
||||
#-------------------------------------------------------------
|
||||
|
||||
# The build system is now partly based on Meson.
|
||||
# However, building is still done with configure and make as in previous versions of QEMU.
|
||||
|
||||
# Target-qemu
|
||||
QEMU_DEPENDENCIES = host-meson host-pkgconf libglib2 zlib pixman host-python3
|
||||
|
||||
# Need the LIBS variable because librt and libm are
|
||||
# not automatically pulled. :-(
|
||||
QEMU_LIBS = -lrt -lm
|
||||
|
||||
QEMU_OPTS =
|
||||
|
||||
QEMU_VARS = LIBTOOL=$(HOST_DIR)/bin/libtool
|
||||
|
||||
# If we want to specify only a subset of targets, we must still enable all
|
||||
# of them, so that QEMU properly builds its list of default targets, from
|
||||
# which it then checks if the specified sub-set is valid. That's what we
|
||||
# do in the first part of the if-clause.
|
||||
# Otherwise, if we do not want to pass a sub-set of targets, we then need
|
||||
# to either enable or disable -user and/or -system emulation appropriately.
|
||||
# That's what we do in the else-clause.
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
|
||||
QEMU_OPTS += --enable-system --enable-linux-user
|
||||
QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
|
||||
else
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
|
||||
QEMU_OPTS += --enable-system
|
||||
else
|
||||
QEMU_OPTS += --disable-system
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y)
|
||||
QEMU_OPTS += --enable-linux-user
|
||||
else
|
||||
QEMU_OPTS += --disable-linux-user
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
||||
QEMU_OPTS += --disable-vhost-user
|
||||
else
|
||||
QEMU_OPTS += --enable-vhost-user
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_SLIRP),y)
|
||||
QEMU_OPTS += --enable-slirp=system
|
||||
QEMU_DEPENDENCIES += slirp
|
||||
else
|
||||
QEMU_OPTS += --disable-slirp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
|
||||
QEMU_OPTS += --enable-sdl
|
||||
QEMU_DEPENDENCIES += sdl2
|
||||
QEMU_VARS += SDL2_CONFIG=$(BR2_STAGING_DIR)/usr/bin/sdl2-config
|
||||
else
|
||||
QEMU_OPTS += --disable-sdl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_FDT),y)
|
||||
QEMU_OPTS += --enable-fdt
|
||||
QEMU_DEPENDENCIES += dtc
|
||||
else
|
||||
QEMU_OPTS += --disable-fdt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QEMU_TOOLS),y)
|
||||
QEMU_OPTS += --enable-tools
|
||||
else
|
||||
QEMU_OPTS += --disable-tools
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFUSE3),y)
|
||||
QEMU_OPTS += --enable-fuse --enable-fuse-lseek
|
||||
QEMU_DEPENDENCIES += libfuse3
|
||||
else
|
||||
QEMU_OPTS += --disable-fuse --disable-fuse-lseek
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
QEMU_OPTS += --enable-seccomp
|
||||
QEMU_DEPENDENCIES += libseccomp
|
||||
else
|
||||
QEMU_OPTS += --disable-seccomp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSSH),y)
|
||||
QEMU_OPTS += --enable-libssh
|
||||
QEMU_DEPENDENCIES += libssh
|
||||
else
|
||||
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
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
QEMU_OPTS += --static
|
||||
endif
|
||||
|
||||
# Override CPP, as it expects to be able to call it like it'd
|
||||
# call the compiler.
|
||||
define QEMU_CONFIGURE_CMDS
|
||||
unset TARGET_DIR; \
|
||||
cd $(@D); \
|
||||
LIBS='$(QEMU_LIBS)' \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(TARGET_CONFIGURE_ARGS) \
|
||||
CPP="$(TARGET_CC) -E" \
|
||||
$(QEMU_VARS) \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--cross-prefix=$(TARGET_CROSS) \
|
||||
--audio-drv-list= \
|
||||
--meson=$(HOST_DIR)/bin/meson \
|
||||
--ninja=$(HOST_DIR)/bin/ninja \
|
||||
--enable-kvm \
|
||||
--enable-attr \
|
||||
--enable-vhost-net \
|
||||
--disable-bpf \
|
||||
--disable-bsd-user \
|
||||
--disable-containers \
|
||||
--disable-xen \
|
||||
--disable-virtfs \
|
||||
--disable-brlapi \
|
||||
--disable-curses \
|
||||
--disable-curl \
|
||||
--disable-vde \
|
||||
--disable-linux-aio \
|
||||
--disable-linux-io-uring \
|
||||
--disable-cap-ng \
|
||||
--disable-docs \
|
||||
--disable-rbd \
|
||||
--disable-libiscsi \
|
||||
--disable-strip \
|
||||
--disable-sparse \
|
||||
--disable-mpath \
|
||||
--disable-sanitizers \
|
||||
--disable-hvf \
|
||||
--disable-whpx \
|
||||
--disable-malloc-trim \
|
||||
--disable-membarrier \
|
||||
--disable-vhost-crypto \
|
||||
--disable-libxml2 \
|
||||
--disable-capstone \
|
||||
--with-git-submodules=ignore \
|
||||
--disable-opengl \
|
||||
--disable-vhost-user-blk-server \
|
||||
--disable-virtiofsd \
|
||||
$(QEMU_OPTS)
|
||||
endef
|
||||
|
||||
define QEMU_BUILD_CMDS
|
||||
unset TARGET_DIR; \
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define QEMU_INSTALL_TARGET_CMDS
|
||||
unset TARGET_DIR; \
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(QEMU_MAKE_ENV) DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Host-qemu
|
||||
|
||||
HOST_QEMU_DEPENDENCIES = host-meson host-pkgconf host-zlib host-libglib2 host-pixman host-python3
|
||||
|
||||
# BR ARCH qemu
|
||||
# ------- ----
|
||||
# arm arm
|
||||
# armeb armeb
|
||||
# i486 i386
|
||||
# i586 i386
|
||||
# i686 i386
|
||||
# x86_64 x86_64
|
||||
# m68k m68k
|
||||
# microblaze microblaze
|
||||
# mips mips
|
||||
# mipsel mipsel
|
||||
# mips64 mips64
|
||||
# mips64el mips64el
|
||||
# nios2 nios2
|
||||
# or1k or1k
|
||||
# powerpc ppc
|
||||
# powerpc64 ppc64
|
||||
# powerpc64le ppc64 (system) / ppc64le (usermode)
|
||||
# sh2a not supported
|
||||
# sh4 sh4
|
||||
# sh4eb sh4eb
|
||||
# sh4a sh4
|
||||
# sh4aeb sh4eb
|
||||
# sparc sparc
|
||||
# sparc64 sparc64
|
||||
# xtensa xtensa
|
||||
|
||||
HOST_QEMU_ARCH = $(ARCH)
|
||||
ifeq ($(HOST_QEMU_ARCH),i486)
|
||||
HOST_QEMU_ARCH = i386
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),i586)
|
||||
HOST_QEMU_ARCH = i386
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),i686)
|
||||
HOST_QEMU_ARCH = i386
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),powerpc)
|
||||
HOST_QEMU_ARCH = ppc
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),powerpc64)
|
||||
HOST_QEMU_ARCH = ppc64
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),powerpc64le)
|
||||
HOST_QEMU_ARCH = ppc64le
|
||||
HOST_QEMU_SYS_ARCH = ppc64
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),sh4a)
|
||||
HOST_QEMU_ARCH = sh4
|
||||
endif
|
||||
ifeq ($(HOST_QEMU_ARCH),sh4aeb)
|
||||
HOST_QEMU_ARCH = sh4eb
|
||||
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
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE),y)
|
||||
HOST_QEMU_TARGETS += $(HOST_QEMU_ARCH)-linux-user
|
||||
HOST_QEMU_OPTS += --enable-linux-user
|
||||
|
||||
HOST_QEMU_HOST_SYSTEM_TYPE = $(shell uname -s)
|
||||
ifneq ($(HOST_QEMU_HOST_SYSTEM_TYPE),Linux)
|
||||
$(error "qemu-user can only be used on Linux hosts")
|
||||
endif
|
||||
|
||||
else # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
||||
HOST_QEMU_OPTS += --disable-linux-user
|
||||
endif # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HOST_QEMU_VDE2),y)
|
||||
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 --enable-cap-ng
|
||||
HOST_QEMU_DEPENDENCIES += host-libcap-ng
|
||||
else
|
||||
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
|
||||
# call the compiler.
|
||||
define HOST_QEMU_CONFIGURE_CMDS
|
||||
unset TARGET_DIR; \
|
||||
cd $(@D); $(HOST_CONFIGURE_OPTS) CPP="$(HOSTCC) -E" \
|
||||
./configure \
|
||||
--target-list="$(HOST_QEMU_TARGETS)" \
|
||||
--prefix="$(HOST_DIR)" \
|
||||
--interp-prefix=$(STAGING_DIR) \
|
||||
--cc="$(HOSTCC)" \
|
||||
--host-cc="$(HOSTCC)" \
|
||||
--extra-cflags="$(HOST_QEMU_CFLAGS)" \
|
||||
--extra-ldflags="$(HOST_LDFLAGS)" \
|
||||
--meson=$(HOST_DIR)/bin/meson \
|
||||
--ninja=$(HOST_DIR)/bin/ninja \
|
||||
--disable-bpf \
|
||||
--disable-bzip2 \
|
||||
--disable-containers \
|
||||
--disable-curl \
|
||||
--disable-docs \
|
||||
--disable-libssh \
|
||||
--disable-linux-io-uring \
|
||||
--disable-sdl \
|
||||
--disable-vhost-user-blk-server \
|
||||
--disable-virtiofsd \
|
||||
--disable-vnc-jpeg \
|
||||
--disable-vnc-png \
|
||||
--disable-vnc-sasl \
|
||||
$(HOST_QEMU_OPTS)
|
||||
endef
|
||||
|
||||
define HOST_QEMU_BUILD_CMDS
|
||||
unset TARGET_DIR; \
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define HOST_QEMU_INSTALL_CMDS
|
||||
unset TARGET_DIR; \
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
|
||||
# variable used by other packages
|
||||
QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
|
||||
Reference in New Issue
Block a user