This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: AM3358: Yocto meta-qt5 with eglfs

Part Number: AM3358

Hi,

We are trying to build qt5.15.2 with eglfs and opengl es2 without wayland and xl11 using yocto .

Added below in conf:

DISTRO_FEATURES_append = " opengl"

DISTRO_FEATURES_remove = "x11 wayland"
Added below in qtbase_git.bbappend:
PACKAGECONFIG[gold-linker] = "-use-gold-linker,-no-use-gold-linker"
PACKAGECONFIG[sql-plugin-sqlite] = "-system-sqlite -plugin-sql-sqlite,-no-sql-sqlite,sqlite3"
PACKAGECONFIG[qml-debug] = "-qml-debug,-no-qml-debug"
PACKAGECONFIG[qreal-float] = "-qreal float,"
PACKAGECONFIG += "gles2"
PACKAGECONFIG_append= "eglfs sql-plugin-sqlite freetype fontconfig icu accessibility glib harfbuzz pcre qreal-float tslib"
PACKAGECONFIG_remove = "xcb linuxfb pulseaudio tools iconv alsa dbus gold-linker evdev openssl"
However, it throws below errors after building qtbase through yocto:
.../../../../git/config.tests/unix/opengles2/opengles2.cpp:38:25: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.

Makefile:177: recipe for target 'opengles2.o' failed
make: *** [opengles2.o] Error 1

Makefile:177: recipe for target 'opengles2.o' failed
make: *** [opengles2.o] Error 1
OpenGL ES 2.0 disabled.

It uses https://github.com/meta-qt5/meta-qt5 with the above changes in conf and qtbase_git.bbappend.
Any thoughts on how to resolve the same if we need to add any includes or any changes in bbappend?
  • Hello,

    We have not tested Qt5.15 and currently, we only support Yocto Project: Thud and Qt5.11.

    Regards,
    Krunal

  • Hello Krunal,

    Thanks for your quick response.

    Does it supports Qt 5.6.3 Yocto Project: Rocko with eglfs and without x11,wayland and linuxfb as we would like to use QtQuick and QtQuickControls for QML application with opengl es2?

    We tested Qt 5.6.3 Yocto Project: Rocko with linuxfb which works fine for Qt C++ widgets.

    Best Regards,

    Ramakanth

  • Hello Ramakanth,

    I recommend reviewing the following release, it has Qt5.11 and Kernel 4.19 support. If you have a TI EVM, you could compile and launch various Qt applications with the eglfs plugin. It is also possible to build a filesystem without Wayland and X11 components.

    Regards,
    Krunal

  • Hello Krunal,

    Could you please provide reference documentation of meta-ti and meta-qt5 layers changes to be made to ensure Qt 5.11 working with yocto project with eglfs plugin without x11 and wayland and opengl es2 enabled?

    Though I enabled opengl in the distro conf and added changes in qtbase.bbappend, the corresponding Qt Quick modules and Qt opengl module are not being built.

    Best Regards,

    Ramakanth

  • Hello Krunal,

    Thanks for your quick response.

    I tried to build applications with the eglfs plugin with the changes added in DISTRO_FEATURES_append = " opengl" and DISTRO_FEATURES_remove = " wayland x11". However, it is not running with accelerated rendering since it brings mesa when opengl is added. Am not sure if am missing to include opengl provider with ti-sgx-ddk-um in distro conf. If so, please suggest the changes.

    Am using below environment variables before running QtQuick Application or gallery example application in QtQuickControls2:

    export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0
    export QT_QPA_PLATFORM=eglfs
    export TSLIB_PARAMETERS=rotate=90:mode=640x480

    export QT_QPA_EGLFS_ROTATE=90

    Best Regards,

    Ramakanth

  • The error being thrown is as below:

    loaded library "/usr/lib/qt5/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so"
    EGL_EXT_device_base missing
    Aborted

  • Hello,

    Is there a specific application that you are running and how are you checking the acceleration part? I am wondering if you could please share more information about the app. Also, is it possible for me to download the app from Qt?

    Regards,

    Krunal

  • Hello,

    Am running https://doc.qt.io/archives/qt-5.11/qtquickcontrols2-gallery-example.html which tests all the qtquickcontrols2 and ending up getting below error:

    gbm: failed to open any driver (search paths /usr/lib/dri)
    gbm: Last dlopen error: /usr/lib/dri/tilcdc_dri.so: cannot open shared object file: No such file or directory
    failed to load driver: tilcdc
    gbm: failed to open any driver (search paths /usr/lib/dri)
    gbm: Last dlopen error: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory
    failed to load driver: kms_swrast
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    Failed to move cursor on screen LVDS1: -14
    Cannot find EGLConfig, returning null config
    QEGLPlatformContext: Failed to make temporary surface current, format not updated (3009)

    Though the application display is shown, there is a lag in UI which shows cpu usage of 90% for a few controls(which falls back to opengl mesa software rendering) after debugging the same setting below environment variables

    export QT_DEBUG_PLUGINS=1
    export QT_QPA_EGLFS_DEBUG=1

    Can you let me know if there is a dedicated GPU in AM3358 which would run the above example with eglfs platform plugin and hardware accelerated rendering?

    Best Regards,

    Ramakanth

  • Hello Krunal,

    After enabling the TI SGX accelerated graphics without wayland and x11, am running into below issues on running the qml application:

    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    Could not initialize egl display
    Best Regards,
    Ramakanth
  • Hello Ramakanth,

    In your DT file, is the SGX node enabled and could you please share your DTB file?

    Regards,
    Krunal

  • Hello Krunal,
    Thanks for your response. yes SGX node is enabled.
    pvrsrvkm.ko module fails to load at startup due to the drm_legacy_mmap error.
    Here is the latest dmesg error:

    dmesg | grep pvr
    [ 5.748128] pvrsrvkm: loading out-of-tree module taints kernel.
    [ 5.771686] pvrsrvkm: Unknown symbol drm_legacy_mmap (err 0)
    [ 13.666245] pvrsrvkm: Unknown symbol drm_legacy_mmap (err 0)
    [ 14.613104] pvrsrvkm: Unknown symbol drm_legacy_mmap (err 0)
    Best Regards,
    Ramakanth
  • Here is the content of dts file:

    #include "am33xx.dtsi"
    ....
    &sgx {
    status = "okay";
    };
  • Hello,

    Could you please share how you are building the GPU libraries?

    Regards,
    Krunal

  • Hello,

    Am building the whole yocto BSP build and downloading the same to the target.

    In the yocto machine conf, below is being set for building gpu libraries:

    require conf/machine/include/ti33x.inc
    ...
    PACKAGECONFIG_append_pn-qtbase = " eglfs kms gbm"
    IMAGE_INSTALL_append = " ti-sgx-ddk-km ti-sgx-ddk-um libdrm"
    DEPENDS_remove = "virtual/libgl"
    PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um"
    PREFERRED_PROVIDER_virtual/libgles1 = "ti-sgx-ddk-um"
    PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
    PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
    Let me know if am missing anything in the yocto configuration for the error being thrown in this regard.
    Best Regards,
    Ramakanth
  • Hi,

    Can you let me know if the Qt 5.11.3 works on TI AM3358(integrated gpu) with accelerated graphics running QtQuick2 application without any cpu load issues as you tested? Also the Qt Quick2 example that you are using to test the same.

    Not sure about the reason why we are getting the error after enabling the SGX node..

    Appreciate your help in this regard.

    Best Regards,

    Ramakanth

  • Hello Ramakanth,

    Unfortunately, QtQuick2 is not enabled by default in our SDK. We do not enable all the modules that Qt supports but through Yocto it is possible to enable additional modules. I think we should first address your GPU errors and my recommendation is to try the current SDK that is available on ti.com. Here is the link: https://software-dl.ti.com/processor-sdk-linux/esd/AM335X/06_01_00_08/index_FDS.html. For testing purposes, I would take the default filesystem and modify the device tree files to match your board specifications. Please keep in mind that currently we only enabled Qt5.11 and we only support  Kernel4.19. If that filesystem works and you are able to run Qt applications, we can go to next steps of disabling Weston/X11 and adding additional Qt modules. 

    Regards,
    Krunal

  • Hello Krunal,

    We could try using TI sdk but we might need to customize the components. We will try TI sdk for testing purpose but would eventually need to support SGX via yocto for commercial use.

    Hence, can you share the build instructions to install the TI sdk and how to customize the sdk as well as build the TI BSP?

    Since we are already verifying with Yocto, it would be helpful if you can share the link to the yocto thud project that TI verified with SGX enabled?

    Best Regards,

    Ramakanth

  • Hello Krunal,

    Below is the error on running QtQuick example application:

    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    Could not initialize egl display
    Aborted

    Best Regards,

    Ramakanth

  • Hello Ramakanth,

    Could you please share your boot logs and the dtb file?

    Regards,
    Krunal