Adding DISTRO_FEATURES to image bitbake recipe

◇◆丶佛笑我妖孽 提交于 2020-02-04 01:46:11

问题


I've added support for virtualization in my yocto image by adding the following to my local.conf file:

DISTRO_FEATURES_append= " virtualization"
IMAGE_INSTALL_append = " docker docker-contrib"

(as per instructions in https://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/README). This is working fine, so now I'm trying to create a new image bitbake recipe to move this into so that I can build both with and without virtualization. I've added an image recipe which is as follows (relevant parts):

DISTRO_FEATURES_append = " virtualization"
CORE_IMAGE_EXTRA_INSTALL = " docker docker-contrib"
inherit core-image

but that doesn't work - bitbake now complains that:

WARNING: You have included the meta-virtualization layer, but 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-virtualization README for details on enabling virtualization support.

So it seems that DISTRO_FEATURES is not valid in the image bitbake. Is that the case and if so what is the proper way to add an image to my build that requires an additional DISTRO_FEATURES while leaving the existing images alone?


回答1:


Correct, you can't set DISTRO_FEATURES in a recipe. It controls the features of the distro, so only makes sense in a distro configuration or other top-level configuration file such as local.conf.



来源:https://stackoverflow.com/questions/53839166/adding-distro-features-to-image-bitbake-recipe

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