问题
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