initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 705490763fcc052defa2d49a5c5200775cd12c54 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Wed, 4 Mar 2020 08:27:24 +0100
|
||||
Subject: [PATCH] c99_math: import isinf for uclibc based toolchains
|
||||
|
||||
The same fix as for glibc >= 2.23 is needed for uclibc
|
||||
based toolchains.
|
||||
|
||||
[Upstream suggested: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4042]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
include/c99_math.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/c99_math.h b/include/c99_math.h
|
||||
index e906c26aa54..c8a73a2d2c7 100644
|
||||
--- a/include/c99_math.h
|
||||
+++ b/include/c99_math.h
|
||||
@@ -190,7 +190,7 @@ fpclassify(double x)
|
||||
* undefines those functions, which in glibc 2.23, are defined as macros rather
|
||||
* than functions as in glibc 2.22.
|
||||
*/
|
||||
-#if __cplusplus >= 201103L && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23))
|
||||
+#if __cplusplus >= 201103L && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23) || defined(__UCLIBC__))
|
||||
#include <cmath>
|
||||
|
||||
using std::fpclassify;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 7b46756a99aca7f27a45c3b99460f088570f6f53 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@smile.fr>
|
||||
Date: Wed, 17 Apr 2019 23:07:42 +0200
|
||||
Subject: [PATCH] meson: Set proper value for LIBCLC_INCLUDEDIR
|
||||
|
||||
LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
|
||||
will look for OpenCL "headers" on the target, when building the OpenCL
|
||||
kernels.
|
||||
|
||||
The value returned by pkg-config for includedir is relevant when
|
||||
cross-compiling, on the build machine. But in this specific case, we
|
||||
really need a value that is valid on the target.
|
||||
|
||||
Those headers are installed by the libclc package in /usr/share so
|
||||
that they are not removed by Buildroot target-finalize logic.
|
||||
|
||||
Based on the patch for autotools provided by Valentin Korenblit.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@smile.fr>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[rebased for 20.2.0 & 20.3.0]
|
||||
---
|
||||
src/gallium/frontends/clover/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
|
||||
index 62ac5f5278d..ecdeb39669c 100644
|
||||
--- a/src/gallium/frontends/clover/meson.build
|
||||
+++ b/src/gallium/frontends/clover/meson.build
|
||||
@@ -27,7 +27,7 @@
|
||||
'-DCL_USE_DEPRECATED_OPENCL_2_0_APIS',
|
||||
'-DCL_USE_DEPRECATED_OPENCL_2_1_APIS',
|
||||
'-DCL_USE_DEPRECATED_OPENCL_2_2_APIS',
|
||||
- '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'includedir')),
|
||||
+ '-DLIBCLC_INCLUDEDIR="/usr/share"',
|
||||
'-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'libexecdir'))
|
||||
]
|
||||
clover_spirv_cpp_args = []
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
From e3b47c1b84964c62b3e1fa782f1ffa4be0ae62f9 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Mon, 9 Mar 2020 13:01:14 +0100
|
||||
Subject: [PATCH] vc4: add meson option to disable optional neon support
|
||||
|
||||
Not all toolchains are able to compile the runtime
|
||||
optional vc4 neon support, so add an meson option
|
||||
to force disabling it at compile time.
|
||||
|
||||
[Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4114]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[rebased for 20.2.0, 20.3.0 & 21.1.0]
|
||||
---
|
||||
meson_options.txt | 7 +++++++
|
||||
src/gallium/drivers/vc4/meson.build | 4 ++--
|
||||
src/gallium/drivers/vc4/vc4_tiling.h | 4 ++--
|
||||
3 files changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index a39596a6f19..0f6b6c62b55 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -123,6 +123,13 @@ option(
|
||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
||||
description : 'enable gallium va frontend.',
|
||||
)
|
||||
+option(
|
||||
+ 'gallium-vc4-neon',
|
||||
+ type : 'combo',
|
||||
+ value : 'auto',
|
||||
+ choices : ['auto', 'disabled'],
|
||||
+ description : 'enable gallium vc4 optional neon support.',
|
||||
+)
|
||||
option(
|
||||
'va-libs-path',
|
||||
type : 'string',
|
||||
diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build
|
||||
index 5ce5af5f6b4..e3f7d8d62ae 100644
|
||||
--- a/src/gallium/drivers/vc4/meson.build
|
||||
+++ b/src/gallium/drivers/vc4/meson.build
|
||||
@@ -84,7 +84,7 @@ files_libvc4 = files(
|
||||
vc4_c_args = []
|
||||
|
||||
libvc4_neon = []
|
||||
-if host_machine.cpu_family() == 'arm'
|
||||
+if host_machine.cpu_family() == 'arm' and get_option('gallium-vc4-neon') != 'disabled'
|
||||
libvc4_neon = static_library(
|
||||
'vc4_neon',
|
||||
'vc4_tiling_lt_neon.c',
|
||||
@@ -93,7 +93,7 @@ if host_machine.cpu_family() == 'arm'
|
||||
],
|
||||
c_args : '-mfpu=neon',
|
||||
)
|
||||
- vc4_c_args += '-DUSE_ARM_ASM'
|
||||
+ vc4_c_args += '-DVC4_TILING_LT_NEON'
|
||||
endif
|
||||
|
||||
if dep_simpenrose.found()
|
||||
diff --git a/src/gallium/drivers/vc4/vc4_tiling.h b/src/gallium/drivers/vc4/vc4_tiling.h
|
||||
index 66767e7f1f8..7446f1c3d0c 100644
|
||||
--- a/src/gallium/drivers/vc4/vc4_tiling.h
|
||||
+++ b/src/gallium/drivers/vc4/vc4_tiling.h
|
||||
@@ -89,7 +89,7 @@ vc4_load_lt_image(void *dst, uint32_t dst_stride,
|
||||
void *src, uint32_t src_stride,
|
||||
int cpp, const struct pipe_box *box)
|
||||
{
|
||||
-#ifdef USE_ARM_ASM
|
||||
+#ifdef VC4_TILING_LT_NEON
|
||||
if (util_get_cpu_caps()->has_neon) {
|
||||
vc4_load_lt_image_neon(dst, dst_stride, src, src_stride,
|
||||
cpp, box);
|
||||
@@ -105,7 +105,7 @@ vc4_store_lt_image(void *dst, uint32_t dst_stride,
|
||||
void *src, uint32_t src_stride,
|
||||
int cpp, const struct pipe_box *box)
|
||||
{
|
||||
-#ifdef USE_ARM_ASM
|
||||
+#ifdef VC4_TILING_LT_NEON
|
||||
if (util_get_cpu_caps()->has_neon) {
|
||||
vc4_store_lt_image_neon(dst, dst_stride, src, src_stride,
|
||||
cpp, box);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From fdc8b5a205e2116408aeb9fd305e57f656e2e89d Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sun, 9 Aug 2020 17:06:26 +0200
|
||||
Subject: [PATCH] src/util/rand_xor: Include stddef.h to fix build error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes
|
||||
|
||||
In file included from ../src/util/rand_xor.c:29:
|
||||
output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35:
|
||||
error: unknown type name ‘size_t’
|
||||
extern int getrandom(void *__buf, size_t count, unsigned int flags)
|
||||
|
||||
seen with gcc version 8.3.0 (Buildroot 2020.02) and uClibc.
|
||||
|
||||
Patch sent upstream:
|
||||
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6248
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
src/util/rand_xor.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
|
||||
index 81b64f1ea71..fcb481487fa 100644
|
||||
--- a/src/util/rand_xor.c
|
||||
+++ b/src/util/rand_xor.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "detect_os.h"
|
||||
|
||||
#if !DETECT_OS_WINDOWS
|
||||
+#include <stddef.h>
|
||||
#if defined(HAVE_GETRANDOM)
|
||||
#include <sys/random.h>
|
||||
#endif
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From e501b7c17ada9c694d3f8302622b78d733485b38 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 21 Aug 2021 17:55:33 +0200
|
||||
Subject: [PATCH] src/util/futex.h: fix build on 32-bit architectures using
|
||||
64-bit time_t
|
||||
|
||||
Fix the following build failure on 32-bit architectures using 64-bit
|
||||
time_t (e.g. riscv32):
|
||||
|
||||
../src/util/futex.h: In function 'sys_futex':
|
||||
../src/util/futex.h:39:19: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
|
||||
39 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
|
||||
| ^~~~~~~~~
|
||||
| sys_futex
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/692700a5f967760a0b8cd358b1712f1d5a7b681e
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12496]
|
||||
---
|
||||
src/util/futex.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/util/futex.h b/src/util/futex.h
|
||||
index 43097f4cd5b..221eda9db0c 100644
|
||||
--- a/src/util/futex.h
|
||||
+++ b/src/util/futex.h
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
+#ifndef SYS_futex
|
||||
+#define SYS_futex SYS_futex_time64
|
||||
+#endif
|
||||
+
|
||||
static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
|
||||
{
|
||||
return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
menuconfig BR2_PACKAGE_MESA3D
|
||||
bool "mesa3d"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_1
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # m68k needs gcc >= 7.x
|
||||
select BR2_PACKAGE_EXPAT
|
||||
select BR2_PACKAGE_LIBDRM
|
||||
select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Mesa 3D, an open-source implementation of the OpenGL
|
||||
specification.
|
||||
|
||||
http://mesa3d.org
|
||||
|
||||
if BR2_PACKAGE_MESA3D
|
||||
|
||||
# Some Gallium driver needs libelf when built with LLVM support
|
||||
config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_MESA3D_LLVM
|
||||
bool "llvm support"
|
||||
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_WCHAR # std::wstring
|
||||
select BR2_PACKAGE_LLVM
|
||||
|
||||
comment "llvm support needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, dynamic library"
|
||||
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|
||||
|| BR2_STATIC_LIBS || !BR2_USE_WCHAR
|
||||
|
||||
comment "llvm support needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
# clang and libclc dependencies are satisfied by
|
||||
# BR2_PACKAGE_MESA3D_LLVM
|
||||
config BR2_PACKAGE_MESA3D_OPENCL
|
||||
bool "OpenCL support"
|
||||
depends on BR2_PACKAGE_MESA3D_LLVM
|
||||
depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
|
||||
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
|
||||
select BR2_PACKAGE_LLVM_RTTI
|
||||
select BR2_PACKAGE_CLANG
|
||||
select BR2_PACKAGE_LIBCLC
|
||||
select BR2_PACKAGE_HAS_LIBOPENCL
|
||||
|
||||
# inform the .mk file of gallium, dri or vulkan driver selection
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
bool
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
bool
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
select BR2_PACKAGE_MESA3D_GBM if \
|
||||
!BR2_PACKAGE_MESA3D_OPENGL_GLX && \
|
||||
!BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \
|
||||
(BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4 && \
|
||||
!BR2_RISCV_32)
|
||||
|
||||
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
|
||||
bool
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRIVER
|
||||
bool
|
||||
|
||||
# Gallium xa state tracker.
|
||||
# Quote from mesa3d meson.build: "XA state tracker requires at least
|
||||
# one of the following gallium drivers: nouveau, freedreno, i915, svga.
|
||||
config BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
bool
|
||||
|
||||
# OpenGL GLX and Gallium VDPAU both needs X11
|
||||
config BR2_PACKAGE_MESA3D_NEEDS_X11
|
||||
bool
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_LIBXCB
|
||||
select BR2_PACKAGE_XLIB_LIBX11
|
||||
select BR2_PACKAGE_XLIB_LIBXDAMAGE
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT
|
||||
select BR2_PACKAGE_XLIB_LIBXFIXES
|
||||
select BR2_PACKAGE_XLIB_LIBXRANDR
|
||||
select BR2_PACKAGE_XLIB_LIBXXF86VM
|
||||
select BR2_PACKAGE_XORGPROTO
|
||||
|
||||
comment "Gallium drivers"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
|
||||
bool "Gallium Etnaviv driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_ETNAVIV
|
||||
help
|
||||
Mesa driver for Vivante GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
|
||||
bool "Gallium freedreno driver"
|
||||
depends on BR2_arm || BR2_aarch64 || BR2_aarch64_be # libdrm-freedreno
|
||||
# libdrm's freedreno option depends on LIBDRM_HAS_ATOMIC. Propagating
|
||||
# that dependency here causes a circular dependency that Kconfig
|
||||
# can't see is just spurious. However, that dependency is about
|
||||
# the toolchain having sync4 primitives, which is always a given
|
||||
# for arm/aarch64.
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_FREEDRENO
|
||||
help
|
||||
Mesa driver for Freedreno GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
|
||||
bool "Gallium i915 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_INTEL
|
||||
help
|
||||
Support for i915-based Intel GPUs.
|
||||
|
||||
comment "Gallium i915: Only one i915 provider can be built"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
|
||||
bool "Gallium iris driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
help
|
||||
Mesa driver for iris-based Intel GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA
|
||||
bool "Gallium lima driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
help
|
||||
Mesa driver for ARM Mali Utgard GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
|
||||
bool "Gallium nouveau driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_NOUVEAU
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
select BR2_PACKAGE_LLVM_RTTI if BR2_PACKAGE_MESA3D_LLVM
|
||||
help
|
||||
Supports all Nvidia GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST
|
||||
bool "Gallium panfrost driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
help
|
||||
Mesa driver for ARM Mali Midgard and Bifrost GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300
|
||||
bool "Gallium Radeon R300 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
# lbdrm's radeon option depends on LIBDRM_HAS_ATOMIC. Propagating
|
||||
# that dependency here causes a circular dependency that Kconfig
|
||||
# can't see is just spurious. However, that dependency is about
|
||||
# the toolchain having sync4 primitives, which is always a given
|
||||
# for x86.
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_RADEON
|
||||
help
|
||||
Driver for ATI/AMD Radeon R300/R400/R500 GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
|
||||
bool "Gallium Radeon R600 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on !BR2_PACKAGE_MESA3D_LLVM || \
|
||||
(BR2_PACKAGE_MESA3D_LLVM && (BR2_TOOLCHAIN_USES_UCLIBC || \
|
||||
BR2_TOOLCHAIN_USES_GLIBC)) # elfutils
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_RADEON
|
||||
select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
|
||||
select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
|
||||
help
|
||||
Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
|
||||
|
||||
# R600 needs libelf when Mesa3D is built with LLVM support
|
||||
# musl is not currently compatible with elfutils
|
||||
comment "R600 driver needs a uClibc or glibc toolchain when llvm is enabled"
|
||||
depends on BR2_PACKAGE_MESA3D_LLVM
|
||||
depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
|
||||
bool "Gallium Radeon SI driver"
|
||||
depends on BR2_USE_MMU # libdrm
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_PACKAGE_MESA3D_LLVM
|
||||
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_AMDGPU
|
||||
select BR2_PACKAGE_LIBDRM_RADEON
|
||||
select BR2_PACKAGE_LLVM_AMDGPU
|
||||
select BR2_PACKAGE_ELFUTILS
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
|
||||
help
|
||||
Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.
|
||||
|
||||
# Radeon SI needs libelf
|
||||
# musl is not currently compatible with elfutils
|
||||
comment "Radeon SI driver needs a uClibc or glibc toolchain"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_PACKAGE_MESA3D_LLVM
|
||||
depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
|
||||
bool "Gallium vmware svga driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_VMWGFX
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
help
|
||||
This is a virtual GPU driver for VMWare virtual machines.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
|
||||
bool "Gallium swrast driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
help
|
||||
This is a software opengl implementation using the Gallium3D
|
||||
infrastructure.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA
|
||||
bool "Gallium tegra driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
|
||||
select BR2_PACKAGE_LIBDRM_NOUVEAU
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
help
|
||||
Adds support for Nvidia Tegra GPUs, requires nouveau.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
|
||||
bool "Gallium v3d driver"
|
||||
depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_VC4
|
||||
select BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
help
|
||||
Driver for Broadcom VC6 (rpi4) GPUs (needs vc4).
|
||||
|
||||
It requires a kernel 4.18+ with DRM V3D support enabled:
|
||||
|
||||
- CONFIG_DRM_V3D
|
||||
- CONFIG_DRM_VC4
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
|
||||
bool "Gallium vc4 driver"
|
||||
depends on BR2_arm || BR2_aarch64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_VC4
|
||||
select BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
help
|
||||
Driver for Broadcom VC4 (rpi2/3) GPUs.
|
||||
It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
|
||||
bool "Gallium virgl driver"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
help
|
||||
virgl is the 3D acceleration backend for the virtio-gpu
|
||||
shipping with qemu.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_VDPAU
|
||||
bool "Gallium VDPAU state tracker"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300 \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_X11
|
||||
select BR2_PACKAGE_LIBVDPAU
|
||||
help
|
||||
VDPAU state tracker (needs r300, r600, radeonsi or nouveau
|
||||
gallium drivers).
|
||||
|
||||
comment "Gallium VDPAU state tracker needs X.org and gallium drivers r300, r600, radeonsi or nouveau"
|
||||
depends on !BR2_PACKAGE_XORG7 || \
|
||||
!(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300 \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI)
|
||||
|
||||
config BR2_PACKAGE_MESA3D_XVMC
|
||||
bool "Gallium XvMC state tracker"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_X11
|
||||
select BR2_PACKAGE_XLIB_LIBXV
|
||||
select BR2_PACKAGE_XLIB_LIBXVMC
|
||||
help
|
||||
XvMC state tracker (needs r600 or nouveau gallium drivers).
|
||||
|
||||
comment "Gallium XvMC state tracker needs X.org and gallium drivers r600 or nouveau"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on !BR2_PACKAGE_XORG7 || \
|
||||
!(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
|
||||
|| BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600)
|
||||
|
||||
comment "DRI drivers"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
|
||||
bool "DRI i915 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_INTEL
|
||||
help
|
||||
Support for i915-based Intel GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
|
||||
bool "DRI i965 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_INTEL
|
||||
help
|
||||
Support for i965-based Intel GPUs.
|
||||
|
||||
comment "DRI i965 driver needs a toolchain w/ headers >= 3.17"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU
|
||||
bool "DRI nouveau driver"
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_NOUVEAU
|
||||
help
|
||||
Support for Nvidia-based GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
|
||||
bool "DRI radeon r100 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
# libdrm's radeon option depends on LIBDRM_HAS_ATOMIC. Propagating
|
||||
# that dependency here causes a circular dependency that Kconfig
|
||||
# can't see is just spurious. However, that dependency is about
|
||||
# the toolchain having sync4 primitives, which is always a given
|
||||
# for i386 and x86_64.
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_RADEON
|
||||
help
|
||||
Legacy Radeon driver for R100 series GPUs.
|
||||
|
||||
comment "Vulkan drivers"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
|
||||
bool "Vulkan Intel driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libxshmfence
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert
|
||||
depends on BR2_PACKAGE_XORG7 # xorgproto
|
||||
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
|
||||
select BR2_PACKAGE_XORGPROTO
|
||||
select BR2_PACKAGE_XLIB_LIBXSHMFENCE
|
||||
help
|
||||
Vulkan driver for Intel hardware from Ivy Bridge onward.
|
||||
|
||||
comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >= 3.17"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \
|
||||
!BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7
|
||||
|
||||
comment "Off-screen Rendering"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
|
||||
bool "OSMesa (Gallium) library"
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
|
||||
help
|
||||
The OSMesa API provides functions for off-screen rendering.
|
||||
|
||||
if BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
comment "OpenGL API Support"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GBM
|
||||
bool "gbm"
|
||||
depends on BR2_PACKAGE_MESA3D_DRI_DRIVER \
|
||||
|| (BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL)
|
||||
select BR2_PACKAGE_HAS_LIBGBM
|
||||
select BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
|
||||
select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
|
||||
help
|
||||
Enable Generic Buffer Management (gbm)
|
||||
|
||||
comment "gbm support needs a dri driver or a gallium driver w/ EGL support."
|
||||
depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER \
|
||||
&& !(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL)
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OPENGL_GLX
|
||||
bool "OpenGL GLX"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_HAS_LIBGL
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_X11
|
||||
help
|
||||
Enable GLX graphic acceleration (OpenGL + X11).
|
||||
|
||||
comment "OpenGL GLX support needs X11"
|
||||
depends on !BR2_PACKAGE_XORG7
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
bool "OpenGL EGL"
|
||||
select BR2_PACKAGE_HAS_LIBEGL
|
||||
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
|
||||
select BR2_PACKAGE_MESA3D_GBM
|
||||
help
|
||||
Use the Khronos EGL APIs. EGL is a window manager for OpenGL
|
||||
applications similar to GLX, for X, and WGL, for Windows.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OPENGL_ES
|
||||
bool "OpenGL ES"
|
||||
select BR2_PACKAGE_HAS_LIBGLES
|
||||
help
|
||||
Use the Khronos OpenGL ES APIs. This is commonly used on
|
||||
embedded systems and represents a subset of the OpenGL API.
|
||||
|
||||
endif # BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGBM
|
||||
default "mesa3d" if BR2_PACKAGE_MESA3D_GBM
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGL
|
||||
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_GLX
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBEGL
|
||||
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBGLES
|
||||
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_LIBOPENCL
|
||||
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENCL
|
||||
|
||||
endif # BR2_PACKAGE_MESA3D
|
||||
|
||||
comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_1
|
||||
|
||||
comment "mesa3d needs a toolchain w/ gcc >= 7"
|
||||
depends on BR2_m68k
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
@@ -0,0 +1,6 @@
|
||||
# From https://lists.freedesktop.org/archives/mesa-announce/2021-September/000644.html
|
||||
sha256 5cd32f5d089dca75300578a3d771a656eaed652090573a2655fe4e7022d56bfc mesa-21.1.8.tar.xz
|
||||
sha512 80fcf2b1d59b49e384e9aa1ae63a3ce709833059af1ffd8eb821054c1976709134098cfc79fac1578a2f08a003223f1c96b38e2e650c5be49821c6f2fe1047af mesa-21.1.8.tar.xz
|
||||
|
||||
# License
|
||||
sha256 998437f3f75f0c542046f83c1cb349408122268168fb13eb4ae6967aa18b7d98 docs/license.rst
|
||||
@@ -0,0 +1,269 @@
|
||||
################################################################################
|
||||
#
|
||||
# mesa3d
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# When updating the version, please also update mesa3d-headers
|
||||
MESA3D_VERSION = 21.1.8
|
||||
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
|
||||
MESA3D_SITE = https://archive.mesa3d.org
|
||||
MESA3D_LICENSE = MIT, SGI, Khronos
|
||||
MESA3D_LICENSE_FILES = docs/license.rst
|
||||
MESA3D_CPE_ID_VENDOR = mesa3d
|
||||
MESA3D_CPE_ID_PRODUCT = mesa
|
||||
|
||||
MESA3D_INSTALL_STAGING = YES
|
||||
|
||||
MESA3D_PROVIDES =
|
||||
|
||||
MESA3D_DEPENDENCIES = \
|
||||
host-bison \
|
||||
host-flex \
|
||||
host-python3-mako \
|
||||
expat \
|
||||
libdrm \
|
||||
zlib
|
||||
|
||||
MESA3D_CONF_OPTS = \
|
||||
-Dgallium-omx=disabled \
|
||||
-Dpower8=disabled
|
||||
|
||||
# Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker
|
||||
# flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217).
|
||||
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
|
||||
MESA3D_CONF_OPTS += -Db_asneeded=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
|
||||
MESA3D_DEPENDENCIES += host-llvm llvm
|
||||
MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'
|
||||
MESA3D_CONF_OPTS += -Dllvm=enabled
|
||||
else
|
||||
# Avoid automatic search of llvm-config
|
||||
MESA3D_CONF_OPTS += -Dllvm=disabled
|
||||
endif
|
||||
|
||||
# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
|
||||
# libMesaOpenCL and CL headers are installed
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
|
||||
MESA3D_PROVIDES += libopencl
|
||||
MESA3D_DEPENDENCIES += clang libclc
|
||||
MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgallium-opencl=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
|
||||
MESA3D_DEPENDENCIES += elfutils
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
|
||||
# Disable-mangling not yet supported by meson build system.
|
||||
# glx:
|
||||
# dri : dri based GLX requires at least one DRI driver || dri based GLX requires shared-glapi
|
||||
# xlib : xlib conflicts with any dri driver
|
||||
# gallium-xlib : Gallium-xlib based GLX requires at least one gallium driver || Gallium-xlib based GLX requires softpipe or llvmpipe || gallium-xlib conflicts with any dri driver.
|
||||
MESA3D_CONF_OPTS += -Dglx=dri
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
|
||||
MESA3D_CONF_OPTS += -Dgallium-xa=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgallium-xa=disabled
|
||||
endif
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dglx=disabled \
|
||||
-Dgallium-xa=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
|
||||
MESA3D_CONF_OPTS += -Dgallium-vc4-neon=auto
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgallium-vc4-neon=disabled
|
||||
endif
|
||||
|
||||
# Drivers
|
||||
|
||||
#Gallium Drivers
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV) += etnaviv
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO) += freedreno
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915) += i915
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS) += iris
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA) += lima
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST) += panfrost
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300) += r300
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA) += tegra
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D) += v3d
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4) += vc4
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
|
||||
# DRI Drivers
|
||||
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
|
||||
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
|
||||
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
|
||||
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100
|
||||
# Vulkan Drivers
|
||||
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dgallium-drivers= \
|
||||
-Dgallium-extra-hud=false
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dshared-glapi=enabled \
|
||||
-Dgallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
|
||||
-Dgallium-extra-hud=true
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Ddri-drivers= -Ddri3=disabled
|
||||
else
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
|
||||
MESA3D_DEPENDENCIES += xlib_libxshmfence
|
||||
MESA3D_CONF_OPTS += -Ddri3=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Ddri3=disabled
|
||||
endif
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dshared-glapi=enabled \
|
||||
-Dglx-direct=true \
|
||||
-Ddri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dvulkan-drivers=
|
||||
else
|
||||
MESA3D_DEPENDENCIES += xlib_libxshmfence
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Ddri3=enabled \
|
||||
-Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
|
||||
endif
|
||||
|
||||
# APIs
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_GALLIUM),y)
|
||||
MESA3D_CONF_OPTS += -Dosmesa=true
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dosmesa=false
|
||||
endif
|
||||
|
||||
# Always enable OpenGL:
|
||||
# - Building OpenGL ES without OpenGL is not supported, so always keep opengl enabled.
|
||||
MESA3D_CONF_OPTS += -Dopengl=true
|
||||
|
||||
# libva and mesa3d have a circular dependency
|
||||
# we do not need libva support in mesa3d, therefore disable this option
|
||||
MESA3D_CONF_OPTS += -Dgallium-va=disabled
|
||||
|
||||
# libGL is only provided for a full xorg stack
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
|
||||
MESA3D_PROVIDES += libgl
|
||||
else
|
||||
define MESA3D_REMOVE_OPENGL_HEADERS
|
||||
rm -rf $(STAGING_DIR)/usr/include/GL/
|
||||
endef
|
||||
|
||||
MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_HEADERS
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_X11),y)
|
||||
MESA3D_DEPENDENCIES += \
|
||||
xlib_libX11 \
|
||||
xlib_libXext \
|
||||
xlib_libXdamage \
|
||||
xlib_libXfixes \
|
||||
xlib_libXrandr \
|
||||
xlib_libXxf86vm \
|
||||
xorgproto \
|
||||
libxcb
|
||||
MESA3D_PLATFORMS += x11
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_WAYLAND),y)
|
||||
MESA3D_DEPENDENCIES += wayland wayland-protocols
|
||||
MESA3D_PLATFORMS += wayland
|
||||
endif
|
||||
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dplatforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dgbm=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Dgbm=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
|
||||
MESA3D_PROVIDES += libegl
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Degl=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
-Degl=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
|
||||
MESA3D_PROVIDES += libgles
|
||||
MESA3D_CONF_OPTS += -Dgles1=enabled -Dgles2=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgles1=disabled -Dgles2=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_XVMC),y)
|
||||
MESA3D_DEPENDENCIES += xlib_libXv xlib_libXvMC
|
||||
MESA3D_CONF_OPTS += -Dgallium-xvmc=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgallium-xvmc=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_VALGRIND),y)
|
||||
MESA3D_CONF_OPTS += -Dvalgrind=enabled
|
||||
MESA3D_DEPENDENCIES += valgrind
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dvalgrind=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
|
||||
MESA3D_CONF_OPTS += -Dlibunwind=enabled
|
||||
MESA3D_DEPENDENCIES += libunwind
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dlibunwind=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_VDPAU),y)
|
||||
MESA3D_DEPENDENCIES += libvdpau
|
||||
MESA3D_CONF_OPTS += -Dgallium-vdpau=enabled
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dgallium-vdpau=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
|
||||
MESA3D_CONF_OPTS += -Dlmsensors=enabled
|
||||
MESA3D_DEPENDENCIES += lm-sensors
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dlmsensors=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZSTD),y)
|
||||
MESA3D_CONF_OPTS += -Dzstd=enabled
|
||||
MESA3D_DEPENDENCIES += zstd
|
||||
else
|
||||
MESA3D_CONF_OPTS += -Dzstd=disabled
|
||||
endif
|
||||
|
||||
MESA3D_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
# m68k needs 32-bit offsets in switch tables to build
|
||||
ifeq ($(BR2_m68k),y)
|
||||
MESA3D_CFLAGS += -mlong-jump-table-offsets
|
||||
endif
|
||||
|
||||
$(eval $(meson-package))
|
||||
Reference in New Issue
Block a user