I am migrating my firmware from rocko to Scarthgap. In rocko we used to generate a usb.img from adding image_type=tar.bz2 and after extracting it has a script named update.sh, which we used to create a usb.img (for firmware updating directly using gpg keys). But now after migration, i can only tezi files, even after adding image_type=tar.bz2 to my yocto image, it doesnot generate the tar.bz2 with update.sh. Thank you
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?
Migration from Rocko to Scarthgap: Changes to Image Deployment Process
The change you’re experiencing is due to significant updates in Toradex’s image deployment process between the older Rocko release and the current Scarthgap BSP.
What Changed
In the current BSP 7.x.y (Scarthgap), Toradex has moved to using Toradex Easy Installer (Tezi) as the primary deployment method(1). The traditional update.sh script and tar.bz2 deployment packages are no longer generated by default.
Current Deployment Method
After building your image with bitbake, the output will be located at build/deploy/images/${MACHINE}/(1). The recommended deployment method is now using the Tezi image generated in the build process (e.g., Verdin-iMX8MP_Reference-Minimal-Image-Tezi_6.0.0-devel-20221021202153+build.0.tar)(1).
The documentation indicates that the meta-toradex layer previously contained a custom image deployment process where “a custom step combines our flashing utilities and scripts (e.g. update.sh) and creates a single distributable tar.bz2 package”(2). However, this customization is not applied to current image builds(2).
Recommended Migration Path
For your migration from Rocko to Scarthgap:
Update your deployment process to use Toradex Easy Installer instead of the legacy update.sh script
Build your images using the current Yocto build process as documented(1)
Deploy using Tezi - the generated Tezi images provide a more robust and secure deployment method
For images, u-boot, uImage, rootfs, deployable tarball: build/deploy/images/${MACHINE}/
For SDKs: build/deploy/sdk/
For ipk packages: build/deploy/ipk/<package-arch>/*.ipk
The Tezi deployment method provides better integration with Toradex’s current ecosystem and offers improved security and reliability compared to the legacy update.sh approach.
There are a few considerations that are important here.
When it comes to what the devices final state will be and how you plan to update it in the future:
If you want to keep the current mechanism: Creating a custom image type that puts the rootfs in a format which your custom updater can deal with is the way to go.
This has some considerations on the bootloader side:
While not always required, it is advisable to use the same bootloader as the respective Toradex BSP as a base.
A bootloader upgrade would be especially advisable in this case where you are moving from BSP 2.8, which used downstream-NXP components, to BSP 7, with upstream components.
If you are open to another update mechanism: We now have the Torizon Update system, which handles update security in a more secure way than just a simple check of GPG keys of the update itself.
As you already have a Yocto build for your project, Torizon Minimal is likely a good starting point, as it is a very basic Yocto image with the update client integrated.
In Torizon, if the device is connected there are many useful cloud features beyond the OTA updates.
Either for updating the bootloader, using another process to flash the image, or moving to Torizon, if you need to load the Toradex Easy Installer, I see two main ways to do so:
Use the SD Card
By default on BSP 2.8, the boot is done with distro_bootcmd, which if you dig a bit deeper tries to boot Linux from the SD Card first (mmc1 or mmc2):
Apalis iMX6 # printenv distro_bootcmd
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
Apalis iMX6 # printenv boot_targets
boot_targets=mmc1 mmc2 mmc0 usb0 dhcp
Apalis iMX6 # mmc list
FSL_SDHC: 0 (eMMC)
FSL_SDHC: 1
FSL_SDHC: 2
This allows you to craft an sd-card with the Toradex Easy Installer and an image to be installed on the device.
Such SD-Card will be booted by default and automatically install the new image to the SoM’s flash memory without the need for human interaction.
Please see an example of this here: Verdin-imx8mm - easy installer and custom image in a single place - #7 by bruno.tx
Load the Toradex Easy Installer via USB OTG
Normally, this would require the use of the recovery button and following the full procedure described here: Loading Toradex Easy Installer | Toradex Developer Center
However, on the version of u-boot present in BSP 2.8, you can run a command that will bring the module to recovery mode: bmode usb
After running this command, the module will be effectively in recovery mode, allowing you to load the Toradex Easy Installer via the USB OTG port.
How to proceed further ends up being a design decision.
If you want to discuss more the possibilities here, please let me know.
We have successfully upgraded our custom image to Yocto Scarthgap 7.3.0 with the upstream U-Boot.
We thoroughly evaluated Torizon and even had a detailed call with your team.
Unfortunately, due to current financial and time constraints we cannot move to Torizon at this time.
We will therefore continue with our custom dual-partition, GPG-based update mechanism, as discussed.
We are creating a custom Yocto image type so the rootfs output matches our existing updater.
Your notes on SD-card/USB loading of the Toradex Easy Installer and the need to keep the bootloader in sync were very helpful.
We’ll keep those recovery options available and follow best practices when flashing U-Boot in the field.
I need further support with this method. Can you share me script that i can run and install the rootfs etc into my second partition directly from my application layer ? Thank you
From what I understand, you have a custom update mechanism based on an A/B partition strategy, and you’d like to trigger updates via a script at the application layer. Correct?
With Torizon, we use an OSTree-based system update model (via Torizon Cloud). An A/B partition strategy isn’t part of what we support with OSTree and it runs counter to our recommended approach, so unfortunately we don’t have reference examples for that workflow that we could share with you.
If you still prefer to proceed with A/B updates, we can connect you with a Engineering Partner who can help design and support your custom solution.
Alternatively, we’d be happy to set up a call with the Torizon Cloud team to review how our Cloud solution might meet your requirements and whether it makes sense for you from a technical and cost perspective.
Thanks for your response. Yes using rocko bsp A/B partition approach to update our current firmware from usb directly. There is a ./update script in .tar.bz2 artificat and using that we used to create a usb image and then using our update script on application layer to update the firmware on the device in the field. That would be nice if you can connect me with the Engineering Partner who can help design and support our custom solution. Thank you.