* [Buildroot] [PATCH] package/qt6/qt6base: don't require gbm for eglfs
@ 2026-09-14 8:21 Fred Lefranc
2026-09-14 8:21 ` [Buildroot] [PATCH 1/1] " Fred Lefranc
0 siblings, 1 reply; 2+ messages in thread
From: Fred Lefranc @ 2026-09-14 8:21 UTC (permalink / raw)
To: buildroot; +Cc: Fred Lefranc
From: Fred Lefranc <fred.lefranc+evs@gmail.com>
Hi all,
While trying to enable Qt 6 with the eglfs eglfs_viv backend on a
32-bit i.MX6 target (imx-gpu-viv, framebuffer output), I hit the
package dependency-chain consistency error, because qt6base pulls in
libgbm/libdrm unconditionally for eglfs even though the Vivante
framebuffer EGL integration needs neither.
The root cause is that qt6base treats GBM as a hard requirement for
*all* of eglfs, whereas GBM/KMS is only needed by the eglfs_kms
backend. This patch decouples the two: eglfs now only requires libegl,
and GBM/KMS support is enabled conditionally when a gbm provider is
available.
Tested:
- i.MX6Q (Cortex-A9, glibc, EABIhf), imx-gpu-viv FB output: qt6base
builds, libqeglfs-viv-integration.so is produced, and a Qt app runs
with -platform eglfs / QT_QPA_EGLFS_INTEGRATION=eglfs_viv.
I wasn't sure whether maintainers prefer keeping a Config.in comment
to explain that eglfs without gbm only provides vendor/fb backends -
happy to add one. Feedback welcome.
Thanks,
Fred
Fred Lefranc (1):
package/qt6/qt6base: don't require gbm for eglfs
package/qt6/qt6base/Config.in | 2 +-
package/qt6/qt6base/qt6base.mk | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/qt6/qt6base: don't require gbm for eglfs
2026-09-14 8:21 [Buildroot] [PATCH] package/qt6/qt6base: don't require gbm for eglfs Fred Lefranc
@ 2026-09-14 8:21 ` Fred Lefranc
0 siblings, 0 replies; 2+ messages in thread
From: Fred Lefranc @ 2026-09-14 8:21 UTC (permalink / raw)
To: buildroot
Cc: Fred Lefranc, Jesse Van Gavere, Roy Kollen Svendsen,
Thomas Petazzoni
From: Fred Lefranc <fred.lefranc+evs@gmail.com>
BR2_PACKAGE_QT6BASE_EGLFS currently has a hard "depends on
BR2_PACKAGE_HAS_LIBGBM", and qt6base.mk unconditionally adds libgbm
and libdrm to QT6BASE_DEPENDENCIES whenever eglfs is enabled. This is
incorrect: GBM is only needed by the eglfs_kms backend. Other eglfs
device integrations, such as the Vivante framebuffer backend
(eglfs_viv) used on 32-bit i.MX6, provide EGL and OpenGL ES without
GBM or DRM.
As a result, eglfs cannot be enabled on i.MX6 (imx-gpu-viv only
provides libgbm on the aarch64/i.MX8 blobs), and forcing it through
triggers the dependency-chain consistency check:
package 'qt6base' has added 'libgbm' to its _DEPENDENCIES variable
without selecting it or depending on it from Config.in.
Make GBM optional for eglfs:
- In Config.in, drop the hard dependency on BR2_PACKAGE_HAS_LIBGBM
and keep only the libegl requirement, which every eglfs backend
needs.
- In qt6base.mk, only pass -DFEATURE_gbm=ON/-DFEATURE_kms=ON and add
libgbm/libdrm to the dependencies when a gbm provider is actually
present (BR2_PACKAGE_HAS_LIBGBM). Otherwise pass
-DFEATURE_gbm=OFF/-DFEATURE_kms=OFF so that the eglfs_kms backend
is simply not built, while eglfs_viv (and other vendor backends)
still are.
This keeps eglfs_kms working unchanged on platforms that do provide
GBM (i.MX8, Raspberry Pi 4, ...) while allowing eglfs to be enabled on
GBM-less platforms such as i.MX6 with the Vivante framebuffer output.
Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
package/qt6/qt6base/Config.in | 2 +-
package/qt6/qt6base/qt6base.mk | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index e6bb99de28..c33e078b15 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -74,7 +74,7 @@ comment "X.org XCB backend available if X.org is enabled"
config BR2_PACKAGE_QT6BASE_EGLFS
bool "eglfs support"
depends on BR2_PACKAGE_HAS_LIBEGL
- depends on BR2_PACKAGE_HAS_LIBGBM
+ depends on BR2_PACKAGE_HAS_LIBGBM || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
depends on BR2_PACKAGE_QT6_GL_SUPPORTS
select BR2_PACKAGE_QT6BASE_OPENGL
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 01661b7f01..5e6cf66f32 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -305,8 +305,16 @@ QT6BASE_CONF_OPTS += -DFEATURE_tslib=OFF
endif
ifeq ($(BR2_PACKAGE_QT6BASE_EGLFS),y)
-QT6BASE_CONF_OPTS += -DFEATURE_egl=ON -DFEATURE_eglfs=ON
-QT6BASE_DEPENDENCIES += libegl libgbm
+QT6BASE_CONF_OPTS += -DINPUT_opengl=es2 -DFEATURE_egl=ON -DFEATURE_eglfs=ON
+QT6BASE_DEPENDENCIES += libegl
+
+# Only pull in GBM/KMS/DRM when a gbm provider actually exists (i.MX8, RPi, etc.)
+ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y)
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=ON -DFEATURE_kms=ON
+QT6BASE_DEPENDENCIES += libgbm libdrm
+else
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=OFF -DFEATURE_kms=OFF
+endif
else
QT6BASE_CONF_OPTS += -DFEATURE_eglfs=OFF
endif
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 8:21 [Buildroot] [PATCH] package/qt6/qt6base: don't require gbm for eglfs Fred Lefranc
2026-09-14 8:21 ` [Buildroot] [PATCH 1/1] " Fred Lefranc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).