Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,112 @@
From 5b45f98255b74589015d5cb0d8ca31d7169c9f34 Mon Sep 17 00:00:00 2001
From: Julien Olivain <ju.o@free.fr>
Date: Fri, 16 Sep 2022 22:30:59 +0200
Subject: [PATCH] demos: makes opengl an optional component
This patch is a port of [1] for the new meson build system.
matrix-code from es2gears has been moved to util in version 9.0.0 [2]
so now es2gears is linked with mesa3d-demo libutil (idep_util).
But at the same time the dependency on glu (dep_glu) has been added
to libutil [3]. dep_glu requires opengl (FULL_GL) to build.
In order to keep the es2gears for egl only builds we have to
split the libutil files list to build readtex.c and showbuffer.c
only if opengl is available.
Add back dep_glu since it's used in util's meson.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4936948236
https://gitlab.com/buildroot.org/buildroot/-/jobs/4936948042
[1].
https://git.busybox.net/buildroot/tree/package/mesa3d-demos/0001-demos-makes-opengl-an-optional-component.patch?h=2022.08
[2] https://gitlab.freedesktop.org/mesa/demos/-/commit/c33e2f731c2eab86bbad7b6a028f8a90ea40a00c
[3] https://gitlab.freedesktop.org/mesa/demos/-/commit/ef24aae22978d4d357340074ca9a1c04d9cf81e6
Signed-off-by: Julien Olivain <ju.o@free.fr>
[Bernd: rebased for version 9.0.0]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Romain: fix egl only builds in util]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
meson.build | 5 ++++-
meson_options.txt | 1 +
src/egl/meson.build | 5 ++++-
src/util/meson.build | 12 +++++++++---
4 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index 3e39b5a2..f27e1a18 100644
--- a/meson.build
+++ b/meson.build
@@ -39,7 +39,10 @@ add_project_arguments(
dep_m = cc.find_library('m', required : false)
dep_winmm = cc.find_library('winmm', required : false)
-dep_gl = dependency('gl')
+dep_gl = dependency('gl', required : get_option('gl'))
+if not dep_gl.found()
+ add_project_arguments('-DEGL_NO_X11=1', language: 'c')
+endif
dep_epoll = dependency('epoll-shim', required : false)
dep_gles1 = dependency('glesv1_cm', required : get_option('gles1'))
diff --git a/meson_options.txt b/meson_options.txt
index 832b916a..c954a710 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,6 @@
option('with-glut', type : 'string')
option('egl', type : 'feature')
+option('gl', type : 'feature')
option('gles1', type : 'feature')
option('gles2', type : 'feature')
option('glut', type : 'feature')
diff --git a/src/egl/meson.build b/src/egl/meson.build
index d1846921..42bf8ecd 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -19,7 +19,10 @@
# SOFTWARE.
subdir('eglut')
-subdir('opengl')
+
+if dep_gl.found()
+ subdir('opengl')
+endif
if dep_gles1.found()
subdir('opengles1')
diff --git a/src/util/meson.build b/src/util/meson.build
index b4fe614f..4420f28a 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -22,13 +22,19 @@ inc_util = include_directories('.')
files_libutil = files(
'glinfo_common.c',
- 'readtex.c',
- 'showbuffer.c',
'trackball.c',
'matrix.c',
)
-_deps = [dep_glu, dep_m]
+_deps = [dep_m]
+if dep_gl.found()
+ files_libutil += files(
+ 'readtex.c',
+ 'showbuffer.c',
+ )
+ _deps += dep_glu
+endif
+
if dep_glut.found()
files_libutil += files('shaderutil.c')
_deps += dep_glut
--
2.41.0

View File

@@ -0,0 +1,47 @@
From e16117fc92688d76a042ad2c590c77d5a987a4ac Mon Sep 17 00:00:00 2001
From: Erik Faye-Lund <erik.faye-lund@collabora.com>
Date: Fri, 24 Mar 2023 13:31:58 +0100
Subject: [PATCH] meson: fix glx-detection without glvnd
When build without GLVND, Mesa provides GLX as a part of libGL, just
like XQuartz does on MacOS. There's nothing really macOS specific about
this fallback, so let's drop the condition.
And just for good measure, let's add in dep_gl as a dependency for
the header-check here, in case some one decides to install libGL outside
of the default include directory.
Fixes: 34300551 ("meson: explicitly check for glx dependency")
Closes: https://gitlab.freedesktop.org/mesa/demos/-/issues/36
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Upstream: https://gitlab.freedesktop.org/mesa/demos/-/commit/e16117fc92688d76a042ad2c590c77d5a987a4ac
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
meson.build | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index c1853f94..bc3278e1 100644
--- a/meson.build
+++ b/meson.build
@@ -99,10 +99,11 @@ if not dep_glu.found() and host_machine.system() != 'darwin'
endif
dep_glx = dependency('glx', required: false, disabler : true)
-if not dep_glx.found() and host_machine.system() == 'darwin'
- # xquartz doesn't have a glx.pc, but it does have the header. And all the
- # symbols reside in libGL, so let's just use that.
- if cc.check_header('GL/glx.h', dependencies: dep_x11)
+if not dep_glx.found()
+ # Both Mesa build without GLVND and XQuartz lacks a glx.pc, but does
+ # provide the header. And all the symbols reside in libGL, so let's
+ # just use that.
+ if cc.check_header('GL/glx.h', dependencies: [dep_x11, dep_gl])
dep_glx = dep_gl
endif
endif
--
GitLab

View File

@@ -0,0 +1,68 @@
From 3f4d5ff34e061f3d47b9cf28bff2fc588d8c5326 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Thu, 23 Mar 2023 21:18:56 +0000
Subject: [PATCH] vulkan/wsi: use unsigned instead of uint
uint is not a standard type name and fails to build against musl libc
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Upstream: https://gitlab.freedesktop.org/mesa/demos/-/commit/3f4d5ff34e061f3d47b9cf28bff2fc588d8c5326
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
src/vulkan/wsi/wayland.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/vulkan/wsi/wayland.c b/src/vulkan/wsi/wayland.c
index 444d2bb81..5958d283a 100644
--- a/src/vulkan/wsi/wayland.c
+++ b/src/vulkan/wsi/wayland.c
@@ -128,7 +128,7 @@ dispatch_key(xkb_keycode_t xkb_key, enum wl_keyboard_key_state state)
}
static void
-handle_key(uint key, enum wl_keyboard_key_state state)
+handle_key(unsigned key, enum wl_keyboard_key_state state)
{
xkb_keycode_t xkb_key = key + 8;
struct itimerspec timer = {0};
@@ -151,15 +151,15 @@ handle_key(uint key, enum wl_keyboard_key_state state)
}
static void
-key(void *data, struct wl_keyboard *keyboard, uint serial,
- uint time, uint key, enum wl_keyboard_key_state state)
+key(void *data, struct wl_keyboard *keyboard, unsigned serial,
+ unsigned time, unsigned key, enum wl_keyboard_key_state state)
{
handle_key(key, state);
}
static void
-modifiers(void *data, struct wl_keyboard *keyboard, uint serial,
- uint mods_depressed, uint mods_latched, uint mods_locked, uint group)
+modifiers(void *data, struct wl_keyboard *keyboard, unsigned serial,
+ unsigned mods_depressed, unsigned mods_latched, unsigned mods_locked, unsigned group)
{
xkb_state_update_mask(keyboard_data.xkb_state, mods_depressed, mods_latched,
mods_locked, 0, 0, group);
@@ -184,7 +184,7 @@ keymap(void *data, struct wl_keyboard *keyboard,
}
static void
-enter(void *data, struct wl_keyboard *keyboard, uint serial,
+enter(void *data, struct wl_keyboard *keyboard, unsigned serial,
struct wl_surface *surface, struct wl_array *keys)
{
uint32_t *key;
@@ -194,7 +194,7 @@ enter(void *data, struct wl_keyboard *keyboard, uint serial,
}
static void
-leave(void *data, struct wl_keyboard *keyboard, uint serial,
+leave(void *data, struct wl_keyboard *keyboard, unsigned serial,
struct wl_surface *surface)
{
struct itimerspec timer = {0};
--
GitLab

View File

@@ -0,0 +1,19 @@
config BR2_PACKAGE_MESA3D_DEMOS
bool "mesa3d-demos"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES \
|| BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBOPENVG
select BR2_PACKAGE_LIBGLEW if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND
help
OpenGL demos from the Mesa 3D project.
http://mesa3d.org
comment "mesa3d-demos needs a toolchain with C++"
depends on !BR2_INSTALL_LIBSTDCPP
depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES \
|| BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBOPENVG

View File

@@ -0,0 +1,3 @@
# From https://lists.freedesktop.org/archives/mesa-announce/2023-March/000711.html
sha256 3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b mesa-demos-9.0.0.tar.xz
sha512 af33ef72a521416e39d93370b2b4ccb768f08084c9e4c0aa62868210d9465c858e5cb8e5d23952295a3073946f609eb8723ee60b39dd9fb6696c4e45aafbb2c1 mesa-demos-9.0.0.tar.xz

View File

@@ -0,0 +1,72 @@
################################################################################
#
# mesa3d-demos
#
################################################################################
MESA3D_DEMOS_VERSION = 9.0.0
MESA3D_DEMOS_SOURCE = mesa-demos-$(MESA3D_DEMOS_VERSION).tar.xz
MESA3D_DEMOS_SITE = https://archive.mesa3d.org/demos
MESA3D_DEMOS_DEPENDENCIES = host-pkgconf
MESA3D_DEMOS_LICENSE = MIT
MESA3D_DEMOS_CONF_OPTS += \
-Dgles1=disabled \
-Dosmesa=disabled # BR2_PACKAGE_MESA3D_OSMESA_GALLIUM removed in mesa 25.1
ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_HAS_LIBGL),yy)
MESA3D_DEMOS_DEPENDENCIES += libgl libglew libglu xlib_libX11 xlib_libXext
MESA3D_DEMOS_CONF_OPTS += -Dgl=enabled -Dx11=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Dgl=disabled -Dx11=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
MESA3D_DEMOS_DEPENDENCIES += libegl
MESA3D_DEMOS_CONF_OPTS += -Degl=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Degl=disabled
endif
ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
MESA3D_DEMOS_DEPENDENCIES += libgles
MESA3D_DEMOS_CONF_OPTS += -Dgles2=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Dgles2=disabled
endif
ifeq ($(BR2_PACKAGE_LIBDRM),y)
MESA3D_DEMOS_DEPENDENCIES += libdrm
MESA3D_DEMOS_CONF_OPTS += -Dlibdrm=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Dlibdrm=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
# Meson search for gbm, but has no option to enable/disable it. See:
# https://gitlab.freedesktop.org/mesa/demos/-/blob/mesa-demos-8.5.0/meson.build#L88
# We still add the dependency, if needed, to make sure it will always
# be detected.
MESA3D_DEMOS_DEPENDENCIES += mesa3d
endif
ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
MESA3D_DEMOS_DEPENDENCIES += libfreeglut
MESA3D_DEMOS_CONF_OPTS += -Dwith-glut=$(STAGING_DIR)/usr
endif
ifeq ($(BR2_PACKAGE_LIBDECOR)$(BR2_PACKAGE_WAYLAND),yy)
MESA3D_DEMOS_DEPENDENCIES += libdecor libxkbcommon wayland
MESA3D_DEMOS_CONF_OPTS += -Dwayland=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Dwayland=disabled
endif
ifeq ($(BR2_PACKAGE_VULKAN_LOADER),y)
MESA3D_DEMOS_DEPENDENCIES += vulkan-loader
MESA3D_DEMOS_CONF_OPTS += -Dvulkan=enabled
else
MESA3D_DEMOS_CONF_OPTS += -Dvulkan=disabled
endif
$(eval $(meson-package))