Hello,
I am working on a Yocto-based project for the Verdin iMX8M Plus, using Mender for OTA updates.
To allow Mender to interact correctly with the bootloader (A/B partition logic, rollback variables, bootcount, etc.), I need to use a custom U-Boot built with the Mender patches.
However, I would like to avoid overwriting the factory Toradex U-Boot stored in the eMMC. My goals are:
- keeping the board easily recoverable through Toradex Easy Installer (TEZI),
- avoiding the risk of bricking the module if my custom bootloader is incorrect,
- keeping Toradex’s default bootloader untouched for safety.
What I would like to achieve
I want the preinstalled Toradex U-Boot to load and run my own custom U-Boot, stored on a partition (for example a FAT partition on the SD card or eMMC), using a boot.scr script.
In short:
Toradex U-Boot (factory) → boot.scr → load my custom U-Boot binary → my U-Boot starts and boots the kernel/rootfs.
This is a classic chainloading scenario:
I do not replace the Toradex bootloader; I only ask it to jump to my second-stage U-Boot.
Binary format used
I do not have an ELF U-Boot image, only a binary file produced by Yocto:
flash.bin-verdin-imx8mp-sd
I would like to use this binary for the chainloading process.
If required, I can also consider using a different format such as a raw SPL or a u-boot.bin, depending on what is most appropriate for a second-stage boot on the Verdin iMX8MP.
Proposed method
-
Place the custom U-Boot binary (e.g.,
flash.bin-verdin-imx8mp-sd) on a FAT partition accessible by the Toradex U-Boot. -
Create a
boot.cmdscript that:- loads the binary into RAM (
fatload mmc X:Y ${loadaddr} flash.bin-verdin-imx8mp-sd), - jumps to it using
go ${loadaddr}.
- loads the binary into RAM (
-
Convert
boot.cmdtoboot.scrwithmkimage. -
Let the Toradex U-Boot execute this script during boot.
Questions for the Toradex team
-
Is chainloading a second U-Boot binary from the factory U-Boot supported or recommended on the Verdin iMX8MP?
-
Is there a preferred binary format for chainloading on this platform?
- For example:
u-boot.bin, SPL-only, flash.bin, or another image type.
- For example:
-
Are there any hardware initialization constraints to be aware of (DRAM already initialized, MMU state, caches enabled, etc.) when jumping from the first U-Boot to the second?
-
Is there a recommended storage location for the
boot.scrand the custom U-Boot binary so that the Toradex U-Boot picks them up cleanly? -
More generally, what is Toradex’s recommended approach for using a custom Mender-enabled U-Boot while keeping the factory Toradex U-Boot intact for recovery (TEZI, Easy Installer, etc.)?
Thank you very much for your assistance.