i.MX95 Boot ROM does not fall back from eMMC Boot0 to Boot1 after AHAB container corruption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX95 Boot ROM does not fall back from eMMC Boot0 to Boot1 after AHAB container corruption

138 Views
arun16598
Contributor I

Hello Experts,

On the i.MX95, does the Boot ROM support automatic failover between eMMC Boot0 and Boot1 when the selected boot partition contains an invalid AHAB container?

I programmed the same flash.bin into both Boot0 and Boot1. After setting BOOT_PARTITION_ENABLE = Boot0, I corrupted the first 4 KB of Boot0 (destroying the beginning of the AHAB container). The board reports:

Boot stage: Primary
Image set: 0
Parse seco container failed -14
SPL: failed to boot from all boot devices

If I manually switch BOOT_PARTITION_ENABLE to Boot1, the board boots normally.

Based on some older i.MX8 forum discussions, I expected the ROM to automatically try Boot1. Is automatic Boot0→Boot1 fallback supported on i.MX95? If so, what conditions trigger it? If not, what is the recommended redundancy mechanism for bootloader recovery?

 

Steps for reproduction:

  1. Flash the same imx-boot-imx95-19x19-verdin-sd.bin-flash_all to eMMC Boot0 and Boot1. Following is the script that I have used to flash both banks of emmc (attached in attachments)
  2. Verify both partitions contain the same image.
  3. Set:

     
    mmc partconf 0 0 1 0
     

    (Boot0 selected)

  4. Corrupt the first 4 KB of Boot0:

     
    dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8 conv=fsync
     
  5. Reboot.
  6. Observe:

     
    U-Boot SPL 2025.04-g99518e6b6f20 (Feb 02 2026 - 05:52:54 +0000)
    SYS Boot reason: por, origin: -1, errid: -1
    SYS shutdown reason: por, origin: -1, errid: -1
    Normal Boot
    Trying to boot from MMC1
    Boot stage: Primary
    Image set: 0, offset: 0x0
    Parse seco container failed -14
    Load image from MMC/SD 0x0
    mmc_load_image_raw_sector: mmc block read error
    Error: -38
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###
     
  7. Change PARTITION_CONFIG to Boot1:

     
    mmc partconf 0 0 2 0
     
  8. The board boots successfully from Boot1.

 

In short, I would like to get clarification on the following 
Does the i.MX95 Boot ROM support automatic eMMC Boot0↔Boot1 failover, or is the redundancy mechanism expected to be implemented differently (e.g., via image sets, software updates, or an alternate boot device)?

 

BR,

Arun Kumar

0 Kudos
Reply
2 Replies

96 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @arun16598 

The i.MX95 support it, but need SPL support this feature.

Zhiming_Liu_2-1783298374094.png

Based on what you've described, it appears that the version of U-Boot you're using does not include the following patch.


LFU-890-1 imx: image-container: Support iMX95 and iMX94 secondary boot · nxp-imx/uboot-imx@02d75ab ·...

Best Regards,
Zhiming

0 Kudos
Reply

83 Views
arun16598
Contributor I
Thank you @ Zhiming_Liu, I would like to understand
Under what conditions does the i.MX95 Boot ROM set boot_stage = Secondary for eMMC Boot0/Boot1?

BR,
Arun Kumar
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2390761%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX95%20Boot%20ROM%20does%20not%20fall%20back%20from%20eMMC%20Boot0%20to%20Boot1%20after%20AHAB%20container%20corruption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390761%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Experts%2C%3C%2FP%3E%3CP%20class%3D%22%22%3EOn%20the%20i.MX95%2C%20does%20the%20Boot%20ROM%20support%20automatic%20failover%20between%20eMMC%20Boot0%20and%20Boot1%20when%20the%20selected%20boot%20partition%20contains%20an%20invalid%20AHAB%20container%3F%3C%2FP%3E%3CP%3EI%20programmed%20the%20same%20flash.bin%20into%20both%20Boot0%20and%20Boot1.%20After%20setting%20BOOT_PARTITION_ENABLE%20%3D%20Boot0%2C%20I%20corrupted%20the%20first%204%20KB%20of%20Boot0%20(destroying%20the%20beginning%20of%20the%20AHAB%20container).%20The%20board%20reports%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EBoot%20stage%3A%20Primary%0AImage%20set%3A%200%0AParse%20seco%20container%20failed%20-14%0ASPL%3A%20failed%20to%20boot%20from%20all%20boot%20devices%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3EIf%20I%20manually%20switch%20BOOT_PARTITION_ENABLE%20to%20Boot1%2C%20the%20board%20boots%20normally.%3C%2FP%3E%3CP%3EBased%20on%20some%20older%20i.MX8%20forum%20discussions%2C%20I%20expected%20the%20ROM%20to%20automatically%20try%20Boot1.%20Is%20automatic%20Boot0%E2%86%92Boot1%20fallback%20supported%20on%20i.MX95%3F%20If%20so%2C%20what%20conditions%20trigger%20it%3F%20If%20not%2C%20what%20is%20the%20recommended%20redundancy%20mechanism%20for%20bootloader%20recovery%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ESteps%20for%20reproduction%3A%3C%2FSTRONG%3E%3C%2FP%3E%3COL%3E%3CLI%3EFlash%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esame%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eimx-boot-imx95-19x19-verdin-sd.bin-flash_all%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EeMMC%20Boot0%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBoot1%3C%2FSTRONG%3E.%20Following%20is%20the%20script%20that%20I%20have%20used%20to%20flash%20both%20banks%20of%20emmc%20(attached%20in%20attachments)%3C%2FLI%3E%3CLI%3EVerify%20both%20partitions%20contain%20the%20same%20image.%3C%2FLI%3E%3CLI%3E%3CP%3ESet%3A%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CPRE%3E%3CSPAN%3Emmc%20partconf%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E1%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E(Boot0%20selected)%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ECorrupt%20the%20first%204%20KB%20of%20Boot0%3A%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CPRE%3E%3CSPAN%3Edd%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%2Fdev%2Fzero%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Eof%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%2Fdev%2Fmmcblk0boot0%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Ebs%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E512%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3Ecount%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E8%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3Econv%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3D%3C%2FSPAN%3E%3CSPAN%3Efsync%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLI%3E%3CLI%3EReboot.%3C%2FLI%3E%3CLI%3E%3CP%3EObserve%3A%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CPRE%3E%3CSPAN%3EU-Boot%20SPL%202025.04-g99518e6b6f20%20(Feb%2002%202026%20-%2005%3A52%3A54%20%2B0000)%3CBR%20%2F%3ESYS%20Boot%20reason%3A%20por%2C%20origin%3A%20-1%2C%20errid%3A%20-1%3CBR%20%2F%3ESYS%20shutdown%20reason%3A%20por%2C%20origin%3A%20-1%2C%20errid%3A%20-1%3CBR%20%2F%3ENormal%20Boot%3CBR%20%2F%3ETrying%20to%20boot%20from%20MMC1%3CBR%20%2F%3EBoot%20stage%3A%20Primary%3CBR%20%2F%3EImage%20set%3A%200%2C%20offset%3A%200x0%3CBR%20%2F%3EParse%20seco%20container%20failed%20-14%3CBR%20%2F%3ELoad%20image%20from%20MMC%2FSD%200x0%3CBR%20%2F%3Emmc_load_image_raw_sector%3A%20mmc%20block%20read%20error%3CBR%20%2F%3EError%3A%20-38%3CBR%20%2F%3ESPL%3A%20failed%20to%20boot%20from%20all%20boot%20devices%3CBR%20%2F%3E%23%23%23%20ERROR%20%23%23%23%20Please%20RESET%20the%20board%20%23%23%23%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLI%3E%3CLI%3E%3CP%3EChange%20PARTITION_CONFIG%20to%20Boot1%3A%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CPRE%3E%3CSPAN%3Emmc%20partconf%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E2%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3E0%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLI%3E%3CLI%3EThe%20board%20boots%20successfully%20from%20Boot1.%3C%2FLI%3E%3C%2FOL%3E%3CBR%20%2F%3E%3CP%3EIn%20short%2C%20I%20would%20like%20to%20get%20clarification%20on%20the%20following%26nbsp%3B%3CBR%20%2F%3E%3CSTRONG%3EDoes%20the%20i.MX95%20Boot%20ROM%20support%20automatic%20eMMC%20Boot0%E2%86%94Boot1%20failover%2C%20or%20is%20the%20redundancy%20mechanism%20expected%20to%20be%20implemented%20differently%20(e.g.%2C%20via%20image%20sets%2C%20software%20updates%2C%20or%20an%20alternate%20boot%20device)%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EBR%2C%3C%2FP%3E%3CP%3EArun%20Kumar%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390860%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX95%20Boot%20ROM%20does%20not%20fall%20back%20from%20eMMC%20Boot0%20to%20Boot1%20after%20AHAB%20container%20corruption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390860%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThank%20you%20%40%20Zhiming_Liu%2C%20I%20would%20like%20to%20understand%3CBR%20%2F%3EUnder%20what%20conditions%20does%20the%20i.MX95%20Boot%20ROM%20set%20boot_stage%20%3D%20Secondary%20for%20eMMC%20Boot0%2FBoot1%3F%3CBR%20%2F%3E%3CBR%20%2F%3EBR%2C%3CBR%20%2F%3EArun%20Kumar%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390787%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX95%20Boot%20ROM%20does%20not%20fall%20back%20from%20eMMC%20Boot0%20to%20Boot1%20after%20AHAB%20container%20corruption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390787%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264405%22%20target%3D%22_blank%22%3E%40arun16598%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20i.MX95%20support%20it%2C%20but%20need%20SPL%20support%20this%20feature.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_2-1783298374094.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_2-1783298374094.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F391258iD4C60590A6E26260%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_2-1783298374094.png%22%20alt%3D%22Zhiming_Liu_2-1783298374094.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBased%20on%20what%20you've%20described%2C%20it%20appears%20that%20the%20version%20of%20U-Boot%20you're%20using%20does%20not%20include%20the%20following%20patch.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fuboot-imx%2Fcommit%2F02d75abc515ce928196a912adad8a884a5337ab0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ELFU-890-1%20imx%3A%20image-container%3A%20Support%20iMX95%20and%20iMX94%20secondary%20boot%20%C2%B7%20nxp-imx%2Fuboot-imx%4002d75ab%20%C2%B7%20GitHub%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E