Bootloader support/status for offline updates?

Hello,

On reading the article Bootloader Updates in Torizon OS | Toradex Developer Center, it is noted that custom bootloaders are not yet supported via OTA and to contact you if this is a desired use case.

Our device has a custom bootloader which has been modified to show an image on the display while connected, so this is a use case we are interested in for a few scenarios, such as required bootloader updates due to major OS version changes, or if we encounter a scenario where the bootloader’s display timings need modification, so I’d like to express our interest and inquire if there is any additional news on this capability for future planning.

Naturally our device would still function with the stock Toradex bootloader, but it would be a noticeable change in customer experience if the device takes several seconds longer before anything is shown on-screen.

Best,
~BW908

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Thank you for your inquiry regarding bootloader support for offline updates and the interest in custom bootloader capabilities within Torizon OS. As of the latest information available, Torizon OS primarily supports bootloader updates for binaries built and tested by Toradex. The support for custom bootloaders, especially for use cases like displaying an image on the screen during boot or modifying display timings, is a feature that has been recognized but not yet implemented.

The process of updating the bootloader, including custom ones, involves complexities that require careful handling to ensure device reliability and prevent issues that could render a device inoperable. The current focus is on providing a robust and secure mechanism for updating the bootloaders provided by Toradex, with considerations for extending this support to custom bootloaders in the future.

While I understand that using a custom bootloader is crucial for your application to enhance the customer experience, the capability to update such bootloaders via OTA in Torizon is still under consideration for future development. This means that, as of now, there isn’t a direct support path for OTA updates of custom bootloaders in Torizon OS.

For scenarios requiring updates to custom bootloaders, including major OS version changes or adjustments to the bootloader’s display timings, it’s recommended to plan for manual update processes or explore other mechanisms that ensure the device can be recovered in case of update failures.

Your feedback and use case are valuable as they help shape the roadmap for Torizon features. While I cannot provide a specific timeline for when custom bootloader support via OTA will be available, rest assured that the need for such features is acknowledged and may be addressed in future releases of Torizon.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Bootloader Updates in Torizon OS | Toradex Developer Center.

Greetings @bw908,

Sure thing I can bring this up internally with the team and see what our plans are for this feature. Then I can let you know once I have the full details.

Best Regards,
Jeremias

1 Like

Great, thank you!

Giving an update here. The team has put a couple of items in the backlog related to the request here. First is the request for offline bootloader updates, second is the request for custom user-uploaded bootloader packages.

On the first point, some team members have casually tested offline bootloader updates and it worked at that time. That said, it’s not an official functionality we test at this time. So it’s hard to say whether it’s still working at the moment or not.

On the second point, you can actually upload your own custom bootloader package. The steps to do so are just not publicly documented yet. Basically you would upload your own imx-boot binary file. If you’re using TorizonCore Builder it would look something like this:

torizoncore-builder platform push --credentials credentials.zip --package-name test-bootloader --package-version 1 --hardwareid verdin-imx8mp-bootloader imx-boot

However, with bootloader updates you also need to upload additional metadata, not just the binary. For example the metadata would look something like this:

"bootloader": {
            "ddOptions": "seek=0",
            "dtVersion": "2022.04-6.2.0-devel+git.0e1f11392251",
            "env": {
              "type": "embedded",
              "resetOnUpdate": true,
              "embeddedOffset": 1005975,
              "embeddedSize": 4130,
              "keepVars": null,
              "setVars": null
            }
          }

The values for embeddedOffset and embeddedSize are specific to each bootloader binary. To get the value that fits your binary you need to look at the contents of the u-boot-ota.json file that gets created during the Yocto build for your image.

Once you have your metadata you can append it to your upload via the --custom-meta argument in TorizonCore Builder.

Best Regards,
Jeremias

1 Like

Fantastic, thank you! I will look into this more in the near future.

Please let us know if you encounter any issues related to this.

1 Like

Quick question - is the added metadata for the apalis-imx6-bootloader counterpart the same?

Thanks!

Quick question - is the added metadata for the apalis-imx6-bootloader counterpart the same?

It’s similar but again you need to use the values specific to your u-boot-ota.json from your Yocto build for that image. If you don’t, the environment variables of U-Boot could be impacted after the bootloader update.

Also I must stress again that this action of uploading your own bootloader for bootloader updates is not well-tested by us yet. Not saying it won’t work just, use caution as I can’t guarantee everything here is perfect yet.

Best Regards,
Jeremias

1 Like

Understood, thanks again for the info!

Glad I could help clarify!

1 Like

Good news - I was able to successfully publish our custom bootloaders for the imx8 and imx6 to the Torizon platform.

Am I correct the file to push for the apalis-imx6 is u-boot-with-spl.imx? (this is what I inferred from the bitbake recipe that generates the ota.json file during the build process).

Otherwise I had no issues - I did modify our meta-layer to run the ota JSON generation earlier in the process, currently we only customize and build the bootloader via Yocto and it seems silly to wait an additional few hours for the entire rootfs and TEZI OTA image to build if it is unused.

From there it was easy to extract the u-boot version, size, and offset information to supply the custom metadata on upload with some CMake STRING(JSON ...) commands.

We’ll try it out on our hardware at some point to see how well it works and follow up with the results, though I do have some other things to attend to first.

Thanks again!

Am I correct the file to push for the apalis-imx6 is u-boot-with-spl.imx?

Yes I believe, that is correct. There should also be a binary named u-boot-ota.bin which is just a copy of the correct binary to use for bootloader updates no matter what machine you build for. That way you can just look for a single filename on all your builds for ease-of-use.

We’ll try it out on our hardware at some point to see how well it works and follow up with the results, though I do have some other things to attend to first.

Yeah just let us know if something comes up related to this.

Best Regards,
Jeremias

1 Like