Yocto Qt5 GUI App not running on RPi3
-
wrote on 21 Mar 2024, 04:13 last edited by
Hi All,
I have build a "rpi-test-image" using Yocto dunfell with the meta-openembedded, meta-raspberrypi, meta-qt5 layers and following settings in my local.conf file
MACHINE ?= "raspberrypi3"
IMAGE_INSTALL_append = " qt3d qt5-plugin-generic-vboxtouch qtbase qtcharts qtconnectivity qtdatavis3d qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver"
Now I setup meta-toolchain-qt5 and using Qt creator I created a very basic Qt Quick Application (compat) with the following settings,
in .pro file;
Default rules for deployment.
target.path=/home/root
INSTALLS += targetQMAKE_LFLAGS=--sysroot=/opt/poky/sdk_rpi/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi
Now when I run this app in my RPi3 the GUI does not pop-up, I am getting the following error,
then I exported the following environment variables,
export QT_QPA_PLATFORMTHEME=qt5ct
export DISPLAY=:0.0
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=offscreen
export XDG_RUNTIME_DIR=/var/volatile/tmp/runtime-rootthen I got the following error,
I think it is OpenGL error, please tell me how to solve this problem, I am in a great need of it.
Thanks -
Hi All,
I have build a "rpi-test-image" using Yocto dunfell with the meta-openembedded, meta-raspberrypi, meta-qt5 layers and following settings in my local.conf file
MACHINE ?= "raspberrypi3"
IMAGE_INSTALL_append = " qt3d qt5-plugin-generic-vboxtouch qtbase qtcharts qtconnectivity qtdatavis3d qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver"
Now I setup meta-toolchain-qt5 and using Qt creator I created a very basic Qt Quick Application (compat) with the following settings,
in .pro file;
Default rules for deployment.
target.path=/home/root
INSTALLS += targetQMAKE_LFLAGS=--sysroot=/opt/poky/sdk_rpi/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi
Now when I run this app in my RPi3 the GUI does not pop-up, I am getting the following error,

then I exported the following environment variables,
export QT_QPA_PLATFORMTHEME=qt5ct
export DISPLAY=:0.0
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=offscreen
export XDG_RUNTIME_DIR=/var/volatile/tmp/runtime-rootthen I got the following error,
I think it is OpenGL error, please tell me how to solve this problem, I am in a great need of it.
Thankswrote on 21 Mar 2024, 06:01 last edited by@aashishqt i think your image does not have the window manager of xcb, that is probably why you don't see the gui.Try to build a core-image-sato and test again with -platform xcb
Moreover Try to add eglfs plugin and linuxfb in your build to test.Forget about offscreen only try with eglfs, xcb, linuxfb or vnc
-
@aashishqt i think your image does not have the window manager of xcb, that is probably why you don't see the gui.Try to build a core-image-sato and test again with -platform xcb
Moreover Try to add eglfs plugin and linuxfb in your build to test.Forget about offscreen only try with eglfs, xcb, linuxfb or vnc
wrote on 22 Mar 2024, 10:02 last edited by@Ronel_qtmaster Great thanks I built core-image-sato and used QT_QPA_PLATFORM=xcb and I got the GUI. Thanks
Now I want to know that how to add eglfs plugin and linuxfb in my build.
-
@Ronel_qtmaster Great thanks I built core-image-sato and used QT_QPA_PLATFORM=xcb and I got the GUI. Thanks
Now I want to know that how to add eglfs plugin and linuxfb in my build.
wrote on 22 Mar 2024, 10:31 last edited by@aashishqt You're welcome
to enable eglfs, in your local.conf add
DISTRO_FEATURES_remove = "X11 wayland"
then in qtbase_%.bbappend add
PACKAGECONFIG_append = " eglfs"qtbase_%.bbappend is found in meta-qt5 under recipes-qt, qt5 folder.
1/4