* [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support
@ 2023-03-13 9:16 Lang Daniel via buildroot
2023-05-12 16:07 ` Gary Bisson
2025-05-18 20:43 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Lang Daniel via buildroot @ 2023-03-13 9:16 UTC (permalink / raw)
To: buildroot@buildroot.org; +Cc: tuzakli.refik@gmail.com, Gary Bisson
Since e8df0f7 (package/freescale-imx/imx-gpu-viv: bump to version 6.4.3.p4.4)
the fb folder for aarch64 is no longer included in the archive.
According to meta-freescale [0] the framebuffer output can be enabled on
IMX8 by using the wayland libraries together with egl.pc.
Tested on an imx8mn by running kmscube. EGL and GLES support detected.
[0]: https://git.yoctoproject.org/meta-freescale/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
Fixes:
cp: cannot stat '/home/d.lang/buildroot/output/build/imx-gpu-viv-6.4.3.p4.4-aarch64/gpu-core/usr/lib/fb/*': No such file or directory
Signed-off-by: Daniel Lang <d.lang@abatec.at>
---
v1 -> v2:
- Mention current build failure
- Add information for egl.pc selection
v2 -> v3:
- Introduce BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND
---
package/freescale-imx/imx-gpu-viv/Config.in | 16 +++++++++-----
.../freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 22 +++++++++++--------
2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/package/freescale-imx/imx-gpu-viv/Config.in b/package/freescale-imx/imx-gpu-viv/Config.in
index 3e095b730c..0e759f6183 100644
--- a/package/freescale-imx/imx-gpu-viv/Config.in
+++ b/package/freescale-imx/imx-gpu-viv/Config.in
@@ -12,9 +12,6 @@ config BR2_PACKAGE_IMX_GPU_VIV
depends on (BR2_arm && BR2_ARM_EABIHF) || BR2_aarch64
# Library binaries are linked against libc.so.6
depends on BR2_TOOLCHAIN_USES_GLIBC
- # Library binaries are linked against libdrm.so.2, except framebuffer
- # output on ARM
- select BR2_PACKAGE_LIBDRM if !(BR2_arm && BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB)
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBGLES
# gbm is only available in the aarch64 blobs
@@ -45,12 +42,9 @@ choice
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
bool "Framebuffer"
- # The i.MX8 blob doesn't support FB output
- depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
bool "Wayland"
- select BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
endchoice
@@ -85,6 +79,16 @@ config BR2_PACKAGE_IMX_GPU_VIV_PLATFORM
default "mx8qm" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
default "mx8qxp" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+# Library binaries are linked against libdrm and wayland,
+# except framebuffer output on ARM.
+# Framebuffer output on aarch64 uses the same libraries
+# as wayland output.
+config BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND
+ bool
+ default y if !(BR2_arm && BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB)
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_WAYLAND
+
endif
config BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES
diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
index f72735e093..359dcc5923 100644
--- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
+++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
@@ -26,20 +26,24 @@ endif
IMX_GPU_VIV_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT))
-# Libraries are linked against libdrm, except framebuffer output on ARM
-ifneq ($(IMX_GPU_VIV_LIB_TARGET)$(BR2_arm),fby)
-IMX_GPU_VIV_DEPENDENCIES += libdrm
-endif
-
-ifeq ($(IMX_GPU_VIV_LIB_TARGET),wayland)
-IMX_GPU_VIV_DEPENDENCIES += wayland
+ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND),y)
+IMX_GPU_VIV_DEPENDENCIES += libdrm wayland
+IMX_GPU_VIV_OUTPUT_DIR = wayland
+else
+IMX_GPU_VIV_OUTPUT_DIR = fb
endif
define IMX_GPU_VIV_EXTRACT_CMDS
$(call NXP_EXTRACT_HELPER,$(IMX_GPU_VIV_DL_DIR)/$(IMX_GPU_VIV_SOURCE))
endef
-ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
+# The package comes with multiple versions of egl.pc,
+# depending on the output the original egl.pc is replaced
+# with a symlink:
+# - arm/frambuffer: symlink to egl_linuxfb.pc
+# - aarch64/framebuffer: original egl.pc without a symlink
+# - wayland: symblink to egl_wayland.pc
+ifeq ($(IMX_GPU_VIV_LIB_TARGET)$(BR2_arm),fby)
define IMX_GPU_VIV_FIXUP_PKGCONFIG
ln -sf egl_linuxfb.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
endef
@@ -60,7 +64,7 @@ endif
# in the upstream archive here. We also remove unused backend files.
# Make sure these commands are idempotent.
define IMX_GPU_VIV_BUILD_CMDS
- cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
+ cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_OUTPUT_DIR)/* $(@D)/gpu-core/usr/lib/
$(foreach backend,fb wayland, \
$(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
)
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support
2023-03-13 9:16 [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support Lang Daniel via buildroot
@ 2023-05-12 16:07 ` Gary Bisson
2025-05-18 20:43 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Gary Bisson @ 2023-05-12 16:07 UTC (permalink / raw)
To: Lang Daniel; +Cc: tuzakli.refik@gmail.com, buildroot@buildroot.org
Hi,
On Mon, Mar 13, 2023 at 09:16:31AM +0000, Lang Daniel wrote:
> Since e8df0f7 (package/freescale-imx/imx-gpu-viv: bump to version 6.4.3.p4.4)
> the fb folder for aarch64 is no longer included in the archive.
>
> According to meta-freescale [0] the framebuffer output can be enabled on
> IMX8 by using the wayland libraries together with egl.pc.
>
> Tested on an imx8mn by running kmscube. EGL and GLES support detected.
>
> [0]: https://git.yoctoproject.org/meta-freescale/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
A possible improvement, that can be done in a follow-up patch, would be
to remove the examples option when arm64+fb is used. It won't cause any
build issue anyway, just that the examples require a wayland compositor.
> Fixes:
> cp: cannot stat '/home/d.lang/buildroot/output/build/imx-gpu-viv-6.4.3.p4.4-aarch64/gpu-core/usr/lib/fb/*': No such file or directory
>
> Signed-off-by: Daniel Lang <d.lang@abatec.at>
Reviewed-by: Gary Bisson <bisson.gary@gmail.com>
Regards,
Gary
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support
2023-03-13 9:16 [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support Lang Daniel via buildroot
2023-05-12 16:07 ` Gary Bisson
@ 2025-05-18 20:43 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-05-18 20:43 UTC (permalink / raw)
To: Lang Daniel via buildroot
Cc: Lang Daniel, tuzakli.refik@gmail.com, Gary Bisson
Hello Daniel,
On Mon, 13 Mar 2023 09:16:31 +0000
Lang Daniel via buildroot <buildroot@buildroot.org> wrote:
> Since e8df0f7 (package/freescale-imx/imx-gpu-viv: bump to version 6.4.3.p4.4)
> the fb folder for aarch64 is no longer included in the archive.
>
> According to meta-freescale [0] the framebuffer output can be enabled on
> IMX8 by using the wayland libraries together with egl.pc.
>
> Tested on an imx8mn by running kmscube. EGL and GLES support detected.
>
> [0]: https://git.yoctoproject.org/meta-freescale/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
>
> Fixes:
> cp: cannot stat '/home/d.lang/buildroot/output/build/imx-gpu-viv-6.4.3.p4.4-aarch64/gpu-core/usr/lib/fb/*': No such file or directory
>
> Signed-off-by: Daniel Lang <d.lang@abatec.at>
> ---
> v1 -> v2:
> - Mention current build failure
> - Add information for egl.pc selection
> v2 -> v3:
> - Introduce BR2_PACKAGE_IMX_GPU_VIV_USES_WAYLAND
> ---
> package/freescale-imx/imx-gpu-viv/Config.in | 16 +++++++++-----
> .../freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 22 +++++++++++--------
> 2 files changed, 23 insertions(+), 15 deletions(-)
Believe it or not, but we finally reviewed and applied your patch. I
did rework the Config.in logic though, which I found quite convoluted
in your proposal. You can check the final result at:
https://gitlab.com/buildroot.org/buildroot/-/commit/faf2b8a6277c1a10ca08e5ad8ecb488d70a03de4
Also, the commit message was reworked to better reflect what is
happening: your commit was no longer "fixing" fb support on aarch64,
since it had since then been disabled.
Don't hesitate to give it a test and let me know the result.
Thanks a lot, and again sorry for the delay :/
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-18 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 9:16 [Buildroot] [PATCH v3] package/freescale-imx/imx-gpu-viv: fix aarch64 framebuffer support Lang Daniel via buildroot
2023-05-12 16:07 ` Gary Bisson
2025-05-18 20:43 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.