How to Flash U-Boot to Both /dev/mmcblk0boot0 and /dev/mmcblk0boot1 Partitions in WIC Image for Verdin i.MX95?

We’re preparing a factory flashing flow for Verdin i.MX95 where U‑Boot must be present in both eMMC boot partitions (/dev/mmcblk0boot0 and /dev/mmcblk0boot1 ) so that a future field upgrade can switch partitions safely. With the default .wic image flashed via uuu , U‑Boot ends up only in boot0 ; boot1 remains empty . We can populate boot1 afterwards from a running target, but we need this to happen as part of the first flash at the factory .

Environment

  • Module/SoC: Verdin i.MX95
  • Bootloader: U‑Boot 2024.04 (nxp_imx)
  • Yocto/WIC: image produced via .wks (WIC)
  • Flasher: NXP mfgtools/uuu
  • Storage: eMMC with boot0 & boot1 hardware partitions and user area
  • Goal: Mirror (duplicate) U‑Boot to boot0 and boot1 during factory flash

What happens today

  • Flashing the default .wic using uuu: U‑Boot is written to boot0 only; boot1 is empty afterwards.

What we already tried

  1. Extra entry in the .wks: added a second bootloader/rawcopy‑style entry intended to write to boot1. It didn’t produce the desired result (boot1 still empty).

  2. Post‑processing script in the WIC pipeline: attempted to place U‑Boot at a fixed offset (e.g., +4 MiB) assuming it would reach boot1, but that still writes into the user area, not the boot hardware partition, so it doesn’t achieve mirrored boot. (As far as I can see, WIC’s standard plugins like bootimg-partition/rawcopy address regular partitions; guidance for boot0/boot1 is unclear).

  3. After boot on the target:

  • From Linux we can dd to /dev/mmcblk0boot1 (after toggling force_ro) and then device boots from boot1 fine; so the silicon/board path is OK. But we must achieve this during factory flashing via .wic + uuu. (There are threads describing dd/offsets from Linux but not tied to WIC/UUU at factory time.)

What we’re looking for (requests)

  1. Recommended way (Toradex‑supported) to populate U‑Boot into boot0 and boot1 during factory flashing, ideally using:
  • A WIC plugin/usage example to target boot0/boot1 directly, or
  • A UUU script snippet that writes the same U‑Boot binary to both boot partitions (if WIC cannot directly address boot partitions).
    (Related discussions suggest mfgtools/uuu typically writes only the first boot partition unless customized—confirmation and an example would help a lot.)
  1. Sample .wks (or wic post‑process hook) that Toradex recommends for Verdin i.MX modules to handle boot0 + boot1 mirroring.
  2. Field upgrade best‑practices on Verdin for U‑Boot A/B:
  • Is there a Toradex guide for bootloader redundancy with boot0/boot1, and switching via mmc partconf/bootbus safely from U‑Boot? (U‑Boot’s mmc docs cover partconf, bootbus, a Verdin‑specific example would be great for uboot upgrade on field.)

Hi, I’m the Toradex AI Assistant.

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? :+1: :-1:


(1) (2) (3) (4)

Factory Flashing U-Boot to Both Boot Partitions on Verdin i.MX95

Boot Partition Configuration from Linux

For eMMC modules like the Verdin i.MX95, you can configure U-Boot in both boot partitions using the following approach once the system is running (1):

Enable Boot Partition and Configure Bus Settings

root@apalis-imx6:~# mmc bootpart enable 1 1 /dev/mmcblk0
root@apalis-imx6:~# mmc bootbus set single_hs x1 x8 /dev/mmcblk0

(1)

Write U-Boot to Boot Partitions

To populate both boot partitions, you would need to disable read-only protection and write to both partitions (1):

root@colibri-imx6:~# echo 0 > /sys/block/mmcblk0boot0/force_ro
root@colibri-imx6:~# echo 0 > /sys/block/mmcblk0boot1/force_ro

(1)

Then write U-Boot to both partitions:

root@colibri-imx6:~# dd if=u-boot-binary of=/dev/mmcblk0boot0
root@colibri-imx6:~# dd if=u-boot-binary of=/dev/mmcblk0boot1

Verify Boot Configuration

You can verify the boot partition configuration using (1):

root@apalis-imx6:~# mmc extcsd read /dev/mmcblk0 | grep -e BOOT_INFO -e BOOT_SIZE_MULTI -e PARTITION_CONFIG -e BOOT_BUS_CONDITIONS

(1)

U-Boot Commands for Boot Partition Management

From U-Boot, you can manage boot partitions using (1):

mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode

(1)

Important Considerations

The documentation notes several key points (1):

  • Changing boot_config takes effect immediately and does not require any power-cycle
  • Setting boot_partition back to 0x00 allows switching back to the current way of booting
  • By default eMMC boot partitions are read-only and disabling via force_ro is only temporary and does not persist
  • The Toradex Easy Installer handles this configuration in wrap-up scripts

Limitations of Current Documentation

The available sources don’t provide specific guidance for:

  • WIC plugin configuration for targeting boot0/boot1 directly during factory flashing
  • UUU script examples for writing to both boot partitions simultaneously
  • Verdin i.MX95-specific factory flashing procedures for boot partition mirroring

For comprehensive factory flashing solutions that populate both boot partitions during initial programming, you may need to implement a post-flash script that runs the boot partition population commands after the initial WIC image deployment.

**