yocto中图像版本控制的最佳方法 [英] best approach of image versioning in yocto
问题描述
在Yocto中维护图像版本的最佳方法是什么。
What is the best approach for maintaining image versions in Yocto.
我的意思是假设我们构建了一个图像并将其提供给客户,以后我们将提供一些错误修复程序
I mean suppose we build an image and given it to customer, in future we provided bug fixes to the customer..
我们如何知道客户使用的是哪个版本的yocto图像。是否有任何标准方法可以实现这一目标。
How can we know which version of yocto image customer is using.. Is there any standard way to achieve this..
谢谢您的时间。感谢您的努力。
Thanks for your time. Appreciate your efforts..
推荐答案
您对 os-release 配方。这提供了将版本详细信息添加到映像的准备。此配方在目标中安装文件 / etc / os-release
。
You are interested in os-release recipe. This gives provision to add version details to the image. This recipe installs a file /etc/os-release
in the target.
如果您有兴趣添加自定义字段,具体取决于您的应用或图像的用途,您可以在 os-release.bbappend
OS_RELEASE_FIELDS 变量中添加其他字段>在您的自定义图层中。例如,
If you are interested in adding custom fields based on your application or purpose of the image, you can add extra fields in OS_RELEASE_FIELDS
variable in os-release.bbappend
in your custom layer. For example,
OS_RELEASE_FIELDS += "BUILD_VERSION"
BUG_FIXED_VERSION = "1.0.0-B1"
BUILD_VERSION = "${BUG_FIXED_VERSION}"
这会将构建ID添加到 / etc / os-release
,您可以根据错误修复或新发布的版本来增加版本。
This adds the build id into /etc/os-release
and you can increment the versions based on bug fix or new delivery.
这篇关于yocto中图像版本控制的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!