update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From 83a1afd73f2d0aff9aa11c1754d6d407983afa7d Mon Sep 17 00:00:00 2001
|
||||
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Date: Wed, 9 Apr 2014 12:48:36 +0200
|
||||
Subject: [PATCH] Fix khrplatform.h not installed if EGL is disabled.
|
||||
|
||||
KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is
|
||||
only installed if Mesa3d is compiled with EGL support.
|
||||
|
||||
This patch installs this header file unconditionally.
|
||||
|
||||
Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=77240
|
||||
|
||||
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> (rebased for mesa3d 10.3)
|
||||
|
||||
diff -uNr Mesa-10.3.0-rc2.org/src/egl/main/Makefile.am Mesa-10.3.0-rc2/src/egl/main/Makefile.am
|
||||
--- Mesa-10.3.0-rc2.org/src/egl/Makefile.am 2014-08-29 00:00:57.000000000 +0200
|
||||
+++ Mesa-10.3.0-rc2/src/egl/Makefile.am 2014-09-02 21:35:52.548071820 +0200
|
||||
@@ -85,9 +85,6 @@
|
||||
|
||||
pkgconfig_DATA = egl.pc
|
||||
|
||||
-khrdir = $(includedir)/KHR
|
||||
-khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
|
||||
-
|
||||
egldir = $(includedir)/EGL
|
||||
egl_HEADERS = \
|
||||
$(top_srcdir)/include/EGL/eglext.h \
|
||||
diff -uNr Mesa-10.3.0-rc2.org/src/mapi/Makefile.am Mesa-10.3.0-rc2/src/mapi/Makefile.am
|
||||
--- Mesa-10.3.0-rc2.org/src/mapi/Makefile.am 2014-09-01 01:22:12.000000000 +0200
|
||||
+++ Mesa-10.3.0-rc2/src/mapi/Makefile.am 2014-09-02 21:36:22.891686861 +0200
|
||||
@@ -211,4 +211,7 @@
|
||||
SUBDIRS += vgapi
|
||||
endif
|
||||
|
||||
+khrdir = $(includedir)/KHR
|
||||
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
|
||||
+
|
||||
include $(top_srcdir)/install-lib-links.mk
|
||||
@@ -0,0 +1,48 @@
|
||||
Fix runtime error with uClibc
|
||||
|
||||
Patch inspired by
|
||||
https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html
|
||||
http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a
|
||||
|
||||
Starting an app using mesa3d 10.5.x, Kodi for example, fails:
|
||||
|
||||
/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'.
|
||||
libGL error: unable to load driver: i965_dri.so
|
||||
libGL error: driver pointer missing
|
||||
libGL error: failed to load driver: i965
|
||||
libGL error: unable to load driver: swrast_dri.so
|
||||
libGL error: failed to load driver: swrast
|
||||
|
||||
This patch was rejected by upstream mesa3d:
|
||||
http://lists.freedesktop.org/archives/mesa-dev/2015-March/079436.html
|
||||
|
||||
The real fix was committed to uClibc:
|
||||
http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a
|
||||
|
||||
Until the external toolchains do not contain this uClibc patch we keep this
|
||||
patch: http://lists.busybox.net/pipermail/buildroot/2015-March/123410.html
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
diff -uNr mesa-10.5.3.org/src/glsl/nir/nir_constant_expressions.c mesa-10.5.3/src/glsl/nir/nir_constant_expressions.c
|
||||
--- mesa-10.5.3.org/src/compiler/nir/nir_constant_expressions.c 2015-04-12 23:31:29.000000000 +0200
|
||||
+++ mesa-10.5.3/src/compiler/nir/nir_constant_expressions.c 2015-04-13 19:59:37.819786541 +0200
|
||||
@@ -48,6 +48,18 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef __UCLIBC__
|
||||
+float fmaxf(float a, float b)
|
||||
+{
|
||||
+ return (a > b) ? a : b;
|
||||
+}
|
||||
+
|
||||
+float fminf(float a, float b)
|
||||
+{
|
||||
+ return (a < b) ? a : b;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* Evaluate one component of packSnorm4x8.
|
||||
*/
|
||||
18
bsp/buildroot-2017.02.11/package/mesa3d/0003-musl.patch
Normal file
18
bsp/buildroot-2017.02.11/package/mesa3d/0003-musl.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
Fix musl build
|
||||
|
||||
Downloaded from
|
||||
http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
--- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
|
||||
+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef VMW_SCREEN_H_
|
||||
#define VMW_SCREEN_H_
|
||||
|
||||
-
|
||||
+#include <sys/stat.h>
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
From 61b076689b6308b1c9d0d84ee8654a47e65e67ae Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Fri, 4 Nov 2016 19:44:37 +0100
|
||||
Subject: [PATCH 1/1] Fix endianess detection with musl-based toolchains
|
||||
|
||||
Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
|
||||
http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
|
||||
|
||||
This patch checks for the presence of endian.h and promotes the result
|
||||
to src/amd/Makefile.addrlib.am which executes the broken build command.
|
||||
Fixes compile errors detected by the autobuilder infrastructure of the
|
||||
buildroot project:
|
||||
|
||||
http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
|
||||
http://autobuild.buildroot.net/results/e27/e27a9a95f72dba3076549beb2a2ccfdbea2fcfee/
|
||||
|
||||
Patch sent upstream: https://patchwork.freedesktop.org/patch/119961/
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
src/amd/Makefile.addrlib.am | 1 +
|
||||
src/util/u_endian.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4761c59..7991b52 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -786,6 +786,7 @@ fi
|
||||
AC_HEADER_MAJOR
|
||||
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
|
||||
AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
|
||||
+AC_CHECK_HEADER([endian.h], [DEFINES="$DEFINES -DHAVE_ENDIAN_H"])
|
||||
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
|
||||
AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
|
||||
|
||||
diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
|
||||
index 64823fc..4e2fb1d 100644
|
||||
--- a/src/amd/Makefile.addrlib.am
|
||||
+++ b/src/amd/Makefile.addrlib.am
|
||||
@@ -28,6 +28,7 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
|
||||
-I$(srcdir)/addrlib/core \
|
||||
-I$(srcdir)/addrlib/inc/chip/r800 \
|
||||
-I$(srcdir)/addrlib/r800/chip \
|
||||
+ $(DEFINES) \
|
||||
-DBRAHMA_BUILD=1
|
||||
|
||||
addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
|
||||
diff --git a/src/util/u_endian.h b/src/util/u_endian.h
|
||||
index b9d563d..266fb4a 100644
|
||||
--- a/src/util/u_endian.h
|
||||
+++ b/src/util/u_endian.h
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef U_ENDIAN_H
|
||||
#define U_ENDIAN_H
|
||||
|
||||
-#if defined(__GLIBC__) || defined(ANDROID)
|
||||
+#if defined(__GLIBC__) || defined(ANDROID) || defined(HAVE_ENDIAN_H)
|
||||
#include <endian.h>
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
--
|
||||
2.10.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 60ee5191a0c074251862a15b12afdc9db0b2df38 Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Thu, 17 Nov 2016 15:36:54 -0300
|
||||
Subject: [PATCH] configure.ac: invert order for wayland-scanner check
|
||||
|
||||
When cross-compiling the .pc file might point to the wrong
|
||||
wayland-scanner binary (target rather than host) resulting in a
|
||||
non-executable and wrong scanner.
|
||||
Try searching the PATH first, and if that fails fall back into
|
||||
pkg-config.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
---
|
||||
configure.ac | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5f30ae8..461792e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2025,11 +2025,11 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
|
||||
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
|
||||
fi
|
||||
|
||||
-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
|
||||
- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
|
||||
- WAYLAND_SCANNER='')
|
||||
+AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
|
||||
if test "x$WAYLAND_SCANNER" = x; then
|
||||
- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
|
||||
+ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
|
||||
+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
|
||||
+ WAYLAND_SCANNER='')
|
||||
fi
|
||||
|
||||
# Do per-EGL platform setups and checks
|
||||
--
|
||||
2.7.3
|
||||
|
||||
204
bsp/buildroot-2017.02.11/package/mesa3d/Config.in
Normal file
204
bsp/buildroot-2017.02.11/package/mesa3d/Config.in
Normal file
@@ -0,0 +1,204 @@
|
||||
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
|
||||
select BR2_PACKAGE_LIBDRM
|
||||
select BR2_PACKAGE_EXPAT
|
||||
select BR2_PACKAGE_HAS_LIBGL if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XPROTO_DRI2PROTO if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
|
||||
help
|
||||
Mesa 3D, an open-source implementation of the OpenGL specification.
|
||||
|
||||
http://mesa3d.org
|
||||
|
||||
if BR2_PACKAGE_MESA3D
|
||||
|
||||
# inform the .mk file of gallium, dri or vulkan driver selection
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XPROTO_DRI3PROTO
|
||||
select BR2_PACKAGE_XPROTO_PRESENTPROTO if BR2_PACKAGE_XPROTO_DRI3PROTO
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
|
||||
bool
|
||||
select BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRIVER
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
bool
|
||||
|
||||
comment "Gallium drivers"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
|
||||
bool "Gallium nouveau driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_NOUVEAU
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
help
|
||||
Supports all Nvidia GPUs.
|
||||
|
||||
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
|
||||
bool "Gallium Radeon R600 driver"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_RADEON
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
help
|
||||
Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
|
||||
|
||||
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_VC4
|
||||
bool "Gallium vc4 driver"
|
||||
depends on BR2_arm
|
||||
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_VC4
|
||||
select BR2_PACKAGE_MESA3D_NEEDS_XA
|
||||
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.
|
||||
|
||||
comment "DRI drivers"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
|
||||
bool "DRI swrast driver"
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
help
|
||||
This is a software opengl implementation using the DRI
|
||||
infrastructure.
|
||||
|
||||
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
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER
|
||||
select BR2_PACKAGE_LIBDRM_INTEL
|
||||
help
|
||||
Support for i965-based Intel GPUs.
|
||||
|
||||
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 driver"
|
||||
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_HEADERS_AT_LEAST_3_18 # memfd.h
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert
|
||||
depends on BR2_PACKAGE_XORG7 # xproto_dri3proto
|
||||
# We need a SHA1 implementation. If either openssl or
|
||||
# libgcrypt are already part of the build, we'll use one of
|
||||
# them, otherwise, use the small libsha1 library.
|
||||
select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT)
|
||||
select BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
|
||||
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
|
||||
select BR2_PACKAGE_XPROTO_DRI3PROTO
|
||||
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.18"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 || \
|
||||
!BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7
|
||||
|
||||
comment "Off-screen Rendering"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OSMESA
|
||||
bool "OSMesa library"
|
||||
help
|
||||
The OSMesa API provides functions for making off-screen renderings.
|
||||
|
||||
if BR2_PACKAGE_MESA3D_DRIVER
|
||||
|
||||
comment "Additional API Support"
|
||||
|
||||
config BR2_PACKAGE_MESA3D_OPENGL_EGL
|
||||
bool "OpenGL EGL"
|
||||
select BR2_PACKAGE_HAS_LIBEGL
|
||||
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
|
||||
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_LIBGL
|
||||
default "mesa3d" if BR2_PACKAGE_XORG7
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
2
bsp/buildroot-2017.02.11/package/mesa3d/mesa3d.hash
Normal file
2
bsp/buildroot-2017.02.11/package/mesa3d/mesa3d.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From https://lists.freedesktop.org/archives/mesa-announce/2017-February/000294.html
|
||||
sha256 a95d7ce8f7bd5f88585e4be3144a341236d8c0fc91f6feaec59bb8ba3120e726 mesa-13.0.4.tar.xz
|
||||
196
bsp/buildroot-2017.02.11/package/mesa3d/mesa3d.mk
Normal file
196
bsp/buildroot-2017.02.11/package/mesa3d/mesa3d.mk
Normal file
@@ -0,0 +1,196 @@
|
||||
################################################################################
|
||||
#
|
||||
# mesa3d
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# When updating the version, please also update mesa3d-headers
|
||||
MESA3D_VERSION = 13.0.4
|
||||
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
|
||||
MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
|
||||
MESA3D_LICENSE = MIT, SGI, Khronos
|
||||
MESA3D_LICENSE_FILES = docs/license.html
|
||||
MESA3D_AUTORECONF = YES
|
||||
|
||||
MESA3D_INSTALL_STAGING = YES
|
||||
|
||||
MESA3D_PROVIDES =
|
||||
|
||||
MESA3D_DEPENDENCIES = \
|
||||
host-bison \
|
||||
host-flex \
|
||||
expat \
|
||||
libdrm
|
||||
|
||||
# Disable static, otherwise configure will fail with: "Cannot enable both static
|
||||
# and shared."
|
||||
ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
||||
MESA3D_CONF_OPTS += --disable-static
|
||||
endif
|
||||
|
||||
# The Sourcery MIPS toolchain has a special (non-upstream) feature to
|
||||
# have "compact exception handling", which unfortunately breaks with
|
||||
# mesa3d, so we disable it here by passing -mno-compact-eh.
|
||||
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
|
||||
MESA3D_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh"
|
||||
MESA3D_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mno-compact-eh"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
MESA3D_DEPENDENCIES += openssl
|
||||
MESA3D_CONF_OPTS += --with-sha1=libcrypto
|
||||
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
MESA3D_DEPENDENCIES += libgcrypt
|
||||
MESA3D_CONF_OPTS += --with-sha1=libgcrypt
|
||||
else ifeq ($(BR2_PACKAGE_LIBSHA1),y)
|
||||
MESA3D_DEPENDENCIES += libsha1
|
||||
MESA3D_CONF_OPTS += --with-sha1=libsha1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XORG7),y)
|
||||
MESA3D_DEPENDENCIES += \
|
||||
xproto_xf86driproto \
|
||||
xproto_dri2proto \
|
||||
xproto_glproto \
|
||||
xlib_libX11 \
|
||||
xlib_libXext \
|
||||
xlib_libXdamage \
|
||||
xlib_libXfixes \
|
||||
libxcb
|
||||
MESA3D_CONF_OPTS += --enable-glx --disable-mangling
|
||||
# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
|
||||
MESA3D_CONF_OPTS += --enable-xa
|
||||
else
|
||||
MESA3D_CONF_OPTS += --disable-xa
|
||||
endif
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
--disable-glx \
|
||||
--disable-xa
|
||||
endif
|
||||
|
||||
# Drivers
|
||||
|
||||
#Gallium Drivers
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
|
||||
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_VC4) += vc4
|
||||
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
|
||||
# DRI Drivers
|
||||
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
|
||||
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) += radeon
|
||||
# Vulkan Drivers
|
||||
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
--without-gallium-drivers
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
--enable-shared-glapi \
|
||||
--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
--without-dri-drivers --disable-dri3
|
||||
else
|
||||
ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
|
||||
MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
|
||||
MESA3D_CONF_OPTS += --enable-dri3
|
||||
else
|
||||
MESA3D_CONF_OPTS += --disable-dri3
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
|
||||
MESA3D_DEPENDENCIES += xlib_libXxf86vm
|
||||
endif
|
||||
MESA3D_CONF_OPTS += \
|
||||
--enable-shared-glapi \
|
||||
--enable-driglx-direct \
|
||||
--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
|
||||
MESA3D_CONF_OPTS += \
|
||||
--without-vulkan-drivers
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
--with-vulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
|
||||
endif
|
||||
|
||||
# APIs
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
|
||||
MESA3D_CONF_OPTS += --enable-osmesa
|
||||
else
|
||||
MESA3D_CONF_OPTS += --disable-osmesa
|
||||
endif
|
||||
|
||||
# Always enable OpenGL:
|
||||
# - it is needed for GLES (mesa3d's ./configure is a bit weird)
|
||||
MESA3D_CONF_OPTS += --enable-opengl --enable-dri
|
||||
|
||||
# libva and mesa3d have a circular dependency
|
||||
# we do not need libva support in mesa3d, therefore disable this option
|
||||
MESA3D_CONF_OPTS += --disable-va
|
||||
|
||||
# libGL is only provided for a full xorg stack
|
||||
ifeq ($(BR2_PACKAGE_XORG7),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_OPENGL_EGL),y)
|
||||
MESA3D_PROVIDES += libegl
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
|
||||
MESA3D_EGL_PLATFORMS = drm
|
||||
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
|
||||
MESA3D_EGL_PLATFORMS = drm
|
||||
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL),y)
|
||||
MESA3D_EGL_PLATFORMS = drm
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_WAYLAND),y)
|
||||
MESA3D_DEPENDENCIES += wayland
|
||||
MESA3D_EGL_PLATFORMS += wayland
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_XORG7),y)
|
||||
MESA3D_EGL_PLATFORMS += x11
|
||||
endif
|
||||
MESA3D_CONF_OPTS += \
|
||||
--enable-gbm \
|
||||
--enable-egl \
|
||||
--with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
|
||||
else
|
||||
MESA3D_CONF_OPTS += \
|
||||
--disable-egl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
|
||||
MESA3D_PROVIDES += libgles
|
||||
MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
|
||||
else
|
||||
MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
|
||||
MESA3D_CONF_OPTS += --enable-lmsensors
|
||||
MESA3D_DEPENDENCIES += lm-sensors
|
||||
else
|
||||
MESA3D_CONF_OPTS += --disable-lmsensors
|
||||
endif
|
||||
|
||||
# Avoid automatic search of llvm-config
|
||||
MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user