我想使用 Yocto 构建一个映像,以便在 Raspberry Pi 4B 上运行一个简单的 Qt6 小部件应用程序。我使用
bitbake core-image-minimal
构建了一个图像,但它似乎被剥离以运行 weston 和我的 Qt 应用程序(已成功烘焙到图像中)。它没有启动到 GUI,我无法运行我的 Qt 应用程序,也无法启动 weston。
(我正在使用 VirtualBox 和运行 Linux Mint 的虚拟机。我知道,它没有使用 Yocto 进行测试,因此,也许我应该更改为 Ubuntu...)
我现在的第一次尝试是使用
bitbake core-image-weston
构建图像。我已将以下行添加到 conf/local.conf
文件
IMAGE_INSTALL += "qtexample"
DISTRO_FEATURES:append = "wayland"
IMAGE_INSTALL:append = "qtbase qtwayland"
CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
其中
IMAGE_INSTALL += "qtexample"
应该将我的 Qt6 应用程序烘焙到图像中。 Qt6 层、meta-openembedded/meta-oe
和 meta-openembedded/meta-python
以及 RasPi BSP 包含在 conf/bblayers.conf
中。
但是,当我运行
bitbake core-image-weston
时,我收到错误:
ERROR: Nothing RPROVIDES 'matchbox-terminalqtexampleqtbase' (but /home/bkeohane/Projekte/yocto/poky/meta/recipes-graphics/images/core-image-weston.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'matchbox-terminalqtexampleqtbase' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['matchbox-terminalqtexampleqtbase']
ERROR: Required build target 'core-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-weston', 'matchbox-terminalqtexampleqtbase']
我发现,存在一个
matchbox-terminal
食谱所在的目录matchbox-terminal_0.2.bb
,并将其从poky/meta/recipes-sato
复制到poky/meta/recipes-graphics
,因为我假设它应该位于那里,以便包含在构建过程。
重新运行构建后,错误发生了一些变化:
ERROR: Nothing RPROVIDES 'qtexampleqtbase' (but /home/bkeohane/Projekte/yocto/poky/meta/recipes-graphics/images/core-image-weston.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'qtexampleqtbase' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['qtexampleqtbase']
ERROR: Required build target 'core-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-weston', 'qtexampleqtbase']
错误不再包含
matchbox-terminal
。但是,依赖错误仍然存在,我不知道为什么。
在
poky/meta/recipes-graphics/images/core-image-weston.bb
中,我无法识别缺少的依赖项:
SUMMARY = "A very basic Wayland image with a terminal"
IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs weston"
LICENSE = "MIT"
inherit core-image
CORE_IMAGE_BASE_INSTALL += "gtk+3-demo"
CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
QB_MEM = "-m 512"
我感谢任何提示或提示。干杯。
各位新年快乐!
我在原帖中问题的答案可以通过在
qtexample
前面添加一个空格来解决,因此:
IMAGE_INSTALL += " qtexample"
DISTRO_FEATURES:append = "wayland"
IMAGE_INSTALL:append = "qtbase qtwayland"
CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
我现在更加了解如何解析 yocto 中的食谱,即使用命令作为纯字符串。
谢谢大家!
干杯。