Yocto Dunfell 在单个自定义元层中使用多台机器出现错误“无可用配方" [英] Yocto Dunfell error 'No recipes available for' with multiple machines in single custom meta layer

查看:60
本文介绍了Yocto Dunfell 在单个自定义元层中使用多台机器出现错误“无可用配方"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我维护了一个与 Dunfell 兼容的自定义 Yocto 元层.它支持基于 Microchip SAMA5D27 处理器的开发板.我在这一层中有几个 bbappend 文件,它们仅适用于来自 meta-atmel 和其他 Microchip 特定封装的文件.

I maintain a custom Yocto meta layer compatible with Dunfell. It supports a Microchip SAMA5D27 processor based board. I have several bbappend files in this layer that apply only to file from the meta-atmel and other Microchip specific packages.

现在,我想重用这个自定义元层的许多部分,并支持来自不同供应商的新处理器.我在我的层中创建了自己的新图像配方,其中不包含这些仅与 Microchip 相关的 bbappend 文件.

Now, I want to re-use many parts of this custom meta layer and support a new processor from a different vendor. I have created my own new image recipe in my layer that does not include these bbappend files that are only relevant to Microchip.

问题是 Yocto 抛出关于我的 bbappend 文件的错误没有可用的食谱".错误似乎是在解析过程中发生的,并没有考虑我在当前目标中是否使用了配方.

The problem is that Yocto throws as error 'No recipes available for' regarding my bbappend files. The error seems to happen during parsing and does not consider whether I use the recipe or not in the current target.

我已经广泛搜索了解决方案,但到目前为止还没有找到.如何使用 1 个元层并维护不同的 bbappend 文件,同时能够为不同的目标构建切换 MACHINE 变量?谢谢!

I have searched extensively for a solution, but so far have come up empty. How can I use 1 meta-layer and maintain different bbappend files, while being able to switch MACHINE variables for different target builds? Thanks!

Bitbake 版本:

Bitbake Version:

root@buildmachine:/$ bitbake --version
BitBake Build Tool Core version 1.46.0

我尝试在这些 bbappend 文件中使用 COMPATIBLE_HOST 和 COMPATIBLE_MACHINE 变量,但错误仍然存​​在.

I have tried to use the COMPATIBLE_HOST and COMPATIBLE_MACHINE variables in these bbappend files, but the error remains.

# Only compatible with sama5d27 microchip
COMPATIBLE_HOST = "arm-poky-linux-musleabi"
COMPATIBLE_MACHINE = "sama5d27-wlsom1-ek-sd"

错误输出:

root@buildmachine:~/Desktop/compulab/build-cmdline$ MACHINE=iot-gate-imx8 bitbake iot-gate-imx8-image
WARNING: Host distribution "ubuntu-20.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#######################################################################################################################################################| Time: 0:00:01
Loaded 4938 entries from dependency cache.
ERROR: No recipes available for:
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/at91bootstrap/at91bootstrap_3.10.0.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/dt-overlay-at91/dt-overlay-at91_git.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/libubootenv/libubootenv_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/u-boot/u-boot-at91_2020.01.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-core/initrdscripts/initramfs-debug_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-httpd/nginx/nginx_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-kernel/linux/linux-at91_5.4.bbappend

推荐答案

您发现的问题是当您切换到另一个时,Yocto 无法将 .bbappend 文件与任何配方匹配机器.

The issue as you've discovered is that Yocto is unable to match the .bbappend files to any recipes when you switch to another MACHINE.

只有在启用特定层时,您才能通过有条件地包含 .bbappend 文件来解决问题.Yocto 通过 BBFILE_DYNAMIC 支持这一点变量.

You can solve the problem by conditionally including your .bbappend files only if particular layers are enabled. Yocto supports this through the BBFILE_DYNAMIC variable.

例如,如果您将 .bbappend 文件保存在您自己层内的 dynamic-layers/meta-atmel 文件夹中,并且您只想包含那些 .bbappend 文件,如果 meta-atmel 正在使用中,则将以下内容添加到您的 layer.conf 中:

For instance, if you keep your .bbappend files in the dynamic-layers/meta-atmel folder within your own layer, and you only want to include those .bbappend files if meta-atmel is in use, then add the following to your layer.conf:

BBFILES_DYNAMIC += "\
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*.bbappend \
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*/*.bbappend \
"

(根据需要调整路径/文件夹深度).

(adjust paths / folder depth as appropriate).

这表示如果 meta-atmel 包含在层列表中,则将两个 dynamic-layers/... 路径添加到搜索路径中.

This says that if meta-atmel is included in the list of layers, then add the two dynamic-layers/... paths to the search path.

这篇关于Yocto Dunfell 在单个自定义元层中使用多台机器出现错误“无可用配方"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆