带有多层 bbappend 的 Yocto 开发图像

Yocto development image with bbappend in multiple layers

我正在写一个图像描述,我想附加到多个图层上 一个 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
...

知道如何完整 inherit/include 整个基础图像,包括它的所有 bbappends 吗?!

谢谢! 斯特凡

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

/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

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

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