Qt5 on i.MX6 DO's and DONT's

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qt5 on i.MX6 DO's and DONT's

13,495 Views
FranciscoCarril
Contributor V

Once we started testing the Qt5 framework, we had stumbled into the wall several times. This is a recount of the problems we faced:

  1. Downloading static .tar file
    1. Qt5 is a piece of software that is always getting better, with fixes and  new additions. So a static .tar file limits you to get all these new features.
    2. The GIT version is more flexible and useful, use the GIT.
  2. Configure Line errors
    1. Understand well what are the parameters you want to include in your configure line.  It is supposed that the options are reversible, but some of the options do not seem to work well when deselecting them. So try to understand first why are you including each option.
    2. We made the mistake to try to build Xcb support,  in our gnome distribution the libraries for Xcb and the ones required by Qt5 do not match, since the ltib libraries are outdated. In our Wayland distribution Xcb is not used and in our framebuffer only distributions Xcb should not be selected for obvious reasons. So the configure option -no-xcb should be used.
    3. The no-pch, should be used because if not specified the compiler would try to use precompiled headers which we do not have.
    4. The -no-opengl -opengl es2  option should be used because Qt5 in i.MX is only compatible with OpenGL es2.
    5. The -make libs -make examples -make demos ,  options are needed to generate everything you need to be sure Qt5 was correctly installed.
    6. Select your Crosscompiler, sysroot and prefix correctly.
  3. When installing the libraries will be copied inside the prefix you specified, in your computer and also in the sysroot, which commonly will be a rootfs. So be sure to call this command with sudo since the in the rootfs normally only the root user can write.
  4. Choosing the correct Demos to show:
    1. Qt4 which was broadly used, consisted mostly on C++ programming,  in its latest versions it added support for QML, but this feature was not very famous.  Qt5 for the contrary gets its main advantages from the QML language. Qt5 has added a dedicated scene graph based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. Using a scene graph for graphics rather than the traditional imperative painting systems.
    2. We had the problem when we tried to execute demos that were designed to run in Qt4.x expecting them to work nice on Qt5, some of them designed to run in the PC rather an embedded environment. These demos compiled, but the behavior in the screen was bad.  Most of the demos that had problems used widgets and windowing, which of course in a framebufffer-only distribution will not look good. Running these demos in an embedded windowing system like wayland showed no better results since the demos were designed for PC.
    3. We had our suspicions on the Demos we were trying to build, and a 3rd party confirmed that trying to use those demos was not relevant, and that they should be replaced with others that showed better the capabilities of Qt5.
    4. The demos that should not be used in an embedded environment,  and their replacements:
      1. hellogl_es2  ----------------------------> hellowindow (only in a graphic environment works O, i.e.  X11, Wayland-weston)
      2. 2dpainting ------------------------------> Delete, do not show. The reason to elimiate this demo is that this demo showcases how in Qt4 you could decide wether to use the GPU to render or use software render, in Qt5 the scenegraph is always accelerated with GPU.
      3. textures ---------------------------------> /quick/scenegraph/textureinsgnodequick/scenegraph/textureinsgnode
    5. Demos that really showcase Qt5 advantages and features are:
      1. customgeometry
      2. openglunderqml
      3. simplematerial
      4. shadereffects
  5. Qt5 over Wayland-Weston
    1. Do not use kernels (uImage files) of other distributions, this will cause failure when trying to start Weston.
    2. Always start the Weston User interface before running demos.
    3. When executing a Qt5 demo, use the correct platform i.e.   ./hellowindow -platform wayland-egl.   Failure to do so will execute the demo on framebuffer and since Weston is running this will wreak havoc in the screen.
    4. Make the correct symlinks for the EGL and GAL libraries, failing to do so will throw openGL errors.
      1. Detailed here  https://community.freescale.com/thread/305945


6 Replies

1,873 Views
stavrosmarkou
Contributor II

Hi,

Can anyone use weston/wayland without X on imx6q with qt5? Who can provide the display ?

0 Kudos

1,873 Views
FranciscoCarril
Contributor V

Yes  wayland is possible without X, on imx 6q   qt5.    What do you mean      by who can provide display?

0 Kudos

1,873 Views
stavrosmarkou
Contributor II

Hello,

Can you point me out to a guide or a how to to achieve that ?

Thanks in advance for your help ?

1,873 Views
piyushverma
Contributor I

Hi Francisco,

Any Tutorial to try wayland without X ?

Besides is there any prebuilt rootfs without X but with EGB (FB) & Hardware Accelerated Video Playback?

Regards

PV

0 Kudos

1,873 Views
bonzo
NXP Employee
NXP Employee

Which version of QT5 and the Linux BSP did you use?

Are you able to include the webkit?

0 Kudos

1,873 Views
FranciscoCarril
Contributor V

I was using QT5.1 as I remember.   And we tried  BSP 1.0.0 , and the latest linux 4.0/ Wayland release as well.

I did not try to include the webkit, altough it might be possible if you get all the libICU  libraries correct.

0 Kudos