best approach of image versioning in yocto
Asked Answered
M

1

7

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..

Miserly answered 11/10, 2018 at 9:31 Comment(0)
H
13

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.

Hamitosemitic answered 11/10, 2018 at 13:5 Comment(1)
You also need those 2 lines, otherwise the version will not be updated correctly: do_compile[nostamp] = "1" do_install[nostamp] = "1"Bratcher

© 2022 - 2024 — McMap. All rights reserved.