Skip to contentSkip to conversation

package/glslsandbox: kms needs gbm

PATCH Applied Fabrice Fontaine 3 participants 6 messages Jan 28, 2022 – Jul 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/glslsandbox: kms needs gbm

Obviously, KMS/DRM/GBM needs gbm so add a dependency on libgbm which was added by commit 4a541ee93242e67f7fab625607f5501c6925d451:

checking for gbm... no
configure: error: Package requirements (gbm) were not met:

Package 'gbm', required by 'virtual:world', not found

Fixes:
- http://autobuild.buildroot.org/results/31b3fff9748300e293b4efb5615176ccce48dd15

---
 package/glslsandbox-player/Config.in             | 1 +
 package/glslsandbox-player/glslsandbox-player.mk | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
package/glslsandbox-player/Config.in +1 -0
index 3aa6049dfb..e36e8d74c8 100644
@@ -70,6 +70,7 @@ choice
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS
 	bool "KMS/DRM/GBM"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_HAS_LIBGBM
 	select BR2_PACKAGE_LIBDRM
 
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI
package/glslsandbox-player/glslsandbox-player.mk +1 -3
index c5fbf062b7..8886788587 100644
@@ -37,9 +37,7 @@ GLSLSANDBOX_PLAYER_CONF_OPTS += --disable-install-scripts
 endif
 
 ifeq ($(BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS),y)
-# gbm dependency is not needed, as it is normally packaged with
-# libegl/libgles drivers.
-GLSLSANDBOX_PLAYER_DEPENDENCIES += libdrm
+GLSLSANDBOX_PLAYER_DEPENDENCIES += libdrm libgbm
 GLSLSANDBOX_PLAYER_CONF_OPTS += --with-native-gfx=kms
 else ifeq ($(BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI),y)
 GLSLSANDBOX_PLAYER_DEPENDENCIES += sunxi-mali-utgard
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/libglvnd: bump to version 1.4.0

- Update hash of README.md (extra paragraph removed with
https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/a7bb6f4d19d1258d83c8800af885936a243e07bb)
- Update hash of uthash license (year updated with
https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/b3a958feb03694e2f0df71482875684e45353964)

https://gitlab.freedesktop.org/glvnd/libglvnd/-/tags/v1.4.0

---
 package/libglvnd/libglvnd.hash | 6 +++---
 package/libglvnd/libglvnd.mk   | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)
package/libglvnd/libglvnd.hash +3 -3
index 15e76ea9e8..e463a8def5 100644
@@ -1,7 +1,7 @@
 # Locally computed
-sha256  6332c27f4c792b09a3eb1d7ae18c2d6ff6a0acaf3a746489caf859e659fca2f7  libglvnd-v1.3.2.tar.gz
+sha256  c4a884503d2412dc1fa209613aa8a77193aeb7065b823fe1775dc8b6f3e45211  libglvnd-1.4.0.tar.gz
 
 # Locally computed hashes for license files
-sha256  224534547628a9e5e889d8808385bd38839e6bdb77d89c90ac04dad6891a4f5f  README.md
-sha256  bebdc0fd27cd37af8406e47af23c113866b7856c3f7349ffcbc672029ec8acf7  src/util/uthash/LICENSE
+sha256  f84a3eca98cc5bdf5318741124c38c5e877f856df8c7e229ee5065e5c61038c2  README.md
+sha256  e9b9aac8421b6d29176c6f23f6f7a907194245e35ef99ace10839734961cfaa2  src/util/uthash/LICENSE
 sha256  f6f207863675ca5a5128fd120b9aef4f4bbab73ffa57e5f771ccffc8e3cc56b7  src/util/cJSON/LICENSE
package/libglvnd/libglvnd.mk +2 -3
index 3df609f6eb..4149e8b1e6 100644
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-LIBGLVND_VERSION = 1.3.2
-LIBGLVND_SOURCE = libglvnd-v$(LIBGLVND_VERSION).tar.gz
-LIBGLVND_SITE = https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v$(LIBGLVND_VERSION)
+LIBGLVND_VERSION = 1.4.0
+LIBGLVND_SITE = https://gitlab.freedesktop.org/glvnd/libglvnd/uploads/ca5bf4295beb39bb324f692c481ac8a1
 
 LIBGLVND_LICENSE = \
 	libglvnd license, \
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/libglvnd: bump to version 1.4.0

Quoted 5 lines · On Fri, 28 Jan 2022 21:52:01 +0100 Fabrice Fontaine…

- Update hash of README.md (extra paragraph removed with
https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/a7bb6f4d19d1258d83c8800af885936a243e07bb)
- Update hash of uthash license (year updated with
https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/b3a958feb03694e2f0df71482875684e45353964)

Quoted 7 lines

https://gitlab.freedesktop.org/glvnd/libglvnd/-/tags/v1.4.0

---
 package/libglvnd/libglvnd.hash | 6 +++---
 package/libglvnd/libglvnd.mk   | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Fabrice Fontaine

Hello Fabrice,

package/glslsandbox-player/Config.in choice · line 74

Quoted 10 lines · On Fri, 28 Jan 2022 21:52:00 +0100 Fabrice Fontaine…
package/glslsandbox-player/Config.in +1 -0
index 3aa6049dfb..e36e8d74c8 100644
@@ -70,6 +70,7 @@ choice
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS
 	bool "KMS/DRM/GBM"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_HAS_LIBGBM
 	select BR2_PACKAGE_LIBDRM

So, yes, this is needed, but isn't sufficient. Indeed, now you can potentially enable glslsandbox-player even if you don't meet the dependency for at least one of the "Native windowing system" (see the choice...endchoice in the package Config.in).

The top-level BR2_PACKAGE_GLSLSANDBOX_PLAYER option is even carrying a "bogus" depends on BR2_TOOLCHAIN_HAS_THREADS to make sure that at least the BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS option is available.

But with your change, this is no longer true, and adding depends on BR2_PACKAGE_HAS_LIBGBM to the package top-level option doesn't make sense.

So I've tried to make sure that glslsandbox-player is only available when one of the windowing systems dependencies is met, by doing this:

package/glslsandbox-player/Config.in +13 -3
index 2d15a7e270..35fe7b3c6a 100644
@@ -1,10 +1,20 @@
+config BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
+       bool
+       default y if BR2_PACKAGE_SUNXI_MALI_UTGARD
+       default y if BR2_PACKAGE_MALI_T76X
+       default y if BR2_PACKAGE_RPI_USERLAND
+       default y if BR2_PACKAGE_SDL2_OPENGLES
+       default y if BR2_PACKAGE_TI_SGX_UM
+       default y if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
+       default y if BR2_PACKAGE_WAYLAND
+       default y if BR2_PACKAGE_XORG7
+       default y if BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER
        bool "glslsandbox-player"
        depends on BR2_PACKAGE_HAS_LIBEGL
        depends on BR2_PACKAGE_HAS_LIBGLES
-       # Doesn't really depend on threads, but this makes sure we have at least
-       # one native windowing system available, and is good enough in practice.
-       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
        help
          GLSL Sandbox standalone player allow one to run and render
          (most of) nice shaders available online on the

(this would have been the change *before* your patch). But unfortunately, this causes Kconfig to goes nuts with a silly recursive dependency:

package/python3/Config.in:5:error: recursive dependency detected!
package/python3/Config.in:5: symbol BR2_PACKAGE_PYTHON3 is selected by BR2_PACKAGE_GLSLSANDBOX_PLAYER_SCRIPTS
package/glslsandbox-player/Config.in:44: symbol BR2_PACKAGE_GLSLSANDBOX_PLAYER_SCRIPTS depends on BR2_PACKAGE_GLSLSANDBOX_PLAYER
package/glslsandbox-player/Config.in:13: symbol BR2_PACKAGE_GLSLSANDBOX_PLAYER depends on BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
package/glslsandbox-player/Config.in:6: symbol BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM depends on BR2_PACKAGE_SDL2_OPENGLES
package/sdl2/Config.in:54: symbol BR2_PACKAGE_SDL2_OPENGLES depends on BR2_PACKAGE_SDL2
package/sdl2/Config.in:1: symbol BR2_PACKAGE_SDL2 is selected by BR2_PACKAGE_FFMPEG_FFPLAY
package/ffmpeg/Config.in:51: symbol BR2_PACKAGE_FFMPEG_FFPLAY depends on BR2_PACKAGE_FFMPEG
package/ffmpeg/Config.in:18: symbol BR2_PACKAGE_FFMPEG is selected by BR2_PACKAGE_KODI
package/kodi/Config.in:51: symbol BR2_PACKAGE_KODI depends on BR2_PACKAGE_PYTHON3

which I have no idea how to resolve :-/

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Hi Thomas, Fabrice, Yann,

Quoted 91 lines · Thomas Petazzoni

Hello Fabrice,

package/glslsandbox-player/Config.in choice · line 74

Quoted 10 lines · On Fri, 28 Jan 2022 21:52:00 +0100 Fabrice Fontaine…
package/glslsandbox-player/Config.in +1 -0
index 3aa6049dfb..e36e8d74c8 100644
@@ -70,6 +70,7 @@ choice
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS
 	bool "KMS/DRM/GBM"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_HAS_LIBGBM
 	select BR2_PACKAGE_LIBDRM

So, yes, this is needed, but isn't sufficient. Indeed, now you can potentially enable glslsandbox-player even if you don't meet the dependency for at least one of the "Native windowing system" (see the choice...endchoice in the package Config.in).

The top-level BR2_PACKAGE_GLSLSANDBOX_PLAYER option is even carrying a "bogus" depends on BR2_TOOLCHAIN_HAS_THREADS to make sure that at least the BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS option is available.

But with your change, this is no longer true, and adding depends on BR2_PACKAGE_HAS_LIBGBM to the package top-level option doesn't make sense.

So I've tried to make sure that glslsandbox-player is only available when one of the windowing systems dependencies is met, by doing this:

package/glslsandbox-player/Config.in +12 -1
index 2d15a7e270..35fe7b3c6a 100644
@@ -1,10 +1,20 @@
+config BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
+       bool
+       default y if BR2_PACKAGE_SUNXI_MALI_UTGARD
+       default y if BR2_PACKAGE_MALI_T76X
+       default y if BR2_PACKAGE_RPI_USERLAND
+       default y if BR2_PACKAGE_SDL2_OPENGLES
+       default y if BR2_PACKAGE_TI_SGX_UM
+       default y if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
+       default y if BR2_PACKAGE_WAYLAND
+       default y if BR2_PACKAGE_XORG7
+       default y if BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_GLSLSANDBOX_PLAYER
        bool "glslsandbox-player"
        depends on BR2_PACKAGE_HAS_LIBEGL
        depends on BR2_PACKAGE_HAS_LIBGLES
-       # Doesn't really depend on threads, but this makes sure we have 

at least
- # one native windowing system available, and is good enough in
practice.

package/glslsandbox-player/Config.in +1 -1
-       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
        help
          GLSL Sandbox standalone player allow one to run and render
          (most of) nice shaders available online on the

(this would have been the change *before* your patch). But unfortunately, this causes Kconfig to goes nuts with a silly recursive dependency:

package/python3/Config.in:5:error: recursive dependency detected!
package/python3/Config.in:5: symbol BR2_PACKAGE_PYTHON3 is selected by
BR2_PACKAGE_GLSLSANDBOX_PLAYER_SCRIPTS
package/glslsandbox-player/Config.in:44: symbol
BR2_PACKAGE_GLSLSANDBOX_PLAYER_SCRIPTS depends on BR2_PACKAGE_GLSLSANDBOX_PLAYER
package/glslsandbox-player/Config.in:13: symbol
BR2_PACKAGE_GLSLSANDBOX_PLAYER depends on BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM
package/glslsandbox-player/Config.in:6: symbol
BR2_PACKAGE_GLSLSANDBOX_SUPPORTS_WINDOWING_SYSTEM depends on BR2_PACKAGE_SDL2_OPENGLES
package/sdl2/Config.in:54: symbol BR2_PACKAGE_SDL2_OPENGLES depends on
BR2_PACKAGE_SDL2
package/sdl2/Config.in:1: symbol BR2_PACKAGE_SDL2 is selected by
BR2_PACKAGE_FFMPEG_FFPLAY
package/ffmpeg/Config.in:51: symbol BR2_PACKAGE_FFMPEG_FFPLAY depends
on BR2_PACKAGE_FFMPEG
package/ffmpeg/Config.in:18: symbol BR2_PACKAGE_FFMPEG is selected by
BR2_PACKAGE_KODI
package/kodi/Config.in:51: symbol BR2_PACKAGE_KODI depends on
BR2_PACKAGE_PYTHON3

Quoted 1 line

which I have no idea how to resolve :-/

I would like to suggest the following:

glslsandbox-player introduced last year a "Null Windowing System", which does not require anything. See:
https://github.com/jolivain/glslsandbox-player/blob/v2021.08.24/src/native_gfx_nullws.c
Some ancient EGL implementations worked that way (TI SGX, i.MX5 AMD GPU, ...).

Basically, this windowing system is always expected to compile. But it will not always work at runtime. (For an "always working" minimal configuration, for testing for example, I would recommend a Mesa3D/GBM/KMS swrast/llvmpipe relying on Kernel DRM VKMS).

This NullWS could be the fallback needed which is needed here. The "bogus" BR2_TOOLCHAIN_HAS_THREADS dependency could also be removed.

What do you think about that approach?

If you agree, I can send a patch for adding this NullWS.

After that, I think this patch proposed by Fabrice can be applied as is.

Best regards,

Julien.

Quoted 1 line

Thomas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Fabrice Fontaine
Quoted 8 lines · On Fri, 28 Jan 2022 21:52:00 +0100 Fabrice Fontaine…

Obviously, KMS/DRM/GBM needs gbm so add a dependency on libgbm which was added by commit 4a541ee93242e67f7fab625607f5501c6925d451:

checking for gbm... no
configure: error: Package requirements (gbm) were not met:

Package 'gbm', required by 'virtual:world', not found

Quoted 8 lines

Fixes:
- http://autobuild.buildroot.org/results/31b3fff9748300e293b4efb5615176ccce48dd15

---
 package/glslsandbox-player/Config.in             | 1 +
 package/glslsandbox-player/glslsandbox-player.mk | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

So, I finally applied this patch, but to address the issue I had pointed out, and thanks to the input from Julien, I did the following:

(1) Added support for the nullws windowing system, which doesn't need any extra dependency other than EGL/GLES.

https://git.buildroot.org/buildroot/commit/?id=81ad39d62f660a1409e96d1dbd405d6dab16c0f6

(2) Dropped the "depends on BR2_TOOLCHAIN_HAS_THREADS" from the top-level option, which was a work-around to make sure at least one windowing system is selectable.

https://git.buildroot.org/buildroot/commit/?id=624f2e658d09d13cb9e61a8a52f2227d2a60d7f7

(3) Applied your patch

    https://git.buildroot.org/buildroot/commit/?id=e88cb1038d3a3691621d0fe14bc9f13d6c9b7389

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot