[Buildroot] libqeglfs.so not found on imx6

Fabio Estevam festevam at gmail.com
Sat Mar 4 19:41:21 UTC 2017


On Sat, Mar 4, 2017 at 11:47 AM, Fabio Estevam <festevam at gmail.com> wrote:
> Hi Gary,
>
> On Sat, Mar 4, 2017 at 9:33 AM, Fabio Estevam <festevam at gmail.com> wrote:
>
>> Not yet, still stuck at the "drmModeGetResources failed" error.
>
> I can also get this same error with the new kmscube package from:
> https://cgit.freedesktop.org/mesa/kmscube/log/
>
> # kmscube
> drmModeGetResources failed: Invalid argument
> failed to initialize legacy DRM
>
> It works if I explicitly pass the /dev/dri device:
>
> kmscube -D /dev/dri/card1
>
> I think QT5 is trying to access /dev/dri/card0, but it should be using
> /dev/dri/card1 instead.

Yes, this is the problem.

If I do an ugly hack like this:

--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsdevice.cpp
@@ -344,7 +344,7 @@ bool QEglFSKmsDevice::open()
     Q_ASSERT(m_gbm_device == Q_NULLPTR);

     qCDebug(qLcEglfsKmsDebug) << "Opening device" << m_path;
-    m_dri_fd = qt_safe_open(m_path.toLocal8Bit().constData(), O_RDWR
| O_CLOEXEC);
+    m_dri_fd = qt_safe_open("/dev/dri/card1", O_RDWR | O_CLOEXEC);
     if (m_dri_fd == -1) {
         qErrnoWarning("Could not open DRM device %s", qPrintable(m_path));
         return false;
-- 
2.7.4

Then the demo is launched. It still do not run very well, but at least
it starts.

Does anyone have an idea on what would be a proper fix?

Thanks


More information about the buildroot mailing list