简体   繁体   English

Yocto:完全忽略 bbappend

[英]Yocto: completely ignore bbappend

I am developing a multiplatform project, so it is a mix of different boards with appropriate meta layers.我正在开发一个多平台项目,因此它是具有适当元层的不同板的混合。 My meta image layer contains some bbappend recipes that are board specific although I would like to stick to single image layer repository rather than having image layer repository for each board.我的元图像层包含一些特定于板的 bbappend 配方,尽管我想坚持使用单个图像层存储库而不是每个板都有图像层存储库。

So is there any way to completely hide/ignore/disable specific bbappend files?那么有没有办法完全隐藏/忽略/禁用特定的 bbappend 文件?

Example: I have bblayers for var-som-* boards.示例:我有用于 var-som-* 板的 bblayers。 For such boards I have recipes-kernel/linux-variscite_%.bbapend , so building for var-som-* boards is fine, but problem happens when I build for example for raspberry.对于这样的板,我有recipes-kernel/linux-variscite_%.bbapend ,所以为 var-som-* 板构建是好的,但是当我为树莓构建时会出现问题。 Having variscite layer (as well as all freescale set) adds a lot of things to the image I don't want, so I am removing variscite and freescale layers and it creates No recipes available for: recipes-kernel/linux-variscite_%.bbappend error.拥有 variscite 层(以及所有飞思卡尔集)为图像添加了很多我不想要的东西,所以我正在删除 variscite 和飞思卡尔层,它创建了No recipes available for: recipes-kernel/linux-variscite_%.bbappend错误。

Luckily this question has already been answered: Yocto Dunfell error 'No recipes available for' with multiple machines in single custom meta layer幸运的是,这个问题已经得到了回答: Yocto Dunfell 错误“No recipes available for”在单个自定义元层中的多台机器

So for those, who faced the same problem here is quick summary:所以对于那些在这里遇到同样问题的人来说,快速总结一下:

  1. Within your image meta repository create a folder structure that DOES NOT match BBFILES directive.在您的图像元存储库中创建一个与 BBFILES 指令不匹配的文件夹结构。
  2. Move your .bbappend recipes there.将您的 .bbappend 食谱移到那里。
  3. Include recipes on per-meta-layer basis using BBFILES_DYNAMIC directive.使用 BBFILES_DYNAMIC 指令在每个元层的基础上包含配方。

Example:例子:

# thats default and commonly used way to import recipes from your image
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
            ${LAYERDIR}/recipes-*/*/*.bbappend"

# "hide" recipes "deeper" within folder structure 
# so they won't be included by ${LAYERDIR}/recipes-*/*/*.bbappend
# 
BBFILES_DYNAMIC += "\
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*.bbappend \
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*/*.bbappend \
"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM