Hello Experts,
I'm working on the i.MX95 platform and enabling rollback protection using ROLLBACK_INDEX_IN_CONTAINER.
I introduced the following variable in my local.conf:
export ROLLBACK_INDEX_IN_CONTAINER = "1"This value is propagated through the build, and the build log confirms that mkimage_imx8 is invoked with "1"
When building an eMMC boot image, parsing the generated image shows the container software version updated correctly.
if [ 1 ]; then \
./../mkimage_imx8 -soc IMX9 -cntr_version 2 -sw_version 1 -c \
-ap bl31.bin a55 0x8A200000 \
-ap u-boot-hash.bin a55 0x90200000 \
-ap tee.bin a55 0x8C000000 \
-out u-boot-atf-container.img; \
However, when building the FlexSPI boot image (imx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi), parsing the image still reports the default SW version
./mkimage_imx8 -soc IMX9 -parse imx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi
SOC: IMX9
Input container binary to be parsed: imx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi
*********************************
* *
* APP CONTAINER 1 *
* *
*********************************
Length: 0X320 (800)
Tag: 0X87
Version: 0X2
Flags: 0X10
Num images: 6
Fuse version: 0
SW version: 0X0
Sig blk offset: 0X310I noticed an interesting thing in iMX95/soc.mak as there is no sw_version included during the build for flash_a55_flexspi
flash_a55_flexspi: $(MKIMG) $(AHAB_IMG) $(MCU_IMG) $(SPL_A55_IMG) $(OEI_IMG_M33) fcb.bin u-boot-atf-container.img
./$(MKIMG) -soc IMX9 -cntr_version $(CTNR_VERSION) $(XSPI_FAST_HASH) -dev flexspi -append $(AHAB_IMG) -c $(OEI_OPT_M33) -msel $(MSEL) \
-m33 $(MCU_IMG) 0 $(MCU_TCM_ADDR) \
-ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR_M33_VIEW) $(V2X_DUMMY) -fcb fcb.bin $(FCB_LOAD_ADDR) -out flash.bin
$(call append_container,u-boot-atf-container.img,1)
$(call append_fcb)My questions are:
If anyone has successfully enabled ROLLBACK_INDEX_IN_CONTAINER for FlexSPI boot images on i.MX95, could you please share the expected flow or any additional configuration required?
Thanks in advance!
Best Regards,
Arun Kumar
Hi @arun16598
The FlexSPI image is not another variant of the AHAB format, but it employs a combined process of first generating the boot container, then appending the U-Boot/ATF container. Your -sw_version 1 is set on u-boot-atf-container.img; however, the APP container containing SM/M33, OEI, SPL, and FCB—which flash_a55_flexspi creates first—does not pass the -sw_version option, so that container still displays SW version: 0. ROLLBACK_INDEX_IN_CONTAINER is used to generate the secondary U-Boot/ATF APP container, but it is not passed to the primary APP container created by flash_a55_flexspi. If the same software version is required for the first FlexSPI APP container, -sw_version $(ROLLBACK_INDEX_IN_CONTAINER) must also be added to the mkimage_imx8 invocation in flash_a55_flexspi.
If the goal is true AHAB anti-rollback enforcement, the key settings to verify and configure are fuse_version and -fuse_version, not just sw_version. The SPSDK’s i.MX95 anti-rollback example clearly states that OEM anti-rollback uses the fuse_version specified in the AHAB container YAML, and the version is subsequently submitted via the ELE’s OEM_FW_FUSE commit process.
Best Regards,
Zhiming