Hello Toradex Support Team,
I am working on implementing a redundant (A/B) boot mechanism on the Verdin iMX8MP module using Toradex BSP version 7.4.0.
I am facing issues in correctly switching the boot partitions.
System Details
-
Module: Verdin iMX8MP
-
BSP Version: 7.4.0
-
U-Boot Version: 2024.07 (Toradex BSP)
-
Build System: Yocto (OpenEmbedded)
-
Image: Reference minimal image (customized)
-
Storage: eMMC
Current Partition Layout
On the target, I have the following layout:
mmcblk2 (eMMC):
-
mmcblk2p1 → BOOT_A (48MB)
-
mmcblk2p2 → RFS_A (512MB)
-
mmcblk2p3 → BOOT_B (48MB)
-
mmcblk2p4 → RFS_B (512MB)
mmcblk1 (external storage):
-
rootfsA
-
rootfsB
-
data
Example output from lsblk:
mmcblk2
|- mmcblk2p1 → BOOT_A
|- mmcblk2p2 → RFS_A
|- mmcblk2p3 → BOOT_B
`- mmcblk2p4 → RFS_B
Current Behavior
-
Root filesystem switching works correctly.
-
System alternates between RFS_A and RFS_B as expected.
-
However, BOOT partition is always taken from BOOT_A (mmcblk2p1).
-
BOOT_B (mmcblk2p3) is never selected, even after slot change.
-
Kernel and DTB are always loaded from mmc 2:1.
So only rootfs redundancy is working, but boot partition redundancy is not.
U-Boot Environment
Current bootcmd:
bootcmd=load mmc 2:1 ${loadaddr} Image.gz; unzip ${loadaddr} ${kernel_addr_r}; load mmc 2:1 ${fdt_addr_r} imx8mp-verdin-nonwifi-dev.dtb; booti ${kernel_addr_r} - ${fdt_addr_r}
boot_targets=mmc1 mmc2 dhcp
From this, U-Boot is always loading kernel and DTB from mmc 2:1 (BOOT_A).
Modifications Done
-
Modified U-Boot in workspace to support redundant boot.
-
Enabled environment overwrite using:
CONFIG_ENV_ALLOW_OVERWRITE=y
-
Rebuilt U-Boot and integrated it into Yocto.
-
Flashed using Toradex Easy Installer / UUU.
-
Configured A/B rootfs partitions.
-
Verified rootfs switching works.
Expected Behavior
I expect the system to:
-
Boot from BOOT_A + RFS_A in slot A
-
Boot from BOOT_B + RFS_B in slot B
-
Automatically switch kernel, DTB, and rootfs together
-
Optionally support switching between eMMC boot partitions (boot0/boot1) in future
But currently, only rootfs is switching.
Questions / Clarification Needed
-
Is additional U-Boot configuration required to enable BOOT_A / BOOT_B switching?
-
Should I modify the default Toradex distro boot scripts to support A/B boot?
-
Is it recommended to use U-Boot environment variables (boot_part, root_part, etc.) for this?
-
Should mmc boot partitions (boot0/boot1) be used instead of user partitions for redundancy?
-
Is there an official reference implementation for full A/B boot on Verdin iMX8MP BSP 7.4?
Goal
My goal is to implement a robust redundant boot mechanism where:
-
U-Boot, kernel, DTB, and rootfs can all be switched safely
-
System can fall back to the secondary slot if the primary slot fails
-
The mechanism can be used for OTA updates in production
I would appreciate your guidance on the correct and recommended approach for implementing full redundant boot (boot + rootfs) on Verdin iMX8MP with BSP 7.4.
Thank you for your support.
Best regards,
Vrushabh Chandanshive