How can I run a Qt5.7 FB example on i.MX6DL

Showing results for 
Search instead for 
Did you mean: 

How can I run a Qt5.7 FB example on i.MX6DL

Contributor IV

I'm attempting to come up with a modern Qt (5.6/5.7/5.8) example running on my hardware, which is a custom board with an i.MX6DL loosely based on the SABRE SD design. My goal is to display without a specific built in windowing system (e.g. no Wayland) but to use the FrameBuffer via. EGLFS.

I have downloaded the OpenEmbedded layers NXP suggests for the SABRE, including the meta-fsl-bsp-release which includes a Qt5 sample image ( however I have two problems with this:

1) This appears to be based on X11 or Wayland windowing, which I'd like to avoid

2) The branch is based on an older Qt5.5 version

In an effort to achieve my desired results I have started with a core-image and added in the Qt packages noted in the recipe from the meta-fsl-bsp-release layer, after pulling a new meta-qt5 version based on Krogoth (Qt5.6). I have also explicitly removed "x11" and "wayland" in an effort to force the framebuffer to run directly (which I understand EGLFS is the default for).

Here's my recipe:

require recipes-core/images/

IMAGE_INSTALL += 'qtbase qtbase-examples qtbase-fonts qtbase-plugins'
IMAGE_INSTALL += 'cinematicexperience openssh-sftp-server'

DISTRO_FEATURES_remove ='x11 wayland'

My questions at this point:

1) Should this work? (It's currently, slowly, building on a VM so feedback would be helpful)

2) Are there are pieces I'm missing that the core-image-base won't have?

3) Are there any examples of Qt running on the framebuffer using EGLFS on a i.MX6Q/DL part? I haven't found any yet.

0 Kudos
3 Replies

Contributor IV

The build failed due to being unable to find qtbase-examples, after I removed that and started the build again it completed successfully. I flashed the resultant image onto my board and attempted to run the Qt5_CinematicExperience on EGLFS, but it seems to be bombing on something:

root@imx6dlicomv2cib:~# Qt5_CinematicExperience -platform eglfs
QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
 If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
Unable to query physical screen size, defaulting to 100 dpi.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
EGL Error : Could not create the egl surface: error = 0x3003

I have not yet identified what this error means, but I'm thinking something must be incorrectly configured, or that I missed a required step in the recipe. Any input would be helpful.

0 Kudos

Contributor IV

A few updates, I've viewed the log.do_configuration for this recipe and noted that EGLFS/EGLFS i.MX6 seems to be supported:


  QPA backends:
      DirectFB ............. no
      EGLFS ................ yes
          EGLFS i.MX6 ........ yes
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... no
          EGLFS GBM .......... no
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... no
      LinuxFB .............. no
      Mir client............ no
      XCB .................. no


The error appears to come from plugins/platforms/eglfs/qeglfswindow.cpp in the QEglFSWindow::create() function

when "m_surface" comes back as EGL_NO_SURFACE and the error code of 0x3003 maps to "EGL_BAD_ALLOC".

I've exported QT_HASH_SEED=1, QML_IMPORT_TRACE=1, and QT_DEBUG_PLUGINS=1 but haven't found any incriminating messages in the extra debug so far. 

0 Kudos

NXP TechSupport
NXP TechSupport

Hello Michael Worster,

My apologies for the delay.

Information on Qt for the BSP Release and Community BSP is a bit limited and the current implementation of Qt5 is X11 dependent so we can’t provide support for this configuration.

However, Qt is very flexible and you should be able to run Qt trough X11, Wayland or from the framebuffer. EGLS is intended to run Qt without X11 or Wayland and it supports OpenGL ES2.0. Perhaps the following community document may be of help as it provides some guidelines (although very general and not focused on Yocto). Please look especially at point 2.4 as it’s EGLFS related.

I hope this helps!


0 Kudos