Torizon Offline Bootloader Update

Dear Toradex community,

I try to update the Bootloader on Torizon using the offline update mechanism.

Current system:

  • TorizonCore 5.7.2
  • Colibri iMX8X & Eval Board

On Torizon Platform I created a Lockbox containing the new 6.2.0 Bootloader and then try to download it as described. However I hit an error stating the version-string “contains unsafe characters”. See the logs below.

Could you please help solving this error?

Best Regards,
Philippe

torizoncore-builder platform lockbox --credentials credentials.zip bootloader_6_2_0

=>> Handle director-repository metadata
Fetching 'bootloader_6_2_0.json'
Fetching 'offline-snapshot.json'
Fetching '1.root.json'
Fetching '2.root.json'
Fetching '3.root.json'
Fetching '3.root.json' (version not available, stopping)

=>> Handle image-repository metadata
Fetching 'snapshot.json'
Fetching 'tdx-quarterly.json'
Fetching 'tdx-monthly.json'
Fetching 'tdx-bootloader.json'
Fetching 'targets.json'
Fetching 'tdx-nightly.json'
Fetching 'tdx-lts.json'
Fetching 'tdx-containers.json'
Fetching '1.root.json'

=>> Process metadata
Loading offline-update targets metadata from 'update/metadata/director/bootloader_6_2_0.json'
Loading offline-update snapshot metadata from update/metadata/director/offline-snapshot.json
Offline-update metadata passed basic validation
Loading image-repo targets metadata from 'update/metadata/image-repo/targets.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-nightly.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-monthly.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-quarterly.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-lts.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-containers.json'
Loading image-repo delegated targets metadata from 'update/metadata/image-repo/tdx-bootloader.json'

=>> Handle Uptane targets
Fetching binary target 'bootloader/colibri-imx8x/u-boot-ota.bin-2022.04-6.2.0-devel+git.0e1f11392251-n216'
Fetching target 'bootloader/colibri-imx8x/u-boot-ota.bin-2022.04-6.2.0-devel+git.0e1f11392251-n216' from 'https://api.torizon.io/repo/api/v1/user_repo/targets/bootloader/colibri-imx8x/u-boot-ota.bin-2022.04-6.2.0-devel+git.0e1f11392251-n216'...
Uptane info: target 'bootloader/colibri-imx8x/u-boot-ota.bin', version: '2022.04-6.2.0-devel+git.0e1f11392251-n216'
Removing output directory 'update/' due to errors
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 221, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/platform.py", line 316, in do_platform_lockbox
    platform_lockbox(
  File "/builder/tcbuilder/cli/platform.py", line 298, in platform_lockbox
    raise exc
  File "/builder/tcbuilder/cli/platform.py", line 277, in platform_lockbox
    fetch_offupdt_targets(
  File "/builder/tcbuilder/cli/platform.py", line 196, in fetch_offupdt_targets
    platform.fetch_binary_target(**params)
  File "/builder/tcbuilder/backend/platform.py", line 716, in fetch_binary_target
    fetch_file_target(target, repo_url, images_dir,
  File "/builder/tcbuilder/backend/platform.py", line 334, in fetch_file_target
    return fetch_validate(
  File "/builder/tcbuilder/backend/platform.py", line 257, in fetch_validate
    assert all(ch not in UNSAFE_FILENAME_CHARS for ch in fname), \
AssertionError: Target 'bootloader/colibri-imx8x/u-boot-ota.bin-2022.04-6.2.0-devel+git.0e1f11392251-n216' contains unsafe characters

1 Like

Hi @philschenker !

Welcome (again :smile: ) to the Toradex Community!

Thanks for reporting the issue.

We will try to reproduce it and will get back to you, ok?

Best regards,

Greetings @philschenker,

This is a known issue and support for Bootloader Updates to be used with offline updates is still an in-progress topic. Currently Bootloader Updates only work out of the box for online update types.

Best Regards,
Jeremias

Thanks @henrique.tx for the welcome back :slight_smile: and to @jeremias.tx thanks for verifying that this is a known issue. It is no longer urgent on our side so we’ll stand by.

Glad we were able to help clarify things. We do hope to have offline bootloader updates available in the near future.

Best Regards,
Jeremias

Hi,
I couldn’t find anything new in the official documentation about Offline Bootloader Updates (only online updates are mentioned for the Bootloader). Do you mind pointing me in the right direction (or maybe there’s no update about this topic)? Currently we’re curious about how to update from Torizon OS 6.8.1 to 7.1 with an offline update (for colibri imx8x and verdin imx8mp).
Thanks in advance.
Best,
Lukas

Hi @lzaugg_parametric,

I couldn’t find anything new in the official documentation about Offline Bootloader Updates

It is technically possible to perform a bootloader update via offline updates. It’s not something we have documented yet, but it should work. When defining a new Lockbox you can select bootloader-type packages to be included into the Lockbox. From there you can try to perform an offline bootloader update, as you would any other offline update.

Again, it should work. Though it’s not something we test as often as online bootloader updates so keep this in mind.

If want to discuss this further, I would recommend you open a new thread to discuss this. It’s easier for us to keep track of rather than these older threads.

Best Regards,
Jeremias

1 Like