将 DISTRO_FEATURES 添加到图像 bitbake 配方 [英] Adding DISTRO_FEATURES to image bitbake recipe

查看:21
本文介绍了将 DISTRO_FEATURES 添加到图像 bitbake 配方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过将以下内容添加到我的 local.conf 文件中,在我的 yocto 映像中添加了对虚拟化的支持:

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"

(按照 https://git 中的说明.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/README).这工作正常,所以现在我正在尝试创建一个新的图像 bitbake 配方来移动它,以便我可以在有和没有虚拟化的情况下进行构建.我添加了一个图像配方,如下(相关部分):

(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

但这不起作用 - bitbake 现在抱怨:

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

警告:您已经包含了元虚拟化层,但是您的 DISTRO_FEATURES 中尚未启用虚拟化".一些bbappend 文件可能不会生效.请参阅元虚拟化自述文件有关启用虚拟化支持的详细信息.

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.

所以看起来 DISTRO_FEATURES 在图像 bitbake 中无效.是这样吗?如果是这样,将图像添加到我的构建中需要额外的 DISTRO_FEATURES 而保留现有图像的正确方法是什么?

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?

推荐答案

正确,您不能在配方中设置 DISTRO_FEATURES.它控制发行版的功能,因此仅在发行版配置或其他顶级配置文件(如 local.conf)中才有意义.

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.

这篇关于将 DISTRO_FEATURES 添加到图像 bitbake 配方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆