[Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Sep 21 14:13:21 UTC 2021


On Tue, 21 Sep 2021 15:03:23 +0200
Kamel Bouhara <kamel.bouhara at bootlin.com> wrote:

> diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> index 31a9152407..dfcca89e46 100644
> --- a/package/sunxi-mali-mainline/Config.in
> +++ b/package/sunxi-mali-mainline/Config.in
> @@ -3,6 +3,8 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE
>  	depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm)
>  	depends on BR2_TOOLCHAIN_USES_GLIBC
>  	select BR2_PACKAGE_HAS_LIBEGL
> +	select BR2_PACKAGE_HAS_LIBGBM
> +	select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF

So here, you specify that sunxi-mali-mainline always provides libgbm.

>  	select BR2_PACKAGE_HAS_LIBGLES
>  	help
>  	  Install userspace Allwinner OpenGL libraries.
> @@ -14,6 +16,9 @@ if BR2_PACKAGE_SUNXI_MALI_MAINLINE
>  config BR2_PACKAGE_PROVIDES_LIBEGL
>  	default "sunxi-mali-mainline"
>  
> +config BR2_PACKAGE_PROVIDES_LIBGBM
> +	default "sunxi-mali-mainline" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND

But here only if the wayland output is selected.

> +
>  config BR2_PACKAGE_PROVIDES_LIBGLES
>  	default "sunxi-mali-mainline"
>  
> @@ -26,6 +31,7 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV
>  config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND
>  	bool "wayland"
>  	depends on BR2_PACKAGE_WAYLAND
> +	select BR2_PACKAGE_HAS_LIBGBM

If only the wayland variant provides a gbm implementation, then only
this select should stay there, along with the select of
BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF.

> diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
> new file mode 100644
> index 0000000000..e2f6c04a82
> --- /dev/null
> +++ b/package/sunxi-mali-mainline/gbm.pc
> @@ -0,0 +1,12 @@
> +prefix=/usr
> +exec_prefix=/usr
> +libdir=${exec_prefix}/lib
> +includedir=${prefix}/include
> +
> +Name: gbm
> +Description: ARM Mali implementation of gbm
> +Requires.private: 
> +Version: 1.0
> +Libs: -L${libdir} -lgbm
> +Libs.private: 
> +Cflags: -I${includedir}

Is it a requirement for GBM providers to provide a gbm.pc? If so, I
think it would be great to mention it in the libgbm.mk, as a comment.

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