Unable to update APP container software version for i.MX95 FlexSPI boot image

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

Unable to update APP container software version for i.MX95 FlexSPI boot image

74 Views
arun16598
Contributor II

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: 0X310

 

I 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:

  1. Is ROLLBACK_INDEX_IN_CONTAINER expected to update the software version for FlexSPI boot images?
  2. Does the FlexSPI image follow a different container generation flow where the rollback index/software version must be configured separately?
  3. Is this a known limitation or issue in the i.MX95 imx-mkimage build flow?

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

0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2395039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUnable%20to%20update%20APP%20container%20software%20version%20for%20i.MX95%20FlexSPI%20boot%20image%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2395039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Experts%2C%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI'm%20working%20on%20the%20i.MX95%20platform%20and%20enabling%20rollback%20protection%20using%20%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3EROLLBACK_INDEX_IN_CONTAINER%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI%20introduced%20the%20following%20variable%20in%20my%20%3C%2FSPAN%3E%3CSPAN%3Elocal.conf%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Eexport%20ROLLBACK_INDEX_IN_CONTAINER%20%3D%20%221%22%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EThis%20value%20is%20propagated%20through%20the%20build%2C%20and%20the%20build%20log%20confirms%20that%20%3C%2FSPAN%3E%3CSPAN%3Emkimage_imx8%3C%2FSPAN%3E%3CSPAN%3E%20is%20invoked%20with%20%221%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EWhen%20building%20an%20%3CSTRONG%3EeMMC%20boot%20image%3C%2FSTRONG%3E%2C%20parsing%20the%20generated%20image%20shows%20the%20container%20software%20version%20updated%20correctly.%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%26nbsp%3Bif%20%5B%201%20%5D%3B%20then%20%5C%3CBR%20%2F%3E.%2F..%2Fmkimage_imx8%20-soc%20IMX9%20-cntr_version%202%20%3CSTRONG%3E-sw_version%201%3C%2FSTRONG%3E%20-c%20%5C%3CBR%20%2F%3E-ap%20bl31.bin%20a55%200x8A200000%20%5C%3CBR%20%2F%3E-ap%20u-boot-hash.bin%20a55%200x90200000%20%5C%3CBR%20%2F%3E-ap%20tee.bin%20a55%200x8C000000%20%5C%3CBR%20%2F%3E-out%20u-boot-atf-container.img%3B%20%5C%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHowever%2C%20when%20building%20the%20%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3EFlexSPI%20boot%20image%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CSPAN%3Eimx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi%3C%2FSPAN%3E%3CSPAN%3E)%2C%20parsing%20the%20image%20still%20reports%20the%20default%20SW%20version%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-css%22%3E%3CCODE%3E.%2Fmkimage_imx8%20-soc%20IMX9%20-parse%20imx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi%0ASOC%3A%20IMX9%0AInput%20container%20binary%20to%20be%20parsed%3A%20imx-boot-imx95-19x19-verdin-fspi.bin-flash_a55_flexspi%0A%0A*********************************%0A*%09%09%09%09*%0A*%20%20%20%20%20%20%20%20%20%20APP%20CONTAINER%201%20%20%20%20%20%20%20%20%20%20*%0A*%09%09%09%09*%0A*********************************%0A%0A%20%20%20%20%20%20%20%20Length%3A%200X320%20(800)%0A%20%20%20%20%20%20%20%20%20%20%20Tag%3A%200X87%0A%20%20%20%20%20%20%20Version%3A%200X2%0A%20%20%20%20%20%20%20%20%20Flags%3A%200X10%0A%20%20%20%20Num%20images%3A%206%0A%20%20Fuse%20version%3A%200%0A%20%20%20%20SW%20version%3A%200X0%0ASig%20blk%20offset%3A%200X310%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI%20noticed%20an%20interesting%20thing%20in%20iMX95%2Fsoc.mak%20as%20there%20is%20no%20sw_version%20included%20during%20the%20build%20for%20flash_a55_flexspi%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Eflash_a55_flexspi%3A%20%24(MKIMG)%20%24(AHAB_IMG)%20%24(MCU_IMG)%20%24(SPL_A55_IMG)%20%24(OEI_IMG_M33)%20fcb.bin%20u-boot-atf-container.img%0A%20%20%20%20%20%20%20%20.%2F%24(MKIMG)%20-soc%20IMX9%20-cntr_version%20%24(CTNR_VERSION)%20%24(XSPI_FAST_HASH)%20-dev%20flexspi%20-append%20%24(AHAB_IMG)%20-c%20%24(OEI_OPT_M33)%20-msel%20%24(MSEL)%20%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20-m33%20%24(MCU_IMG)%200%20%24(MCU_TCM_ADDR)%20%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20-ap%20%24(SPL_A55_IMG)%20a55%20%24(SPL_LOAD_ADDR_M33_VIEW)%20%24(V2X_DUMMY)%20-fcb%20fcb.bin%20%24(FCB_LOAD_ADDR)%20-out%20flash.bin%0A%20%20%20%20%20%20%20%20%24(call%20append_container%2Cu-boot-atf-container.img%2C1)%0A%20%20%20%20%20%20%20%20%24(call%20append_fcb)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EMy%20questions%20are%3A%3C%2FSPAN%3E%3C%2FP%3E%3COL%3E%3CLI%3E%3CSPAN%3EIs%20%3C%2FSPAN%3E%3CSPAN%3EROLLBACK_INDEX_IN_CONTAINER%3C%2FSPAN%3E%3CSPAN%3E%20expected%20to%20update%20the%20software%20version%20for%20FlexSPI%20boot%20images%3F%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EDoes%20the%20FlexSPI%20image%20follow%20a%20different%20container%20generation%20flow%20where%20the%20rollback%20index%2Fsoftware%20version%20must%20be%20configured%20separately%3F%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EIs%20this%20a%20known%20limitation%20or%20issue%20in%20the%20i.MX95%20%3C%2FSPAN%3E%3CSPAN%3Eimx-mkimage%3C%2FSPAN%3E%3CSPAN%3E%20build%20flow%3F%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EIf%20anyone%20has%20successfully%20enabled%20%3C%2FSPAN%3E%3CSPAN%3EROLLBACK_INDEX_IN_CONTAINER%3C%2FSPAN%3E%3CSPAN%3E%20for%20FlexSPI%20boot%20images%20on%20i.MX95%2C%20could%20you%20please%20share%20the%20expected%20flow%20or%20any%20additional%20configuration%20required%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20in%20advance!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20Regards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EArun%20Kumar%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E