问题描述
最近我只是使用了 fsl-community-bsp 和 meta-qt5 层来生成交叉工具链和 rootfs.我使用了bitbake meta-toolchain-qt5"和bitbake fsl-image-multimedia-full".fsl-community-bsp 和 meta-qt5 都使用了 jethro 分支.
Recently I just used fsl-community-bsp and meta-qt5 layer to generate the cross toolchain and the rootfs. I used "bitbake meta-toolchain-qt5" and "bitbake fsl-image-multimedia-full". Both fsl-community-bsp and meta-qt5 use jethro branch.
以下是我的一些问题:
- 在我放入riotboard"的rootfs中,qt5库已经在里面了吗?我需要编译qt5的源代码并复制到板子上吗---现在很清楚,库在rootfs里面;
- 我已经设置了 qtcreator:设备、套件、qt 版本、编译器、调试器,还有 ssh 连接,但是当我运行应用程序时,qt 说此应用程序无法启动,因为它无法找到或加载 qt 平台插件 xcb,可用的平台插件是:eglfs、minimum、minimalegl、offscreen".---看来错误是我修复的,修改了PACKAGECONFIG[gles2]="-opengl es2 -eglfs -qpa eglfs,,virtual/libgles2 virtual/egl";
- 在 meta-qt5 的 Jethro 分支中,缺少 qtbase.inc,对吗?我在网上发现,我可以修改PACKAGECONFIG[gles]值,添加-qpa eglfs.---现在进入qtbase_git.bb;
- 我还发现在 Jethro 分支中,serialport 也缺失了,但是在我们的应用中,我们需要这个函数来处理串口键盘.我们现在怎么办?---我现在找到了;
- 如果需要编译qt5源码并将所有文件夹复制到riotboard,如何在qtcreator中设置路径找到相关库?---不需要这样做;
- In the rootfs which I put in the "riotboard", is qt5 library already in it? Do I need to compile the source of qt5 and copy it to the boardseparately?---Now it's clear, the library are inside the rootfs;
- I have set up the qtcreator: device, kit, qt version, compiler, debugger, also ssh connection, but when I run the application, qt says"This application failed to start because it could not find or load the qt platform plugin xcb, available platform plugin are: eglfs, minimal, minimalegl, offscreen".---It seems the error is fixed by me, modifying the PACKAGECONFIG[gles2]="-opengl es2 -eglfs -qpa eglfs,,virtual/libgles2 virtual/egl";
- In the Jethro branch of meta-qt5, the qtbase.inc is missing, correct? I found on the internet, that I can modify the PACKAGECONFIG[gles] value, add –qpa eglfs.---It's into the qtbase_git.bb now;
- I also found that in the Jethro branch, the serialport is also missing, but in our application, we need this function to handle the serial keyboard. How can we do now?---I find it now;
- If I need to compile the qt5 source and copy all the folder to the riotboard, how can I set the path in the qtcreator to find the relevant library?---No need to do this;
非常感谢!
推荐答案
要启用 EGLFS,在 local.conf 中添加:DISTRO_FEATURES_remove = "X11 wayland"
To enable EGLFS, in local.conf add: DISTRO_FEATURES_remove = "X11 wayland"
1.你不需要复制qt5库,你可以按照这个wandboard qt5 implementation here
1.You do not need to copy the qt5 library, you could follow this wandboard qt5 implementation here
在你的机器上,你需要启用Qt来运行eglfs平台,在
/etc/profile
中,添加export QT_QPA_PLATFORM=eglfs
或者当你运行一个应用;你需要添加-platform eglfs
.IE.helloworld -platform eglfs
In your machine, you need to enable Qt to run eglfs platform, in
/etc/profile
, addexport QT_QPA_PLATFORM=eglfs
or when you run an application; you need to add-platform eglfs
. ie.helloworld -platform eglfs
没有qtbase.inc;您可以添加 PACKAGECONFIG_append_pn-qtbase = " eglfs xx xxx xxxx"
以启用您需要的配置
There is no qtbase.inc; You could add PACKAGECONFIG_append_pn-qtbase = " eglfs xx xxx xxxx"
to enable the configuration you need
有qtserialport_git.bb 在 Jethro 中
There is qtserialport_git.bb in Jethro
如前所述,您不复制库和源代码,而是告诉 Bitbake 为您做这些.它们将被移动到相应的位置.
As said, you do not copy the libraries and sources but instead tell Bitbake to do that for you. They will be moved to the corresponding places.
这篇关于如何在 Yocto 设置中启用 eglfs 插件?为 Riotboard 使用 yocto+meta-qt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!