【问题标题】:Yocto development image with bbappend in multiple layers带有 bbappend 多层的 Yocto 开发映像
【发布时间】:2018-10-16 23:30:34
【问题描述】:

我正在编写一个图像描述,我想将它附加到多个图层上 一个 bsp 层、一个安全层和一个应用层。

在 bsp 中:我有 image.bb 和 image-dev.bb

require image.bb

在其他层我有 image.bbappend 和 image-dev.bbappend

require image.bbappend 

确实会导致错误:

ERROR: ParseError in .../sources/meta-application/recipes-core/images/image.bbappend: not a BitBake file

当我构建 image 时,image.bb 和所有 image.bbappend 中的包都存在

当我构建 image-dev 时,image.bb、image-dev.bb 和所有 image-dev.bbapend 中的东西都存在 不是 image.bbappend 中的包强>

bitbake -e image-dev 产量:

# $IMAGE_INSTALL [21 operations]
#   set .../sources/poky/meta/conf/documentation.conf:212
#     [doc] "Specifies the packages to install into an image. Image recipes set IMAGE_INSTALL to specify the packages to install into an image through image.bbclass."
#   set .../sources/poky/meta/recipes-core/images/core-image-minimal.bb:3
#     "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
#   set? .../sources/poky/meta/classes/core-image.bbclass:70
#     "${CORE_IMAGE_BASE_INSTALL}"
#   set? .../sources/poky/meta/classes/image.bbclass:70
#     ""
#   set .../sources/poky/meta/classes/image.bbclass:71
#     [type] "list"
#   _append .../sources/meta-bsp/recipes-core/images/image.bb:32
...
#   _append .../sources/meta-bsp/recipes-core/images/image-dev.bb:38
...
#   _append .../sources/meta-application/recipes-core/images/image-dev.bbappend:24
...
#   _append .../sources/meta-my-security/recipes-core/images/image-dev.bbappend:14
...

知道如何完全继承/包含整个基础映像,包括它的所有 bbappends 吗?!

谢谢! 斯蒂芬

【问题讨论】:

  • 检查你的image.bbappend文件的文件夹名称是否添加到bblayers.conf文件中。
  • 试试这个命令 "bitbake-layers show-appends" 并检查你的 image.bbappend 文件是否在 image.bb 下
  • 您是否正确操作IMAGE_INSTALL 变量?还要检查bitbake -e image-dev 的输出并检查适当的变量和赋值过程。
  • bbappend 文件用于 IMAGE_INSTALL 的 image 和 image-dev 我更新了原始问题
  • 如果您有image.bbappend,则内容已附加到image.bb 文件中。所以没有理由需要.bbappend 文件。如果您想包含/要求来自不同层的文件,请在 oe 中使用完整路径,即require recipes-core/images/image.inc。你能测试一下吗?

标签: yocto bitbake


【解决方案1】:

我设法用以下结构解决了它:

/meta-bsp/recipes-core/images/image.bb
    ... base packages

/meta-bsp/recipes-core/images/image-dev.bb
    ... development packages (like vim/htop/tree...)



/meta-application/recipes-core/images/image.inc
    ... application packages

/meta-application/recipes-core/images/image.bbappend
    require image.inc

/meta-application/recipes-core/images/image-dev.bbappend
    require image.inc
    ... application testing programms



/meta-my-security/recipes-core/images/image.inc
    security packages

/meta-my-security/recipes-core/images/image.bbappend
    require image.inc

/meta-my-security/recipes-core/images/image-dev.bbappend
    require image.inc
    .. security testing packages

【讨论】:

    【解决方案2】:

    从文件image-dev.bbappend 中删除require image.bbappend

    image-dev.bbappend 中不需要image.bbappendimage.bb 已经包含来自 image.bbappend 文件的配置。所以在image-dev.bb 文件中添加require image.bb 就足够了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-11
      • 2020-09-30
      • 1970-01-01
      • 1970-01-01
      • 2018-01-02
      • 2017-01-01
      • 1970-01-01
      相关资源
      最近更新 更多