How to program U‑Boot to both eMMC boot partitions (boot0 & boot1) on i.MX95 during factory flashing

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to program U‑Boot to both eMMC boot partitions (boot0 & boot1) on i.MX95 during factory flashing

202件の閲覧回数
pushpendra2911
Contributor I

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: Toradex Verdin i.MX95
  • Bootloader: U‑Boot 2024.04 (nxp_imx)
  • Yocto/WIC: image produced via .wks (WIC)
  • Flasher: NXP mfgtools/uuu
  • Storage: eMMC with /dev/mmcblk0boot0 & /dev/mmcblk0boot1 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 it seems, 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 (NXP‑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.
  2. Sample .wks (or wic post‑process hook) that NXP recommends for i.MX95 modules to handle boot0 + boot1 mirroring.
  3. Field upgrade best‑practices on iMX95 for U‑Boot A/B: Is there a NXP 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 NXP‑specific example would be great for uboot upgrade on field.)
タグ(2)
0 件の賞賛
返信
4 返答(返信)

29件の閲覧回数
pengyong_zhang
NXP Employee
NXP Employee

hI @pushpendra2911 

I will be on vacation for a week and may not reply during this period. If you are in a hurry, you can create a new ticket. My other colleagues will support you. Thanks for your understand.

B.R

0 件の賞賛
返信

29件の閲覧回数
pengyong_zhang
NXP Employee
NXP Employee

hI @pushpendra2911 

Attached is a UUU script to download bootloader to both emmc boo0 and boot1 partition on imx8mp. you can modify the file name in this script to make it fit for i.MX95 image.

B.R

0 件の賞賛
返信

77件の閲覧回数
kawateb265
Contributor I

You can refer to i.MX93 eMMC Secondary Boot. The script there is for burning eMMC boot0 and boot1. This part is the same for iMX95 and iMX93.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-secondary-boot-collection/ta-p/19169...

i.MX93_emmc_boot_part_secondary_boot.uuu

uuu_version 1.2.39

SDPS: boot -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.6.3_1.0.0
SDPV: delay 1000
SDPV: write -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.6.3_1.0.0 -skipspl
SDPV: jump

#FB: ucmd setenv emmc_dev 1 
FB: ucmd setenv part 1 
FB: ucmd setenv boot_offset 0x0 
FB: ucmd setenv fastboot_dev mmc 
FB: ucmd setenv mmcdev ${emmc_dev}  
FB: ucmd if test ${part} != 7; then mmc dev ${emmc_dev} ${part}; else mmc dev ${emmc_dev}; fi
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.1.55-2.2.0
#FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.6.3_1.0.0 
FB: ucmd echo    ${fastboot_bytes}
FB: ucmd setexpr blks ${fastboot_bytes} / 0x200; setexpr blks ${blks} + 1
FB: ucmd mmc write ${loadaddr} ${boot_offset} ${blks}
# Secondary boot 
FB: ucmd setenv part 2 
FB: ucmd if test ${part} != 7; then mmc dev ${emmc_dev} ${part}; else mmc dev ${emmc_dev}; fi
#FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.1.55-2.2.0
FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot-LF_v6.6.3_1.0.0 
FB: ucmd echo    ${fastboot_bytes}
FB: ucmd setexpr blks ${fastboot_bytes} / 0x200; setexpr blks ${blks} + 1
FB: ucmd mmc write ${loadaddr} ${boot_offset} ${blks}

FB: ucmd setenv part 1
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} ${part} 0
FB: done
0 件の賞賛
返信

77件の閲覧回数
kawateb265
Contributor I

I recommend you refer to i.MX93 eMMC Secondary Boot. The mechanism of this part of iMX95 is the same as that of iMX93.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-secondary-boot-collection/ta-p/19169...

0 件の賞賛
返信