Moving From Boot2Qt to Yocto with meta-qt6
-
Hello!
We are using a Verdin i.MX8M Plus target device and are cross compiling on a Windows 10 machine with Qt Creator.
During development, we had used Boot2Qt on the target device. We had no issues at all. Connecting to the target, debugging, and deploying was extremely easy and straight forward.
Now that we are approaching production, we are looking to customize our image a bit more. So, we are trying to move from Boot2Qt on the target device to a Yocto build with the meta-qt6 layer. I'm using a "multimedia reference image" from our SOM manufacturer, Toradex. The reference image includes Weston/Wayland, but I've also included EGLFS since this is what Boot2Qt uses. I've successfully built the Yocto image with the Qt6 meta layer and installed it on the target device.
To make things easier, I am attempting to keep the compiler/kit the same within Qt Creator. So, I'm using the same kit that we were using with Boot2Qt. I took the same project that was running on Boot2Qt and switched to a Release build. I then took the binary and attempted to run on the custom Yocto image by launching the application through the Wayland terminal (./helloworld -platform eglfs). I can see that the application starts because a bunch of our QDebug messages are printed out in the terminal. However, before the GUI loads, I get the following errors:
QEGLPlatformContext: Failed to create context: 3004
QRhiGles2: Failed to create temporary context
QEGLPlatformContext: Failed to create context: 3004
QRhiGles2: Failed to create context
Failed to create RHI (backend 2)
Failed to create QRhi on the render thread; scenegraph is not functional
Failed to initialize graphics backed for OpenGL
AbortedI'm not quite sure what's going wrong. I believe my custom image is using OpenGL desktop while Boot2Qt uses GLES2, but from what I understand, GLES2 is a subset of OpenGL, so I don't think that should be an issue.
Any help is appreciated! Thanks!
-
You cannot run both Weston and Qt app with eglfs at the same time.
You can run the Qt app in the Weston by starting the it with '-platform wayland' arguments.
Otherwise, you need to first stop weston and then launch Qt app with '-platform eglfs' arguments.