具有多层bbappend的Yocto开发映像

时间:2018-10-03 11:05:18

标签: yocto bitbake

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

谢谢! 斯蒂芬

2 个答案:

答案 0 :(得分:0)

我设法通过以下结构来解决它:

/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

答案 1 :(得分:0)

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

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