Versioning my torizoncore-builder OS

Is there a way to add a version number to my torizon OS build? I would be able to boot my OS and then be able to tell what version I am running. I could wait for the build to complete and then edit the image.json file to change the “version” field. I could also add a custom file to /etc/ folder that contains the version number. I could also edit the /etc/os-release file on the board and then “isolate” my change. Is there an officially supported way to do versioning of an OS built with TCbuilder?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Yes, there are several officially supported ways to add version information to your Torizon OS build using TorizonCore Builder:

1. Specify Version Metadata in tcbuild.yaml

You can add custom version information that will appear in the Toradex Easy Installer by setting the name and description fields in your tcbuild.yaml under the output section:

output:
  easy-installer:
    local: torizon-core-docker-colibri-imx6-custom
    name: "My customized image"
    description: "My customized image (description)"

This information will be visible in the Toradex Easy Installer interface to help you identify builds.
More info


2. Add a Version File to the Filesystem

To make the version visible during OS runtime, you can add a file (such as /etc/version) to your image by using the customization/filesystem field in your tcbuild.yaml:

customization:
  filesystem:
     - changes1/

Inside the changes1/etc/ directory, simply place a file that holds your version string. This file will be part of the deployed OS and can be read at runtime.
How to use filesystem customization


3. Modify /etc/os-release and Use isolate

As you mentioned, you can edit /etc/os-release (or add any file to /etc), and then use the torizoncore-builder isolate command to capture your changes from a target device. This command collects additions, modifications, deletions, and permissions under /etc.

torizoncore-builder isolate --remote-host 192.168.1.117 --remote-username torizon --remote-password torizon --changes-directory changes1

See the isolate command reference
Isolate command manual


4. Use Variable Substitution for Automated Version Insertion

If you want to automate version changes (for example, in a CI system), TorizonCore Builder supports variable substitution. You can declare variables in your config and pass them at build time:

output:
  easy-installer:
    name: "My Customized Image v${VERSION}"

You then call the build with --set VERSION=1.2.3.
More about variable substitution in tcbuild.yaml


All the above approaches are officially supported for versioning your Torizon OS builds with TorizonCore Builder.

Best regards,
Toradex AI Assistant.

Hey @jzylkin2m,

The AI response gave some good suggestions, does this cover what information you are looking for?

-Eric

Yes I implemented these suggestions and they seem to be working.