[Buildroot] [PATCH v2 6/7] package/kmscube: use libgbm virtual package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Oct 1 14:18:52 UTC 2021


On Wed, 29 Sep 2021 00:37:53 +0200
Kamel Bouhara <kamel.bouhara at bootlin.com> wrote:

> diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
> index b6ad305bfb..3876f93491 100644
> --- a/package/kmscube/Config.in
> +++ b/package/kmscube/Config.in
> @@ -1,9 +1,19 @@
>  config BR2_PACKAGE_KMSCUBE
>  	bool "kmscube"
> -	# requires libgbm from mesa3d
> -	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
> -	depends on BR2_PACKAGE_MESA3D_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBEGL
> +	depends on BR2_PACKAGE_HAS_LIBGBM
> +	depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> +	depends on BR2_PACKAGE_HAS_LIBGLES
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
> +	select BR2_PACKAGE_LIBDRM
>  	help
>  	  kmscube is an application to test kms/drm drivers.
>  
> -	  https://gitlab.freedesktop.org/mesa/kmscube
> +	  https://cgit.freedesktop.org/mesa/kmscube/
> +
> +comment "kmscube needs EGL, GBM and OpenGL ES, and a toolchain w/ thread support"
> +	depends on BR2_PACKAGE_HAS_LIBEGL
> +	depends on BR2_PACKAGE_HAS_LIBGBM
> +	depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> +	depends on BR2_PACKAGE_HAS_LIBGLES
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS

This should be:

	depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGBM || !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || !depends on BR2_PACKAGE_HAS_LIBGLES || !BR2_TOOLCHAIN_HAS_THREADS

Indeed, in your current implementation, the comment will only show up
if we have EGL, gbm, OpenGLES available but threads are not available.
This makes a comment suggesting to enable EGL, GBM and OpenGL ES a bit
useless.

Instead what we want is to show the comment if EGL is missing, or if
GBM is missing, or if OpenGL ES is missing, or if threads are missing.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com


More information about the buildroot mailing list