package/sunxi-mali-utgard: support the wayland driver
PATCH 1/1 package/sunxi-mali-utgard: support the wayland driver
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)
package/sunxi-mali-utgard/Config.in +23 -0
@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy
@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"
package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15 -3
@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc
@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endef
Signature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi,
Quoted 6 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>
With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Adrian,
Quoted 8 lines · Adrian Perez de Castro
Hi,
Quoted 5 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Quoted 5 lines
Quoted 1 line
Signed-off-by Adrian Perez de Castro <[email protected]>With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sas
Quoted 98 lines
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Giulio,
Quoted 13 lines · On Sun, 30 Apr 2023 23:35:03 +0200 Giulio Benetti…
Hi Adrian,
Quoted 10 lines · Adrian Perez de Castro
Hi,
Quoted 6 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>
Quoted 7 lines
Quoted 3 lines
With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
I am attaching the configuration file to this mail, it's based on olimex_a20_olinuxino_lime2_defconfig and I have tested building wpewebkit with the patch applied and it worked here. I hope this helps, and let me know if I can help out in any other way :-)
Quoted 114 lines
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sasQuoted 98 lines
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—AdriánQuoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Adrian,
Quoted 22 lines
Il giorno 3 mag 2023, alle ore 13:58, Adrian Perez de Castro <[email protected]> ha scritto:
Hello Giulio,
Quoted 18 lines · On Sun, 30 Apr 2023 23:35:03 +0200 Giulio Benetti…
Hi Adrian,
Quoted 14 lines · Adrian Perez de Castro
Hi,
Quoted 6 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Quoted 8 lines
Quoted 3 lines
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
I am attaching the configuration file to this mail, it's based on
olimex_a20_olinuxino_lime2_defconfigand I have tested building wpewebkit with the patch applied and it worked here. I hope this helps, and let me know if I can help out in any other way :-)
Thanks a lot. Can you also point me the SHA1 commit you were using to build? This is because build fails at me not due to host problems.
Thanks again
Best regards
Giulio
Quoted 111 lines
Quoted 111 lines
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sasQuoted 102 lines
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
<lime2-mali-wl-config.xz>
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Giulio.
Quoted 26 lines · On Wed, 03 May 2023 21:47:06 +0200 Giulio Benetti…
Quoted 26 lines
Il giorno 3 mag 2023, alle ore 13:58, Adrian Perez de Castro <[email protected]> ha scritto:
Hello Giulio,
Quoted 21 lines · On Sun, 30 Apr 2023 23:35:03 +0200 Giulio Benetti…
Hi Adrian,
Quoted 9 lines · Adrian Perez de Castro
Hi,
Quoted 5 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Quoted 5 lines
Quoted 1 line
Signed-off-by Adrian Perez de Castro <[email protected]>With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
Quoted 7 lines
Quoted 4 lines
I am attaching the configuration file to this mail, it's based on
olimex_a20_olinuxino_lime2_defconfigand I have tested building wpewebkit with the patch applied and it worked here. I hope this helps, and let me know if I can help out in any other way :-)Thanks a lot. Can you also point me the SHA1 commit you were using to build? This is because build fails at me not due to host problems.
Yes, I just tried a build today on 9a0857d734c5fca74915b1cd85b92555fe15fb93 before sending the .config file earlier.
Quoted 115 lines
Quoted 115 lines
Quoted 114 lines
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sasQuoted 98 lines
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—AdriánQuoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines
Quoted 3 lines
Cheers,
—Adrián
<lime2-mali-wl-config.xz>_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Adrian,
Quoted 35 lines · Adrian Perez de Castro
Hello Giulio.
Quoted 31 lines · On Wed, 03 May 2023 21:47:06 +0200 Giulio Benetti…
Quoted 30 lines
Il giorno 3 mag 2023, alle ore 13:58, Adrian Perez de Castro <[email protected]> ha scritto:
Hello Giulio,
Quoted 14 lines · On Sun, 30 Apr 2023 23:35:03 +0200 Giulio Benetti…
Hi Adrian,
Quoted 11 lines · Adrian Perez de Castro
Hi,
Quoted 6 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>Quoted 7 lines
Quoted 3 lines
With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
I am attaching the configuration file to this mail, it's based on
olimex_a20_olinuxino_lime2_defconfigand I have tested building wpewebkit with the patch applied and it worked here. I hope this helps, and let me know if I can help out in any other way :-)
Quoted 5 lines
Quoted 2 lines
Thanks a lot. Can you also point me the SHA1 commit you were using to build? This is because build fails at me not due to host problems.
Yes, I just tried a build today on
9a0857d734c5fca74915b1cd85b92555fe15fb93before sending the .config file earlier.
Sorry but it still fails with this error:
https://pastebin.com/6Y4HTNfF
I've used the SHA1 you've pointed me that I've seen that refers to:
2022.02.12
I've used buildroot/utils/docker-run too and the error is the same.
Can you please take a look at it?
Maybe it would be better using at least version 2023.04 otherwise even if it builds and works on the board we're not sure it works on master branch.
By the way on master branch the error is the same and it's due to libepoxy.
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sas
Quoted 119 lines
Quoted 119 lines
Quoted 118 lines
Quoted 114 lines
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti Benetti Engineering sasQuoted 98 lines
Quoted 93 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—AdriánQuoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
<lime2-mali-wl-config.xz>
Quoted 7 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Giulio,
I had a moment to check your build failure, see the comment below.
Quoted 47 lines · On Sun, 07 May 2023 15:00:01 +0200 Giulio Benetti…
Hi Adrian,
Quoted 35 lines · Adrian Perez de Castro
Hello Giulio.
Quoted 31 lines · On Wed, 03 May 2023 21:47:06 +0200 Giulio Benetti…
Quoted 30 lines
Il giorno 3 mag 2023, alle ore 13:58, Adrian Perez de Castro <[email protected]> ha scritto:
Hello Giulio,
Quoted 14 lines · On Sun, 30 Apr 2023 23:35:03 +0200 Giulio Benetti…
Hi Adrian,
Quoted 11 lines · Adrian Perez de Castro
Hi,
Quoted 6 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>Quoted 7 lines
Quoted 3 lines
With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Can you please pastebin or paste here the defconfig you've used to build? I'm encountering some issues while building but I would like to test on a board this patch.
I am attaching the configuration file to this mail, it's based on
olimex_a20_olinuxino_lime2_defconfigand I have tested building wpewebkit with the patch applied and it worked here. I hope this helps, and let me know if I can help out in any other way :-)Quoted 5 lines
Quoted 2 lines
Thanks a lot. Can you also point me the SHA1 commit you were using to build? This is because build fails at me not due to host problems.
Yes, I just tried a build today on
9a0857d734c5fca74915b1cd85b92555fe15fb93before sending the .config file earlier.Sorry but it still fails with this error:
https://pastebin.com/6Y4HTNfF
Quoted 6 lines
I've used the SHA1 you've pointed me that I've seen that refers to:
2022.02.12I've used buildroot/utils/docker-run too and the error is the same.
Can you please take a look at it?
You need to apply this patch to make 2.38.x build correctly with drivers which strictly declare GLESv2 functions and symbols in their headers without any GLESv3 or Desktop GL additions:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I actually wrote that patch so I could get WebKit built with this patch I sent for sunxi-mali-utgard but forgot to mention it before. My apologies, I've been a bit sleep deprived lately ^_^
Quoted 4 lines
Maybe it would be better using at least version 2023.04 otherwise even if it builds and works on the board we're not sure it works on master branch.
By the way on master branch the error is the same and it's due to libepoxy.
There are some warnings related to preprocessor macros redefined by the headers included as part of libepoxy, but those should be harmless because they are GLES macros with well-known values that all implementations must define with the same constants.
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · On Mon, 24 Apr 2023 00:46:42 +0300 Adrian Perez de Castro <[email protected]>…
Hi,
Quoted 5 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Quoted 5 lines
Quoted 1 line
Signed-off-by Adrian Perez de Castro <[email protected]>With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
I forgot to mention that building WebKit{GTK,WPE} needs a small patch for version 2.38.x, which was already submitted a little while ago:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Note to self: submit also this for package/webkitgtk O:-)
Quoted 88 lines
Quoted 88 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 1 line
2.40.0
Quoted 12 lines
Quoted 5 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Cheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Adrian,
Quoted 15 lines · Adrian Perez de Castro
Quoted 8 lines · On Mon, 24 Apr 2023 00:46:42 +0300 Adrian Perez de Castro <[email protected]>…
Hi,
Quoted 5 lines · On Mon, 24 Apr 2023 00:40:14 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Quoted 5 lines
Quoted 1 line
Signed-off-by Adrian Perez de Castro <[email protected]>With this I have been able to build WebKitGTK, WPEWebKit, and the Cage compositor without trouble, but unfortunately I do not have the hardware to test it... so I cannot really tell whether things work as expected.
Quoted 6 lines
I forgot to mention that building WebKit{GTK,WPE} needs a small patch for version 2.38.x, which was already submitted a little while ago:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Note to self: submit also this for package/webkitgtk O:-)
this is a curse, neither that patch fixes the previous build failure :-/ Attached you find the defconfig I use for olinuxino lime. Can you confirm that it fails at you too?
Thank you!
Best regards
Signature · 2 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas
Quoted 101 lines
Quoted 88 lines
Quoted 88 lines
--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +23
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15
-3@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endefSignature · 1 line
2.40.0Quoted 12 lines
Quoted 5 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootCheers,
—Adrián
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines
Cheers,
—Adrián_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
BR2_arm=y
BR2_cortex_a7=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_OVERLAY="board/olimex/a20_olinuxino/rootfs_overlay" BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a20_olinuxino/genimage.cfg" BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.22" BR2_LINUX_KERNEL_DEFCONFIG="sunxi" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olimex/a20_olinuxino/linux-disable-lima.fragment" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-olinuxino-lime" BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_SUNXI_TOOLS=y
BR2_PACKAGE_SUNXI_MALI_UTGARD=y
BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND=y
BR2_PACKAGE_ZLIB_NG=y
BR2_PACKAGE_LIBGTK3=y
BR2_PACKAGE_WEBKITGTK=y
BR2_PACKAGE_WEBKITGTK_SANDBOX=y
BR2_PACKAGE_WEBKITGTK_HTTPS=y
BR2_PACKAGE_WPEBACKEND_FDO=y
BR2_PACKAGE_PCRE=y
BR2_PACKAGE_PCRE_UCP=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.04" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A20-OLinuXino-Lime" BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Adrian,
Il 23/04/2023 23:40, Adrian Perez de Castro ha scritto:
Quoted 31 lines
Add a choice to allow using the Wayland variant of the Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>--- package/sunxi-mali-utgard/Config.in | 23 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)package/sunxi-mali-utgard/Config.in +5
-0@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy@@ -38,6 +41,26 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform"
package/sunxi-mali-utgard/Config.in config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION · line 55
Quoted 10 lines
package/sunxi-mali-utgard/Config.in +10
-0+ default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM
There is a wayland blob only for r6p2 version :-/ so here you need to depend on BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 and add a comment for Wayland not available when r8p1 is selected.
Thank you
Best regards
Signature · 2 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas
Quoted 40 lines
package/sunxi-mali-utgard/Config.in +8
-0+ +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"package/sunxi-mali-utgard/sunxi-mali-utgard.mk +11
-2@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES
package/sunxi-mali-utgard/sunxi-mali-utgard.mk define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS · line 54
Quoted 10 lines
package/sunxi-mali-utgard/sunxi-mali-utgard.mk +4
-1+SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endef
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/sunxi-mali-utgard: support the wayland driver
In reply to Adrian Perez de CastroAdd a choice to allow using the Wayland variant of the r6p2 Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
---
Changes v1 -> v2:
- Make Wayland support depend on version r6p2 (suggested by Giulio Benetti).
--- package/sunxi-mali-utgard/Config.in | 28 +++++++++++++++++++ .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 18 ++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-)
package/sunxi-mali-utgard/Config.in +28 -0
@@ -18,6 +18,9 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-utgard" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-utgard" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy
@@ -38,6 +41,31 @@ config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 +choice + prompt "Platform" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + help + Select the target EGL platform. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + bool "fbdev" + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + depends on BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM + +comment "wayland support requires version r6p2" + depends on !BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_UTGARD_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + endif comment "sunxi-mali-utgard needs an EABIhf glibc toolchain"
package/sunxi-mali-utgard/sunxi-mali-utgard.mk +15 -3
@@ -24,9 +24,9 @@ endif define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/include/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/* $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc
@@ -34,9 +34,21 @@ define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc endef +ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND),y) +define SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES + sed -e '/^Cflags:/s/$$/ -DWL_EGL_PLATFORM/' \ + -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + sed -e '/^Requires:/s/$$/ wayland-client wayland-server/' \ + -i $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef +SUNXI_MALI_UTGARD_POST_INSTALL_TARGET_HOOKS += SUNXI_MALI_UTGARD_INSTALL_FIXUP_STAGING_PC_FILES +SUNXI_MALI_UTGARD_DEPENDENCIES += wayland +endif + define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \ $(TARGET_DIR)/usr/lib/ endef
Signature · 6 lines
2.40.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 11 lines · On Mon, 24 Apr 2023 10:40:12 +0300 Adrian Perez de Castro <[email protected]>…
Add a choice to allow using the Wayland variant of the r6p2 Mali driver. When selected, the package is marked as provider for libgbm as libMali.so includes the symbols and a libgbm.so symlink is installed; and both BR2_PACKAGE_HAS_{LIBGBM,LIBEGL_WAYLAND} are selected accordingly.
Signed-off-by Adrian Perez de Castro <[email protected]>---
Changes v1 -> v2:
- Make Wayland support depend on version r6p2 (suggested by Giulio Benetti).
Thanks, I have applied, with two changes. See below.
package/sunxi-mali-utgard/Config.in config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION · line 57
Quoted 5 lines
package/sunxi-mali-utgard/Config.in +5
-0+config BR2_PACKAGE_SUNXI_MALI_UTGARD_WAYLAND + bool "wayland" + depends on BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + select BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_HAS_LIBGBM
select BR2_PACKAGE_WAYLAND
was missing here. Indeed, you have "wayland" in the <pkg>_DEPENDENCIES, but you didn't select it, causing a build failure.
Review
Quoted 2 lines
(quoted diff) +1
-1- cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/$(BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM)/*.so* \
I have introduced an intermediate SUNXI_MALI_UTGARD_PLATFORM which contains the qstripped value of BR2_PACKAGE_SUNXI_MALI_UTGARD_PLATFORM, to keep things a bit nicer and aligned with what the package was already doing for other variables.
Thanks a lot for this contribution, and sorry for the huge delay!
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