imx: fix gpu graphics support
cover imx: fix gpu graphics support
Hi,
The GPU Vivante have been updated but the kernel module wasn't. This mismatch will break graphics support for platforms unless they have the exact same version in-tree (only NXP defconfig right now).
Also, while experimenting with the Wayland package I've noticed this
build issue:
In file included from host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39,
from ../libweston/renderer-gl/gl-renderer.h:36,
from ../libweston/backend-drm/drm-gbm.c:42:host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:144:10: fatal error: X11/Xlib.h: No such file or directory
144 | #include <X11/Xlib.h>
So the second patch takes care of fixing the eglplatform.h header like Jerome did for the fbbackend.
Let me know if you have any questions.
Regards,
Gary
Gary Bisson (2):
kernel-module-imx-gpu-viv: bump to version 6.4.0.p1.0 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland
backend
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 12 +++++++++--- .../kernel-module-imx-gpu-viv/Config.in | 2 +- .../kernel-module-imx-gpu-viv.hash | 2 +- .../kernel-module-imx-gpu-viv.mk | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 kernel-module-imx-gpu-viv: bump to version 6.4.0.p1.0
This package has been tested on Nitrogen8M with the following commands:
# modprobe galcore # cd /usr/share/examples/viv_samples/vdk/ # ./tutorial7
Also update the help text as we shouldn't specify a kernel revision. It is just that this module isn't meant for mainline kernel, only its NXP forked version.
--- package/freescale-imx/kernel-module-imx-gpu-viv/Config.in | 2 +- .../kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash | 2 +- .../kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
package/freescale-imx/kernel-module-imx-gpu-viv/Config.in +1 -1
@@ -11,6 +11,6 @@ config BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV source code of the same version as base and include fixes and improvements developed by FSL Community. - This module is only meant for NXP-based kernel up to 4.1.x. + This module is only meant for NXP-based kernel. https://github.com/Freescale/kernel-module-imx-gpu-viv
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash +1 -1
@@ -1,3 +1,3 @@ # locally computed -sha256 ad910b7d36dc433bbbe85808d278312e9199635aaa5d00097b70ffab11bde9e6 kernel-module-imx-gpu-viv-86354002bea77acd9ce1812712e9d8485b377ec8.tar.gz +sha256 d747c39f900315f2f46b8397f55d199c7ece7328ae91ce21a2f5eb0895603865 kernel-module-imx-gpu-viv-4cc1368dc05073b368cfdbadfdf5de3a3d3b15f4.tar.gz sha256 b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259 COPYING
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -KERNEL_MODULE_IMX_GPU_VIV_VERSION = 86354002bea77acd9ce1812712e9d8485b377ec8 +KERNEL_MODULE_IMX_GPU_VIV_VERSION = 4cc1368dc05073b368cfdbadfdf5de3a3d3b15f4 KERNEL_MODULE_IMX_GPU_VIV_SITE = \ $(call github,Freescale,kernel-module-imx-gpu-viv,$(KERNEL_MODULE_IMX_GPU_VIV_VERSION)) KERNEL_MODULE_IMX_GPU_VIV_LICENSE = GPL-2.0
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH 1/2 kernel-module-imx-gpu-viv: bump to version 6.4.0.p1.0
Quoted 9 lines · On Thu, 2 Apr 2020 15:08:41 +0200 Gary Bisson…
This package has been tested on Nitrogen8M with the following commands:
# modprobe galcore # cd /usr/share/examples/viv_samples/vdk/ # ./tutorial7Also update the help text as we shouldn't specify a kernel revision. It is just that this module isn't meant for mainline kernel, only its NXP forked version.
Quoted 6 lines
Signed-off-by Gary Bisson <[email protected]>--- package/freescale-imx/kernel-module-imx-gpu-viv/Config.in | 2 +- .../kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash | 2 +- .../kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
In reply to Gary BissonJust like Jerome had to do with EGL_API_FB back in the days, in order to compile with Vivante header it is necessary to have some defines setup as the default behavior of eglplatform.h is to include Xlib.h.
So this patch sets WL_EGL_PLATFORM when the Wayland backend is used. This option is actually declared in egl.pc but not all packages use pkg-config properly.
---
Fixes the following build issue (building weston):
In file included from host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39,
from ../libweston/renderer-gl/gl-renderer.h:36,
from ../libweston/backend-drm/drm-gbm.c:42:
host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:144:10: fatal error: X11/Xlib.h: No such file or directory
144 | #include <X11/Xlib.h>
---
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +9 -3
@@ -59,9 +59,9 @@ define IMX_GPU_VIV_BUILD_CMDS endef ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb) -define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef
@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS + $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endif ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11)
@@ -89,7 +95,7 @@ endif define IMX_GPU_VIV_INSTALL_STAGING_CMDS cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr - $(IMX_GPU_VIV_FIXUP_FB_HEADERS) + $(IMX_GPU_VIV_FIXUP_HEADERS) $(IMX_GPU_VIV_FIXUP_PKGCONFIG) for lib in egl gbm glesv1_cm glesv2 vg; do \ $(INSTALL) -m 0644 -D \
Signature · 1 line
2.25.1
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hello Gary,
As usual, thanks for your work maintaining good support for i.MX platforms in Buildroot. One question below.
Quoted 10 lines · On Thu, 2 Apr 2020 15:08:42 +0200 Gary Bisson…
ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +2
-2-define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) · line 86
Quoted 10 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +6
-0@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS + $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endif
Can we use a proper patch instead of these horrible SED calls ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hi Thomas,
Quoted 4 lines · Thomas Petazzoni
Hello Gary,
As usual, thanks for your work maintaining good support for i.MX platforms in Buildroot. One question below.
No problem.
Quoted 17 lines
Quoted 14 lines · On Thu, 2 Apr 2020 15:08:42 +0200 Gary Bisson…
ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +3
-2-define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS
Quoted 8 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) · line 86
Quoted 6 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +5
-0+ $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endifCan we use a proper patch instead of these horrible SED calls ?
I know it isn't an elegant solution and I am open to discussion. However modifying eglplatform.h still seems like the less intrusive solution.
Do you have anything in mind?
What Yocto does is to patch packages that break by appending CFLAGS [1][2], I'd like to avoid such approach.
Especially since in my case it happened building standard Weston package... It works in their case because they use a Weston fork (along with a libdrm fork, and wayland-protocols fork).
Regards,
Gary
[1] https://github.com/Freescale/meta-freescale/blob/zeus/recipes-graphics/libsdl2/libsdl2_%25.bbappend
[2] https://github.com/Freescale/meta-freescale/blob/zeus/recipes-graphics/libepoxy/libepoxy_1.5.%25.bbappend
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hi Thomas,
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
I'd love to have Weston support for i.MX8M* fixed for next release and my other series [1] depends on this patch.
Then I am preparing patches to have VPU support using GStreamer-imx V2 for i.MX8M* as well.
Regards,
Gary
[1] http://patchwork.ozlabs.org/project/buildroot/list/?series=184556
Quoted 54 lines · Gary Bisson
Hi Thomas,
Quoted 4 lines · Thomas Petazzoni
Hello Gary,
As usual, thanks for your work maintaining good support for i.MX platforms in Buildroot. One question below.
No problem.
Quoted 17 lines
Quoted 14 lines · On Thu, 2 Apr 2020 15:08:42 +0200 Gary Bisson…
ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +3
-2-define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERSQuoted 8 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) · line 86
Quoted 6 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +5
-0+ $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endifCan we use a proper patch instead of these horrible SED calls ?
I know it isn't an elegant solution and I am open to discussion. However modifying
eglplatform.hstill seems like the less intrusive solution.Do you have anything in mind?
What Yocto does is to patch packages that break by appending CFLAGS [1][2], I'd like to avoid such approach.
Especially since in my case it happened building standard Weston package... It works in their case because they use a Weston fork (along with a libdrm fork, and wayland-protocols fork).
Regards,
Gary[1] https://github.com/Freescale/meta-freescale/blob/zeus/recipes-graphics/libsdl2/libsdl2_%25.bbappend
[2] https://github.com/Freescale/meta-freescale/blob/zeus/recipes-graphics/libepoxy/libepoxy_1.5.%25.bbappend
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hi Gary, Hi Thomas,
Am Mi., 8. Juli 2020 um 14:20 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 11 lines
Hi Thomas,
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
I'd love to have Weston support for i.MX8M* fixed for next release and my other series [1] depends on this patch.
Then I am preparing patches to have VPU support using GStreamer-imx V2 for i.MX8M* as well.
Any news on that? I also would like to see weston support for imx8m in buildroot.
@Gary: did you try to fix that upstream?
Signature · 1 line
Heiko
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hi Heiko,
Quoted 10 lines · Heiko Thiery
Hi Gary, Hi Thomas,
Am Mi., 8. Juli 2020 um 14:20 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 6 lines
Hi Thomas,
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
Quoted 8 lines
Quoted 5 lines
I'd love to have Weston support for i.MX8M* fixed for next release and my other series [1] depends on this patch.
Then I am preparing patches to have VPU support using GStreamer-imx V2 for i.MX8M* as well.
Any news on that? I also would like to see weston support for imx8m in buildroot.
No, a Tested-by and/or Reviewed-by would definitely help the patch getting further. Have you tried it?
Quoted 1 line
@Gary: did you try to fix that upstream?
What upstream? There's none to my knowledge. As mentioned in the commit log, even NXP doesn't have a real solution for this.
Regards,
Gary
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Hi Gary,
Am Di., 13. Okt. 2020 um 22:07 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 17 lines
Hi Heiko,
Quoted 13 lines · Heiko Thiery
Hi Gary, Hi Thomas,
Am Mi., 8. Juli 2020 um 14:20 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 9 lines
Hi Thomas,
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
I'd love to have Weston support for i.MX8M* fixed for next release and my other series [1] depends on this patch.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Then I am preparing patches to have VPU support using GStreamer-imx V2 for i.MX8M* as well.
Any news on that? I also would like to see weston support for imx8m in buildroot.
No, a Tested-by and/or Reviewed-by would definitely help the patch getting further. Have you tried it?
I'm in progress and hopefully have a running system in the next few days. If I get a running version I will do so.
Quoted 5 lines
Quoted 2 lines
@Gary: did you try to fix that upstream?
What upstream? There's none to my knowledge. As mentioned in the commit log, even NXP doesn't have a real solution for this.
I have to admit I'm just at the beginning of that topic and have no experience yet ;-/
Quoted 3 lines
Regards,
Gary
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
In reply to Heiko ThieryGary, Heiko, Thomas, All,
On 2020-10-13 20:30 +0200, Heiko Thiery spake thusly:
Quoted 5 lines
Am Mi., 8. Juli 2020 um 14:20 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 3 lines
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
Quoted 8 lines
Quoted 5 lines
I'd love to have Weston support for i.MX8M* fixed for next release and my other series [1] depends on this patch.
Then I am preparing patches to have VPU support using GStreamer-imx V2 for i.MX8M* as well.
Any news on that? I also would like to see weston support for imx8m in buildroot.
So, we've discussed and investigated this with Heiko on IRC tonight, and we came to the conclusion that the weston build failure is a weston bug.
Indeed, weston *is* using pkg-config to find EGL:
Run-time dependency egl found: YES 8.0
Weston is indeed using the proper CFLAGS from egl.pc to build parts of its files; for example, bulding libweston/backend-wayland/wayland.c is using the proper -DWL_EGL_PLATFORM.
However, the CFLAGS from egl.pc are not used when building gdbm-drm.c, when it should. Indeed, drm-gbm.c includes gl-renderer.h which includes egl.h which include eglpltform.h, so it seems totally expected that drm-gbm.c does use the CFLAGS frpm egl.pc.
In my opinion, this build failre you report in your original patch is in fact a weston bug.
Probably, patch like this could help:
From Yann E. MORIN <[email protected]>
libweston/backend/drm: might need EGL
gbm-drm.c includes gl-renderer.h. When EGL is enabled, that in turns includes egl.h. As such, dependencies for drm should include EGL if it is available.
This condition is modelled after a similar one in libweston/meson.build
diff --git a/libweston/backend-drm/meson.build b/libweston/backend-drm/meson.build index 484c2702..67648a09 100644
--- a/libweston/backend-drm/meson.build
+++ b/libweston/backend-drm/meson.build
@@ -53,6 +53,10 @@ if get_option('renderer-gl')
config_h.set('HAVE_GBM_FD_IMPORT', '1')
endif
deps_drm += dep_gbm
+ deps_egl = dependency('egl', required: false)
+ if dep_egl.found()
+ deps_drm += dep_egl
+ endif
srcs_drm += 'drm-gbm.c'
config_h.set('BUILD_DRM_GBM', '1')
endif
The build succeeded for me with that patch, at least; I'll let you check it is valid, and maybe send it upstream
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
Gary, Heiko, Thomas, All,
On 2020-10-20 23:20 +0200, Yann E. MORIN spake thusly:
Quoted 7 lines
On 2020-10-13 20:30 +0200, Heiko Thiery spake thusly:
Quoted 4 lines
Am Mi., 8. Juli 2020 um 14:20 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 2 lines
Gentle ping on this, let me know if you see another approach that would be better, I'm open to suggestions.
So, we've discussed and investigated this with Heiko on IRC tonight, and we came to the conclusion that the weston build failure is a weston bug.
[--SNIP--]
I forgot to say:
As a consequence, I marked this patch as "changes requested" in patchwork.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
In reply to Thomas PetazzoniHi Thomas,
Am Do., 2. Apr. 2020 um 16:25 Uhr schrieb Thomas Petazzoni <[email protected]>:
Quoted 23 lines
Hello Gary,
As usual, thanks for your work maintaining good support for i.MX platforms in Buildroot. One question below.
Quoted 14 lines · On Thu, 2 Apr 2020 15:08:42 +0200 Gary Bisson…
ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +3
-2-define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS
Quoted 8 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) · line 86
Quoted 6 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +5
-0+ $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endifCan we use a proper patch instead of these horrible SED calls ?
What do you mean with a proper patch? These fixups will modify a header file of weston. How could we do a patch of weston here?
Signature · 1 line
Heiko
PATCH 2/2 package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend
In reply to Gary BissonHi Gary,
Am Do., 2. Apr. 2020 um 15:09 Uhr schrieb Gary Bisson <[email protected]>:
Quoted 10 lines
Just like Jerome had to do with
EGL_API_FBback in the days, in order to compile with Vivante header it is necessary to have some defines setup as the default behavior ofeglplatform.his to includeXlib.h.So this patch sets
WL_EGL_PLATFORMwhen the Wayland backend is used. This option is actually declared in egl.pc but not all packages use pkg-config properly.Signed-off-by Gary Bisson <[email protected]>
Quoted 56 lines
---
Fixes the following build issue (building weston):
In file included fromhost/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39,from ../libweston/renderer-gl/gl-renderer.h:36, from ../libweston/backend-drm/drm-gbm.c:42: host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:144:10: fatal error: X11/Xlib.h: No such file or directory 144 | #include <X11/Xlib.h> --- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +9
-4@@ -59,9 +59,9 @@ define IMX_GPU_VIV_BUILD_CMDS endef ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb) -define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef@@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS + $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endif ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11)@@ -89,7 +95,7 @@ endif define IMX_GPU_VIV_INSTALL_STAGING_CMDS cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr - $(IMX_GPU_VIV_FIXUP_FB_HEADERS) + $(IMX_GPU_VIV_FIXUP_HEADERS) $(IMX_GPU_VIV_FIXUP_PKGCONFIG) for lib in egl gbm glesv1_cm glesv2 vg; do \ $(INSTALL) -m 0644 -D \ --2.25.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot