问题
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..
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..
回答1:
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.
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}"
This adds the build id into /etc/os-release
and you can increment the versions based on bug fix or new delivery.
来源:https://stackoverflow.com/questions/52756726/best-approach-of-image-versioning-in-yocto