From 8c8225d0f3e6eec395044c5bcfbd0ef44a47fd7d Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Mon, 27 Nov 2023 22:05:16 +0100 Subject: [PATCH 1/2] feat(system): mesa3d: debump for all except pi5 --- Config.in | 4 + custom/list.hash | 6 - ...tion-to-disable-optional-neon-suppor.patch | 85 ---- ...o-disable-optional-neon-suppor.patch.patch | 36 -- .../0004-Fix-uClibc-build.patch.pending | 70 --- ...-driver-includes-Intel-sour.patch.obsolete | 46 -- custom/package/mesa3d/mesa3d.hash | 5 - custom/package/mesa3d/mesa3d.hash.patch | 11 - custom/package/mesa3d/mesa3d.mk | 6 +- custom/package/mesa3d/mesa3d.mk.patch | 15 +- package/mesa3d-headers-rpi5/Config.in | 9 + package/mesa3d-headers-rpi5/dri.pc | 10 + .../mesa3d-headers-rpi5.mk | 77 ++++ ...t-proper-value-for-LIBCLC_INCLUDEDIR.patch | 41 ++ ...r-Include-stddef.h-to-fix-build-erro.patch | 40 ++ package/mesa3d-rpi5/Config.in | 397 ++++++++++++++++++ package/mesa3d-rpi5/mesa3d-rpi5.mk | 267 ++++++++++++ package/recalbox-system/Config.in | 13 +- 18 files changed, 856 insertions(+), 282 deletions(-) delete mode 100644 custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch delete mode 100644 custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch.patch delete mode 100644 custom/package/mesa3d/0004-Fix-uClibc-build.patch.pending delete mode 100644 custom/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch.obsolete delete mode 100644 custom/package/mesa3d/mesa3d.hash delete mode 100644 custom/package/mesa3d/mesa3d.hash.patch create mode 100644 package/mesa3d-headers-rpi5/Config.in create mode 100644 package/mesa3d-headers-rpi5/dri.pc create mode 100644 package/mesa3d-headers-rpi5/mesa3d-headers-rpi5.mk create mode 100644 package/mesa3d-rpi5/0001-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch create mode 100644 package/mesa3d-rpi5/0003-src-util-rand_xor-Include-stddef.h-to-fix-build-erro.patch create mode 100644 package/mesa3d-rpi5/Config.in create mode 100644 package/mesa3d-rpi5/mesa3d-rpi5.mk diff --git a/Config.in b/Config.in index 7e9be4324c..6ee61af726 100644 --- a/Config.in +++ b/Config.in @@ -27,6 +27,10 @@ menu "Recalbox" source "$BR2_EXTERNAL_RECALBOX_PATH/package/spirv-tools/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/spirv-headers/Config.in.host" endmenu + menu "Broadcom" + source "$BR2_EXTERNAL_RECALBOX_PATH/package/mesa3d-rpi5/Config.in" + source "$BR2_EXTERNAL_RECALBOX_PATH/package/mesa3d-headers-rpi5/Config.in" + endmenu endmenu menu "Boot" comment "Boot specific options" diff --git a/custom/list.hash b/custom/list.hash index 4d10aa76ad..2d55c0b4de 100644 --- a/custom/list.hash +++ b/custom/list.hash @@ -4,12 +4,8 @@ # * a line of minus signs ('-') indicates a file that we remove from Buildroot external tree # * a line of plus signs ('+') indicates a file that we add to the Buildroot external tree -++++++++++++++++++++++++++++++++ package/mesa3d/0004-Fix-uClibc-build.patch.pending -++++++++++++++++++++++++++++++++ package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch.obsolete -------------------------------- package/llvm/0001-nfc-Fix-missing-include.patch -------------------------------- package/llvm/0002-Add-missing-cstdint-header-to-Signals.h.patch --------------------------------- package/mesa3d/0004-Fix-uClibc-build.patch --------------------------------- package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch 659a58bb047b48f06331465ca6128592 linux/Config.in f9276b91b0fe5ccfad41b70d0611bdb7 linux/linux.mk c17b2548c35cffbd487ade70e272015c package/bcm2835/Config.in @@ -30,9 +26,7 @@ dfe35e9f39b004b3977968223107bd51 package/libgtk3/0001-disable-atk-bridge.patch 205dc9eb24bd5d606bc37cdd8e518b3c package/llvm/llvm.hash 8e9d594ccabd51a6863314c188bb2e3b package/llvm/llvm.mk 64b2fa393cafff6958f4bfd2b9e30f24 package/luajit/Config.in -05bbad65b2c01a63d2cd661f54962dee package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch 201ba12d953eb7111d08b3952a7b6b3c package/mesa3d/Config.in -848b4032bd832a28461e364ce5926383 package/mesa3d/mesa3d.hash 6d6f9c8f807001b9b421d1b924e8d2f3 package/mesa3d/mesa3d.mk f0dfbbe844feaf583ba0cd9432704f09 package/mosquitto/mosquitto.mk 2cd9a8d1ff6aa58b1ae2709179929998 package/mpv/mpv.mk diff --git a/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch b/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch deleted file mode 100644 index f05de4d8b5..0000000000 --- a/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch +++ /dev/null @@ -1,85 +0,0 @@ -From e3b47c1b84964c62b3e1fa782f1ffa4be0ae62f9 Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -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 -Signed-off-by: Bernd Kuhls -[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 8130c3e..6003ef2 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -1,6 +1,14 @@ - # Copyright © 2017-2019 Intel Corporation - # SPDX-License-Identifier: MIT - -+option( -+ 'gallium-vc4-neon', -+ type : 'combo', -+ value : 'auto', -+ choices : ['auto', 'disabled'], -+ description : 'enable gallium vc4 optional neon support.', -+) -+ - option( - 'platforms', - type : 'array', -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 - diff --git a/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch.patch b/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch.patch deleted file mode 100644 index 8c3cd32a2e..0000000000 --- a/custom/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch b/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch -index bb5ef00a9f..f05de4d8b5 100644 ---- a/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch -+++ b/package/mesa3d/0002-vc4-add-meson-option-to-disable-optional-neon-suppor.patch -@@ -18,13 +18,13 @@ Signed-off-by: Bernd Kuhls - 3 files changed, 11 insertions(+), 4 deletions(-) - - diff --git a/meson_options.txt b/meson_options.txt --index a39596a6f19..0f6b6c62b55 100644 -+index 8130c3e..6003ef2 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.', -- ) -+@@ -1,6 +1,14 @@ -+ # Copyright © 2017-2019 Intel Corporation -+ # SPDX-License-Identifier: MIT -+ - +option( - + 'gallium-vc4-neon', - + type : 'combo', -@@ -32,9 +32,10 @@ index a39596a6f19..0f6b6c62b55 100644 - + choices : ['auto', 'disabled'], - + description : 'enable gallium vc4 optional neon support.', - +) -++ - option( -- 'va-libs-path', -- type : 'string', -+ 'platforms', -+ type : 'array', - 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 diff --git a/custom/package/mesa3d/0004-Fix-uClibc-build.patch.pending b/custom/package/mesa3d/0004-Fix-uClibc-build.patch.pending deleted file mode 100644 index 95ca95fd67..0000000000 --- a/custom/package/mesa3d/0004-Fix-uClibc-build.patch.pending +++ /dev/null @@ -1,70 +0,0 @@ -From 09ce52fe375a6fc1ccf51b6b691aaa2c3f53fbd5 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls -Date: Fri, 3 Jun 2022 16:26:03 +0200 -Subject: [PATCH] Fix uClibc build -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes build errors with uClibc and gcc-9.3.0: - -../src/gallium/drivers/lima/lima_texture.c:47:15: error: expected - declaration specifiers or ‘...’ before ‘__builtin_offsetof’ - 47 | static_assert(offsetof(lima_tex_desc, va) == 24, - "lima_tex_desc->va offset isn't 24"); - -../src/egl/main/egldisplay.c: In function ‘_eglGetNativePlatformFromEnv’: - ../src/egl/main/egldisplay.c:101:4: error: implicit declaration of - function ‘static_assert’ [-Werror=implicit-function-declaration] 101 | - static_assert(ARRAY_SIZE(egl_platforms) == _EGL_NUM_PLATFORMS, - -../src/util/macros.h:74:4: error: implicit declaration of function - ‘static_assert’ [-Werror=implicit-function-declaration] - 74 | static_assert(cond, #cond); \ - | ^~~~~~~~~~~~~ - -Patch sent upstream: -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13898 - -Signed-off-by: Bernd Kuhls ---- - src/util/compiler.h | 10 ++++++++++ - src/util/macros.h | 1 + - 2 files changed, 11 insertions(+) - -diff --git a/src/util/compiler.h b/src/util/compiler.h -index d184ad455af..b5c56807acc 100644 ---- a/src/util/compiler.h -+++ b/src/util/compiler.h -@@ -36,6 +36,16 @@ - - #include - -+/* -+ * C11 static_assert() macro -+ * assert.h only defines that name for C11 and above -+ */ -+#if !defined(__cplusplus) -+#ifndef static_assert -+#define static_assert _Static_assert -+#endif -+#endif -+ - #include "util/macros.h" - - -diff --git a/src/util/macros.h b/src/util/macros.h -index 22b18303826..8f73ee72693 100644 ---- a/src/util/macros.h -+++ b/src/util/macros.h -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include "util/compiler.h" - - /* Compute the size of an array */ - #ifndef ARRAY_SIZE --- -2.34.1 - diff --git a/custom/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch.obsolete b/custom/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch.obsolete deleted file mode 100644 index 6831bdafd3..0000000000 --- a/custom/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch.obsolete +++ /dev/null @@ -1,46 +0,0 @@ -From cd861b7f38e448822ce765aee61304d1e0a3a8b5 Mon Sep 17 00:00:00 2001 -From: James Knight -Date: Thu, 13 Apr 2023 16:38:51 -0400 -Subject: meson: ensure i915 Gallium driver includes Intel sources - -Ensure builds flag the use of Intel sources when the i915 Gallium driver -is configured (`-Dgallium-drivers=i915`). Otherwise, a build may fail if -other Intel-based configuration options are not enabled: - - ./src/gallium/winsys/i915/drm/meson.build:21:0: ERROR: Unknown variable "libintel_common". - -Signed-off-by: James Knight -Part-of: - -Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/commit/cd861b7f38e448822ce765aee61304d1e0a3a8b5 - -Signed-off-by: Bernd Kuhls ---- - meson.build | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -(limited to 'meson.build') - -diff --git a/meson.build b/meson.build -index 23d2d965b37..a3e3c5478a8 100644 ---- a/meson.build -+++ b/meson.build -@@ -245,7 +245,14 @@ with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental') - with_any_vk = _vulkan_drivers.length() != 0 - - with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk --with_any_intel = with_intel_vk or with_intel_hasvk or with_gallium_iris or with_gallium_crocus or with_intel_tools -+with_any_intel = [ -+ with_gallium_crocus, -+ with_gallium_i915, -+ with_gallium_iris, -+ with_intel_hasvk, -+ with_intel_tools, -+ with_intel_vk, -+].contains(true) - - if with_swrast_vk and not with_gallium_softpipe - error('swrast vulkan requires gallium swrast') --- -cgit v1.2.1 - diff --git a/custom/package/mesa3d/mesa3d.hash b/custom/package/mesa3d/mesa3d.hash deleted file mode 100644 index 924be4acd4..0000000000 --- a/custom/package/mesa3d/mesa3d.hash +++ /dev/null @@ -1,5 +0,0 @@ -# From https://lists.freedesktop.org/archives/mesa-announce/2023-January/000703.html -sha256 147fa8da178bc6e2edab6e534bfedf8a99af608cce5cc9b318c06f517a021376 mesa3d-8b6b405a0131e20b1b54cc4e2246dc07d0e0b6fb-br1.tar.gz -sha512 6af340153244d3e95d0e155a45d6db134335654d62590797ae0ef6ba44c2ccfe91ebf95f70ff82c67cee108ac35536767b1f6848d6d1129f52eb9e8414ee321d mesa-22.3.4.tar.xz -# License -sha256 a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75 docs/license.rst diff --git a/custom/package/mesa3d/mesa3d.hash.patch b/custom/package/mesa3d/mesa3d.hash.patch deleted file mode 100644 index 9da10f8e85..0000000000 --- a/custom/package/mesa3d/mesa3d.hash.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash -index e4de997f0e..924be4acd4 100644 ---- a/package/mesa3d/mesa3d.hash -+++ b/package/mesa3d/mesa3d.hash -@@ -1,5 +1,5 @@ - # From https://lists.freedesktop.org/archives/mesa-announce/2023-January/000703.html --sha256 37a1ddaf03f41919ee3c89c97cff41e87de96e00e9d3247959cc8279d8294593 mesa-22.3.4.tar.xz -+sha256 147fa8da178bc6e2edab6e534bfedf8a99af608cce5cc9b318c06f517a021376 mesa3d-8b6b405a0131e20b1b54cc4e2246dc07d0e0b6fb-br1.tar.gz - sha512 6af340153244d3e95d0e155a45d6db134335654d62590797ae0ef6ba44c2ccfe91ebf95f70ff82c67cee108ac35536767b1f6848d6d1129f52eb9e8414ee321d mesa-22.3.4.tar.xz - # License - sha256 a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75 docs/license.rst diff --git a/custom/package/mesa3d/mesa3d.mk b/custom/package/mesa3d/mesa3d.mk index ffb159066c..926910d5cf 100644 --- a/custom/package/mesa3d/mesa3d.mk +++ b/custom/package/mesa3d/mesa3d.mk @@ -5,9 +5,9 @@ ################################################################################ # When updating the version, please also update mesa3d-headers -MESA3D_VERSION = 8b6b405a0131e20b1b54cc4e2246dc07d0e0b6fb -MESA3D_SITE = https://gitlab.freedesktop.org/mesa/mesa -MESA3D_SITE_METHOD = git +MESA3D_VERSION = 22.3.4 +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 diff --git a/custom/package/mesa3d/mesa3d.mk.patch b/custom/package/mesa3d/mesa3d.mk.patch index d10fd92ec3..a135037718 100644 --- a/custom/package/mesa3d/mesa3d.mk.patch +++ b/custom/package/mesa3d/mesa3d.mk.patch @@ -1,20 +1,7 @@ diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk -index 36b7151510..ffb159066c 100644 +index 36b7151510..926910d5cf 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk -@@ -5,9 +5,9 @@ - ################################################################################ - - # When updating the version, please also update mesa3d-headers --MESA3D_VERSION = 22.3.4 --MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz --MESA3D_SITE = https://archive.mesa3d.org -+MESA3D_VERSION = 8b6b405a0131e20b1b54cc4e2246dc07d0e0b6fb -+MESA3D_SITE = https://gitlab.freedesktop.org/mesa/mesa -+MESA3D_SITE_METHOD = git - MESA3D_LICENSE = MIT, SGI, Khronos - MESA3D_LICENSE_FILES = docs/license.rst - MESA3D_CPE_ID_VENDOR = mesa3d @@ -119,7 +119,10 @@ 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 diff --git a/package/mesa3d-headers-rpi5/Config.in b/package/mesa3d-headers-rpi5/Config.in new file mode 100644 index 0000000000..aa2ea2156f --- /dev/null +++ b/package/mesa3d-headers-rpi5/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MESA3D_HEADERS_RPI5 + bool + help + Mesa 3D, an open-source implementation of the OpenGL + specification. + + This package only installs headers needed by other packages. + + http://mesa3d.org diff --git a/package/mesa3d-headers-rpi5/dri.pc b/package/mesa3d-headers-rpi5/dri.pc new file mode 100644 index 0000000000..bd9a33b6c6 --- /dev/null +++ b/package/mesa3d-headers-rpi5/dri.pc @@ -0,0 +1,10 @@ +prefix=/usr +libdir=${prefix}/lib +includedir=${prefix}/include + +dridriverdir=/usr/lib/dri + +Name: dri +Description: Direct Rendering Infrastructure +Version: @VERSION@ +Cflags: -I${includedir} diff --git a/package/mesa3d-headers-rpi5/mesa3d-headers-rpi5.mk b/package/mesa3d-headers-rpi5/mesa3d-headers-rpi5.mk new file mode 100644 index 0000000000..95882c8f02 --- /dev/null +++ b/package/mesa3d-headers-rpi5/mesa3d-headers-rpi5.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# mesa3d-headers +# +################################################################################ + +# mesa3d-headers is inherently incompatible with mesa3d, so error out +# if both are enabled. +ifeq ($(BR_BUILDING)$(BR2_PACKAGE_MESA3D_RPI5)$(BR2_PACKAGE_MESA3D_HEADERS_RPI5),yyy) +$(error mesa3d-headers-rpi5 enabled, but mesa3d-rpi5 enabled too) +endif + +# Not possible to directly refer to mesa3d variables, because of +# first/second expansion trickery... +MESA3D_HEADERS_RPI5_VERSION = f59665bb62b579c6cc26155a26ce557f9f3357d2 +MESA3D_HEADERS_RPI5_SITE = https://gitlab.freedesktop.org/mesa/mesa.git +MESA3D_HEADERS_RPI5_SITE_METHOD = git +MESA3D_HEADERS_RPI5_DL_SUBDIR = mesa3d +MESA3D_HEADERS_RPI5_LICENSE = MIT, SGI, Khronos +MESA3D_HEADERS_RPI5_LICENSE_FILES = docs/license.rst +MESA3D_HEADERS_RPI5_CPE_ID_VENDOR = mesa3d +MESA3D_HEADERS_RPI5_CPE_ID_PRODUCT = mesa + +# Only installs header files +MESA3D_HEADERS_RPI5_INSTALL_STAGING = YES +MESA3D_HEADERS_RPI5_INSTALL_TARGET = NO + +MESA3D_HEADERS_RPI5_DIRS = KHR + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) + +MESA3D_HEADERS_RPI5_DIRS += GL + +ifeq ($(BR2_PACKAGE_XORG7),y) + +# Not using $(SED) because we do not want to work in-place, and $(SED) +# contains -i. +define MESA3D_HEADERS_RPI5_BUILD_DRI_PC + sed -e 's:@VERSION@:$(MESA3D_HEADERS_RPI5_VERSION):' \ + $(MESA3D_HEADERS_RPI5_PKGDIR)/dri.pc \ + >$(@D)/src/gallium/frontends/dri/dri.pc +endef + +define MESA3D_HEADERS_RPI5_INSTALL_DRI_PC + $(INSTALL) -D -m 0644 $(@D)/include/GL/internal/dri_interface.h \ + $(STAGING_DIR)/usr/include/GL/internal/dri_interface.h + $(INSTALL) -D -m 0644 $(@D)/src/gallium/frontends/dri/dri.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/dri.pc +endef + +endif # Xorg + +endif # OpenGL + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +MESA3D_HEADERS_RPI5_DIRS += EGL +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +MESA3D_HEADERS_RPI5_DIRS += GLES GLES2 +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBOPENCL),y) +MESA3D_HEADERS_RPI5_DIRS += CL +endif + +define MESA3D_HEADERS_RPI5_BUILD_CMDS + $(MESA3D_HEADERS_RPI5_BUILD_DRI_PC) +endef + +define MESA3D_HEADERS_RPI5_INSTALL_STAGING_CMDS + $(foreach d,$(MESA3D_HEADERS_RPI5_DIRS),\ + cp -dpfr $(@D)/include/$(d) $(STAGING_DIR)/usr/include/ || exit 1$(sep)) + $(MESA3D_HEADERS_RPI5_INSTALL_DRI_PC) +endef + +$(eval $(generic-package)) diff --git a/package/mesa3d-rpi5/0001-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch b/package/mesa3d-rpi5/0001-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch new file mode 100644 index 0000000000..e3c70c3f24 --- /dev/null +++ b/package/mesa3d-rpi5/0001-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch @@ -0,0 +1,41 @@ +From 7b46756a99aca7f27a45c3b99460f088570f6f53 Mon Sep 17 00:00:00 2001 +From: Romain Naour +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 +Signed-off-by: Bernd Kuhls +[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 + diff --git a/package/mesa3d-rpi5/0003-src-util-rand_xor-Include-stddef.h-to-fix-build-erro.patch b/package/mesa3d-rpi5/0003-src-util-rand_xor-Include-stddef.h-to-fix-build-erro.patch new file mode 100644 index 0000000000..538aa74e0c --- /dev/null +++ b/package/mesa3d-rpi5/0003-src-util-rand_xor-Include-stddef.h-to-fix-build-erro.patch @@ -0,0 +1,40 @@ +From fdc8b5a205e2116408aeb9fd305e57f656e2e89d Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +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 +--- + 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 + #if defined(HAVE_GETRANDOM) + #include + #endif +-- +2.27.0 + diff --git a/package/mesa3d-rpi5/Config.in b/package/mesa3d-rpi5/Config.in new file mode 100644 index 0000000000..038693d083 --- /dev/null +++ b/package/mesa3d-rpi5/Config.in @@ -0,0 +1,397 @@ +menuconfig BR2_PACKAGE_MESA3D_RPI5 + bool "mesa3d-rpi5" + 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_TOOLCHAIN_GCC_AT_LEAST_8 + 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_RPI5 + +# Some Gallium driver needs libelf when built with LLVM support +config BR2_PACKAGE_MESA3D_RPI5_NEEDS_ELFUTILS + bool + +config BR2_PACKAGE_MESA3D_RPI5_LLVM + bool "llvm support" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + 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 + depends on BR2_HOST_GCC_AT_LEAST_5 # host-llvm + select BR2_PACKAGE_LLVM + +comment "llvm support needs a toolchain w/ wchar, threads, C++, dynamic library, host gcc >= 5" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \ + || BR2_STATIC_LIBS || !BR2_USE_WCHAR \ + || !BR2_HOST_GCC_AT_LEAST_5 + +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_RPI5_LLVM +config BR2_PACKAGE_MESA3D_RPI5_OPENCL + bool "OpenCL support" + depends on BR2_PACKAGE_MESA3D_RPI5_LLVM + depends on BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R600 || \ + BR2_PACKAGE_MESA3D_RPI5_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, dri3 or vulkan driver selection +config BR2_PACKAGE_MESA3D_RPI5_DRI3 + bool + select BR2_PACKAGE_XLIB_LIBXSHMFENCE + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + bool + select BR2_PACKAGE_MESA3D_RPI5_DRIVER + +config BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER + bool + select BR2_PACKAGE_MESA3D_RPI5_DRIVER + +config BR2_PACKAGE_MESA3D_RPI5_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_RPI5_NEEDS_XA + bool + +# OpenGL GLX and Gallium VDPAU both needs X11 +config BR2_PACKAGE_MESA3D_RPI5_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_RPI5_GALLIUM_DRIVER_CROCUS + bool "Gallium crocus driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + help + Mesa driver for gen4-7 Intel GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_ETNAVIV + bool "Gallium Etnaviv driver" + depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_ETNAVIV + help + Mesa driver for Vivante GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_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_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_FREEDRENO + help + Mesa driver for Freedreno GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_I915 + bool "Gallium i915 driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_INTEL + help + Support for i915-based Intel GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_IRIS + bool "Gallium iris driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + help + Mesa driver for iris-based Intel GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_LIMA + bool "Gallium lima driver" + depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + help + Mesa driver for ARM Mali Utgard GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_NOUVEAU + bool "Gallium nouveau driver" + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_NOUVEAU + select BR2_PACKAGE_MESA3D_RPI5_NEEDS_XA + select BR2_PACKAGE_LLVM_RTTI if BR2_PACKAGE_MESA3D_RPI5_LLVM + help + Supports all Nvidia GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_PANFROST + bool "Gallium panfrost driver" + depends on (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) || !BR2_PACKAGE_XORG7 # libxshmfence + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + help + Mesa driver for ARM Mali Midgard and Bifrost GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_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_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + help + Driver for ATI/AMD Radeon R300/R400/R500 GPUs. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R600 + bool "Gallium Radeon R600 driver" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_MESA3D_RPI5_LLVM || \ + (BR2_PACKAGE_MESA3D_RPI5_LLVM && (BR2_TOOLCHAIN_USES_UCLIBC || \ + BR2_TOOLCHAIN_USES_GLIBC)) # elfutils + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_RPI5_LLVM + select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_RPI5_LLVM + select BR2_PACKAGE_MESA3D_RPI5_NEEDS_ELFUTILS if BR2_PACKAGE_MESA3D_RPI5_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_RPI5_LLVM + depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +config BR2_PACKAGE_MESA3D_RPI5_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_RPI5_LLVM + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + select BR2_PACKAGE_MESA3D_RPI5_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_RPI5_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_RPI5_LLVM + depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_SVGA + bool "Gallium vmware svga driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_VMWGFX + select BR2_PACKAGE_MESA3D_RPI5_NEEDS_XA + help + This is a virtual GPU driver for VMWare virtual machines. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_SWRAST + bool "Gallium swrast driver" + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + help + This is a software opengl implementation using the Gallium3D + infrastructure. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_TEGRA + bool "Gallium tegra driver" + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_NOUVEAU + select BR2_PACKAGE_LIBDRM_NOUVEAU + select BR2_PACKAGE_MESA3D_RPI5_NEEDS_XA + help + Adds support for Nvidia Tegra GPUs, requires nouveau. + +config BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_V3D + bool "Gallium v3d driver" + depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_VC4 # runtime + select BR2_PACKAGE_MESA3D_RPI5_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_RPI5_GALLIUM_DRIVER_VC4 + bool "Gallium vc4 driver" + depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_VC4 + select BR2_PACKAGE_MESA3D_RPI5_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_RPI5_GALLIUM_DRIVER_VIRGL + bool "Gallium virgl driver" + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL + help + virgl is the 3D acceleration backend for the virtio-gpu + shipping with qemu. + +config BR2_PACKAGE_MESA3D_RPI5_VDPAU + bool "Gallium VDPAU state tracker" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_NOUVEAU \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R300 \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R600 \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_RADEONSI + select BR2_PACKAGE_MESA3D_RPI5_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_RPI5_GALLIUM_DRIVER_NOUVEAU \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R300 \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R600 \ + || BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_RADEONSI) + +comment "Vulkan drivers" + +config BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER_INTEL + bool "Vulkan Intel driver" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h + depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert + select BR2_PACKAGE_MESA3D_RPI5_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER + help + Vulkan driver for Intel hardware from Ivy Bridge onward. + +comment "intel vulkan needs a glibc toolchain w/ headers >= 3.17" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \ + !BR2_TOOLCHAIN_USES_GLIBC + +comment "Off-screen Rendering" + +config BR2_PACKAGE_MESA3D_RPI5_OSMESA_GALLIUM + bool "OSMesa (Gallium) library" + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_SWRAST + help + The OSMesa API provides functions for off-screen rendering. + +if BR2_PACKAGE_MESA3D_RPI5_DRIVER + +comment "OpenGL API Support" + +config BR2_PACKAGE_MESA3D_RPI5_GBM + bool "gbm" + depends on BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER && \ + BR2_PACKAGE_MESA3D_RPI5_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 gallium driver w/ EGL support." + depends on !(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL) + +config BR2_PACKAGE_MESA3D_RPI5_OPENGL_GLX + bool "OpenGL GLX" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_HAS_LIBGL if !BR2_PACKAGE_LIBGLVND + select BR2_PACKAGE_LIBGLVND_DISPATCH_GL if BR2_PACKAGE_LIBGLVND + select BR2_PACKAGE_MESA3D_RPI5_NEEDS_X11 + help + Enable GLX graphic acceleration (OpenGL + X11). + +comment "OpenGL GLX support needs X11" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL + bool "OpenGL EGL" + depends on BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER + select BR2_PACKAGE_HAS_LIBEGL if !BR2_PACKAGE_LIBGLVND + select BR2_PACKAGE_LIBGLVND_DISPATCH_EGL if BR2_PACKAGE_LIBGLVND + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_MESA3D_RPI5_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_RPI5_OPENGL_ES + bool "OpenGL ES" + select BR2_PACKAGE_HAS_LIBGLES if !BR2_PACKAGE_LIBGLVND + select BR2_PACKAGE_LIBGLVND_DISPATCH_GLES if BR2_PACKAGE_LIBGLVND + 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_RPI5_DRIVER + +config BR2_PACKAGE_PROVIDES_LIBGBM + default "mesa3d-rpi5" if BR2_PACKAGE_MESA3D_RPI5_GBM + +config BR2_PACKAGE_PROVIDES_LIBGL + default "mesa3d-rpi5" if BR2_PACKAGE_MESA3D_RPI5_OPENGL_GLX && !BR2_PACKAGE_LIBGLVND + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "mesa3d-rpi5" if BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL && !BR2_PACKAGE_LIBGLVND + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "mesa3d-rpi5" if BR2_PACKAGE_MESA3D_RPI5_OPENGL_ES && !BR2_PACKAGE_LIBGLVND + +config BR2_PACKAGE_PROVIDES_LIBOPENCL + default "mesa3d-rpi5" if BR2_PACKAGE_MESA3D_RPI5_OPENCL + +endif # BR2_PACKAGE_MESA3D_RPI5 + +comment "mesa3d needs a toolchain w/ gcc >=8, C++, NPTL, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_TOOLCHAIN_HAS_SYNC_1 diff --git a/package/mesa3d-rpi5/mesa3d-rpi5.mk b/package/mesa3d-rpi5/mesa3d-rpi5.mk new file mode 100644 index 0000000000..3d5209c1a6 --- /dev/null +++ b/package/mesa3d-rpi5/mesa3d-rpi5.mk @@ -0,0 +1,267 @@ +################################################################################ +# +# mesa3d-rpi5 +# +################################################################################ + +# When updating the version, please also update mesa3d-headers +MESA3D_RPI5_VERSION = f59665bb62b579c6cc26155a26ce557f9f3357d2 +MESA3D_RPI5_SITE = https://gitlab.freedesktop.org/mesa/mesa.git +MESA3D_RPI5_SITE_METHOD = git +MESA3D_RPI5_LICENSE = MIT, SGI, Khronos +MESA3D_RPI5_LICENSE_FILES = docs/license.rst +MESA3D_RPI5_CPE_ID_VENDOR = mesa3d +MESA3D_RPI5_CPE_ID_PRODUCT = mesa + +MESA3D_RPI5_INSTALL_STAGING = YES + +MESA3D_RPI5_PROVIDES = + +MESA3D_RPI5_DEPENDENCIES = \ + host-bison \ + host-flex \ + host-python-mako \ + expat \ + libdrm \ + zlib + +MESA3D_RPI5_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_RPI5_CONF_OPTS += -Db_asneeded=false +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_DRI3),y) +MESA3D_RPI5_CONF_OPTS += -Ddri3=enabled +ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) +MESA3D_RPI5_DEPENDENCIES += xlib_libxshmfence +endif +else +MESA3D_RPI5_CONF_OPTS += -Ddri3=disabled +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_LLVM),y) +MESA3D_RPI5_DEPENDENCIES += host-llvm llvm +MESA3D_RPI5_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config' +MESA3D_RPI5_CONF_OPTS += -Dllvm=enabled +ifeq ($(BR2_PACKAGE_LLVM_RTTI),y) +MESA3D_RPI5_CONF_OPTS += -Dcpp_rtti=true +else +MESA3D_RPI5_CONF_OPTS += -Dcpp_rtti=false +endif +else +# Avoid automatic search of llvm-config +MESA3D_RPI5_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_RPI5_OPENCL),y) +MESA3D_RPI5_PROVIDES += libopencl +MESA3D_RPI5_DEPENDENCIES += clang libclc +MESA3D_RPI5_CONF_OPTS += -Dgallium-opencl=standalone +else +MESA3D_RPI5_CONF_OPTS += -Dgallium-opencl=disabled +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_NEEDS_ELFUTILS),y) +MESA3D_RPI5_DEPENDENCIES += elfutils +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_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 +# Always enable glx-direct; without it, many GLX applications don't work. +MESA3D_RPI5_CONF_OPTS += \ + -Dglx=dri \ + -Dglx-direct=true +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_NEEDS_XA),y) +MESA3D_RPI5_CONF_OPTS += -Dgallium-xa=enabled +else +MESA3D_RPI5_CONF_OPTS += -Dgallium-xa=disabled +endif +else +MESA3D_RPI5_CONF_OPTS += \ + -Dglx=disabled \ + -Dgallium-xa=disabled +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +MESA3D_RPI5_CONF_OPTS += -Dgallium-vc4-neon=auto +endif + +# Drivers + +#Gallium Drivers +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_CROCUS) += crocus +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_ETNAVIV) += etnaviv +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_FREEDRENO) += freedreno +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_I915) += i915 +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_IRIS) += iris +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_LIMA) += lima +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_NOUVEAU) += nouveau +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_PANFROST) += panfrost +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R300) += r300 +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_R600) += r600 +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_RADEONSI) += radeonsi +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_SVGA) += svga +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_SWRAST) += swrast +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_TEGRA) += tegra +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_V3D) += v3d +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_VC4) += vc4 +MESA3D_RPI5_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_VIRGL) += virgl +# Vulkan Drivers +MESA3D_RPI5_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER_INTEL) += intel +MESA3D_RPI5_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM) += broadcom + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER),) +MESA3D_RPI5_CONF_OPTS += \ + -Dgallium-drivers= \ + -Dgallium-extra-hud=false +else +MESA3D_RPI5_CONF_OPTS += \ + -Dshared-glapi=enabled \ + -Dgallium-drivers=$(subst $(space),$(comma),$(MESA3D_RPI5_GALLIUM_DRIVERS-y)) \ + -Dgallium-extra-hud=true +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER),) +MESA3D_RPI5_CONF_OPTS += \ + -Dvulkan-drivers= +else +MESA3D_RPI5_DEPENDENCIES += host-python-glslang +MESA3D_RPI5_CONF_OPTS += \ + -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_RPI5_VULKAN_DRIVERS-y)) +endif + +# APIs + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_OSMESA_GALLIUM),y) +MESA3D_RPI5_CONF_OPTS += -Dosmesa=true +else +MESA3D_RPI5_CONF_OPTS += -Dosmesa=false +endif + +# Always enable OpenGL: +# - Building OpenGL ES without OpenGL is not supported, so always keep opengl enabled. +MESA3D_RPI5_CONF_OPTS += -Dopengl=true + +# libva and mesa3d have a circular dependency +# we do not need libva support in mesa3d, therefore disable this option +MESA3D_RPI5_CONF_OPTS += -Dgallium-va=disabled + +# libGL is only provided for a full xorg stack, without libglvnd +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_OPENGL_GLX),y) +MESA3D_RPI5_PROVIDES += $(if $(BR2_PACKAGE_LIBGLVND),,libgl) +else +define MESA3D_RPI5_REMOVE_OPENGL_HEADERS + rm -rf $(STAGING_DIR)/usr/include/GL/ +endef + +MESA3D_RPI5_POST_INSTALL_STAGING_HOOKS += MESA3D_RPI5_REMOVE_OPENGL_HEADERS +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_NEEDS_X11),y) +MESA3D_RPI5_DEPENDENCIES += \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXdamage \ + xlib_libXfixes \ + xlib_libXrandr \ + xlib_libXxf86vm \ + xorgproto \ + libxcb +MESA3D_RPI5_PLATFORMS += x11 +endif +ifeq ($(BR2_PACKAGE_WAYLAND),y) +MESA3D_RPI5_DEPENDENCIES += wayland wayland-protocols +MESA3D_RPI5_PLATFORMS += wayland +endif + +MESA3D_RPI5_CONF_OPTS += \ + -Dplatforms=$(subst $(space),$(comma),$(MESA3D_RPI5_PLATFORMS)) + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_GBM),y) +MESA3D_RPI5_CONF_OPTS += \ + -Dgbm=enabled +else +MESA3D_RPI5_CONF_OPTS += \ + -Dgbm=disabled +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL),y) +MESA3D_RPI5_PROVIDES += $(if $(BR2_PACKAGE_LIBGLVND),,libegl) +MESA3D_RPI5_CONF_OPTS += \ + -Degl=enabled +else +MESA3D_RPI5_CONF_OPTS += \ + -Degl=disabled +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_OPENGL_ES),y) +MESA3D_RPI5_PROVIDES += $(if $(BR2_PACKAGE_LIBGLVND),,libgles) +MESA3D_RPI5_CONF_OPTS += -Dgles1=enabled -Dgles2=enabled +else +MESA3D_RPI5_CONF_OPTS += -Dgles1=disabled -Dgles2=disabled +endif + +ifeq ($(BR2_PACKAGE_VALGRIND),y) +MESA3D_RPI5_CONF_OPTS += -Dvalgrind=enabled +MESA3D_RPI5_DEPENDENCIES += valgrind +else +MESA3D_RPI5_CONF_OPTS += -Dvalgrind=disabled +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +MESA3D_RPI5_CONF_OPTS += -Dlibunwind=enabled +MESA3D_RPI5_DEPENDENCIES += libunwind +else +MESA3D_RPI5_CONF_OPTS += -Dlibunwind=disabled +endif + +ifeq ($(BR2_PACKAGE_MESA3D_RPI5_VDPAU),y) +MESA3D_RPI5_DEPENDENCIES += libvdpau +MESA3D_RPI5_CONF_OPTS += -Dgallium-vdpau=enabled +else +MESA3D_RPI5_CONF_OPTS += -Dgallium-vdpau=disabled +endif + +ifeq ($(BR2_PACKAGE_LM_SENSORS),y) +MESA3D_RPI5_CONF_OPTS += -Dlmsensors=enabled +MESA3D_RPI5_DEPENDENCIES += lm-sensors +else +MESA3D_RPI5_CONF_OPTS += -Dlmsensors=disabled +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +MESA3D_RPI5_CONF_OPTS += -Dzstd=enabled +MESA3D_RPI5_DEPENDENCIES += zstd +else +MESA3D_RPI5_CONF_OPTS += -Dzstd=disabled +endif + +MESA3D_RPI5_CFLAGS = $(TARGET_CFLAGS) + +# m68k needs 32-bit offsets in switch tables to build +ifeq ($(BR2_m68k),y) +MESA3D_RPI5_CFLAGS += -mlong-jump-table-offsets +endif + +ifeq ($(BR2_PACKAGE_LIBGLVND),y) +ifneq ($(BR2_PACKAGE_MESA3D_RPI5_OPENGL_GLX)$(BR2_PACKAGE_MESA3D_RPI5_OPENGL_EGL),) +MESA3D_RPI5_DEPENDENCIES += libglvnd +MESA3D_RPI5_CONF_OPTS += -Dglvnd=true +else +MESA3D_RPI5_CONF_OPTS += -Dglvnd=false +endif +else +MESA3D_RPI5_CONF_OPTS += -Dglvnd=false +endif + +$(eval $(meson-package)) diff --git a/package/recalbox-system/Config.in b/package/recalbox-system/Config.in index 2b284ebec0..2fec170f22 100644 --- a/package/recalbox-system/Config.in +++ b/package/recalbox-system/Config.in @@ -86,11 +86,11 @@ config BR2_PACKAGE_RECALBOX_TARGET_RPI5_64 bool "rpi5_64" select BR2_PACKAGE_RPI_FIRMWARE select BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 - select BR2_PACKAGE_MESA3D - select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO - select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D - select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 - select BR2_PACKAGE_MESA3D_OPENGL_ES + select BR2_PACKAGE_MESA3D_RPI5 + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_KMSRO + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_V3D + select BR2_PACKAGE_MESA3D_RPI5_GALLIUM_DRIVER_VC4 + select BR2_PACKAGE_MESA3D_RPI5_OPENGL_ES select BR2_PACKAGE_SDL2_KMSDRM select BR2_PACKAGE_RECALBOX_CRT select BR2_PACKAGE_EEPROMUTILS @@ -153,7 +153,8 @@ config BR2_PACKAGE_RECALBOX_HAS_VULKAN BR2_PACKAGE_RECALBOX_TARGET_RPI4_64 ||\ BR2_PACKAGE_RECALBOX_TARGET_X86_64 select BR2_PACKAGE_VULKAN_LOADER - select BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM if BR2_PACKAGE_RECALBOX_TARGET_RPI4_64 || BR2_PACKAGE_RECALBOX_TARGET_RPI5_64 + select BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM if BR2_PACKAGE_RECALBOX_TARGET_RPI4_64 + select BR2_PACKAGE_MESA3D_RPI5_VULKAN_DRIVER_BROADCOM if BR2_PACKAGE_RECALBOX_TARGET_RPI5_64 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL if BR2_PACKAGE_RECALBOX_TARGET_X86_64 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER_HASWELL if BR2_PACKAGE_RECALBOX_TARGET_X86_64 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER_AMD if BR2_PACKAGE_RECALBOX_TARGET_X86_64 -- GitLab From aa8e90d718164eaf8367b0b6446aebbc9f0c41f0 Mon Sep 17 00:00:00 2001 From: digitalLumberjack Date: Mon, 27 Nov 2023 22:29:09 +0100 Subject: [PATCH 2/2] fix(ci): fix build on branches --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ec791433d..87a481ee60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,7 +201,7 @@ tests nvidia: - docker build -t "recalbox-${ARCH}" . - WORKDIR="$(pwd)" CCACHE="true" OUTPUTDIR="$(pwd)/output" - mkdir -p ${OUTPUTDIR} - - docker run --rm --tmpfs /tmp:exec --security-opt seccomp=unconfined -v "${WORKDIR}:/work" -v "${OUTPUTDIR}:/work/output" -v "/recalbox-builds/dl:/share/dl" -v "/recalbox-builds/ccaches/ccache-${ARCH}:/share/ccache" -e "ARCH=${ARCH}" -e "GITLAB_TOKEN=${GITLAB_TOKEN}" -e "GITLAB_TOKEN_BEEBEM=${GITLAB_TOKEN_BEEBEM}" -e "GITLAB_TOKEN_THEMES=${GITLAB_TOKEN_THEMES}" -e "RECALBOX_VERSION=${RECALBOX_VERSION}" -e "RECALBOX_CCACHE_ENABLED=${CCACHE}" "recalbox-${ARCH}" 2>&1 | tee build.log | grep '>>>' || tac build.log | grep '>>>' -m 1 -B 9999 | tac + - docker run --rm --tmpfs /tmp:exec --security-opt seccomp=unconfined -v "${WORKDIR}:/work" -v "${OUTPUTDIR}:/work/output" -v "/recalbox-builds/dl:/share/dl" -v "/recalbox-builds/ccaches/ccache-${ARCH}:/share/ccache" -e "ARCH=${ARCH}" -e "GITLAB_TOKEN_BEEBEM=${GITLAB_TOKEN_BEEBEM}" -e "GITLAB_TOKEN_THEMES=${GITLAB_TOKEN_THEMES}" -e "RECALBOX_VERSION=${RECALBOX_VERSION}" -e "RECALBOX_CCACHE_ENABLED=${CCACHE}" "recalbox-${ARCH}" 2>&1 | tee build.log | grep '>>>' || tac build.log | grep '>>>' -m 1 -B 9999 | tac - echo $? # Dist - export DIST_DIR="dist/${ARCH}" -- GitLab