简体   繁体   English

具有多层bbappend的Yocto开发映像

[英]Yocto development image with bbappend in multiple layers

I am writing an image description which I want to append on multiple layers a bsp layer, a security layer and an application layer. 我正在写一个图像描述,我想在bsp层,安全层和应用程序层的多层上附加。

in bsp: I have image.bb and image-dev.bb with 在bsp中:我有image.bb和image-dev.bb

require image.bb

on the other layers I have image.bbappend and image-dev.bbappend 在其他层上,我有image.bbappend和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 当我构建映像时 ,存在image.bb和所有image.bbappend中的包

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 当我构建image-dev时 ,存在image.bb,image-dev.bb和所有image-dev.bbapend中的内容不是image.bbappend中的软件包

bitbake -e image-dev yields: 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
...

Any idea how to fully inherit/include the entire base image including all it's bbappends?! 知道如何完全继承/包括整个bbappends在内的整个基本映像吗?

Thank you! 谢谢! Stefan 斯特凡

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

Remove require image.bbappend from file image-dev.bbappend 从文件image-dev.bbappend删除require image.bbappend image-dev.bbappend

There is no need to require image.bbappend in image-dev.bbappend . 有没有必要要求image.bbappendimage-dev.bbappend image.bb already contains configurations from image.bbappend file. image.bb已经包含来自image.bbappend文件的配置。 so adding require image.bb in image-dev.bb file is sufficient 所以在image-dev.bb文件中添加require image.bb就足够了

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

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