Yocto development image with bbappend in multiple layers

落爺英雄遲暮 提交于 2019-12-11 15:43:25

问题


I am writing an image description which I want to append on multiple layers a bsp layer, a security layer and an application layer.

in bsp: I have image.bb and image-dev.bb with

require image.bb

on the other layers I have image.bbappend and image-dev.bbappend

require image.bbappend 

does causes the error:

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

When I build image the packages in image.bb and all image.bbappend are present

When I build image-dev the stuff in image.bb, image-dev.bb and all the image-dev.bbapend is present Not the packages from image.bbappend

bitbake -e image-dev yields:

# $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
...

Any idea how to fully inherit/include the entire base image including all it's bbappends?!

Thank you! Stefan


回答1:


I managed to solve it with the following structure:

/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:


Remove require image.bbappend from file image-dev.bbappend

There is no need to require image.bbappend in image-dev.bbappend. image.bb already contains configurations from image.bbappend file. so adding require image.bb in image-dev.bb file is sufficient



来源:https://stackoverflow.com/questions/52625668/yocto-development-image-with-bbappend-in-multiple-layers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!