2023-03-16 10:44 PM
In stm32mp157, I need two partitions for FSBL, and it is working correctly, but I want to make TFA redundant meaning I should be able to update the second partition of FSBL and then shift it on the second partition on restart.
I have made roofs redundant, but then I used environment variables inside U-BOOT to switch partitions. TFA (BL2) runs instantly after the ROM code, and I cannot change that.
Is there any solution that I can do here? What is the purpose of having two FSBL partitions if it is not for redundant TFA?
2023-03-17 01:12 AM
Hi @ZUl A.1 ,
read https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview
FSBL redundancy is there just in case of flash memory corruption.
Number of versions depends of flash type.
But there's no mechanism to force bootrom to select one partition, and so FSBL is not part of Secure Firmware Update feature present from DV4.0.
Secure Firmware Update - stm32mpu
But note that there's no need to update BL2 starting from DV4 version.(v2.6-stm32mp-r1)
ST guarantee its compatibilty for all coming versions.
Olivier
2023-03-17 02:58 AM
So what is the mechanism for flash memory corruption? If the FSBL1 is not working it will automatically goes to the FSBL2?
2023-03-17 03:01 AM
Yes. The ROM code tries to load and launch the first copy. In the case of failure, it then tries to load the second copy.
Olivier
2023-03-17 03:03 AM
There must be some way to change the partition address to be used for TFA, or must there be some other method to point the ROMCODE to the second partition? I have read your documentation but did not find anything which is why I am asking here.
2023-03-17 03:14 AM
No there is no way.
But again why do you need this ?
Olivier
2023-03-17 03:39 AM
We want to update our TFA too.
2023-03-17 03:45 AM
Hi @ZUl A.1
My point is why you want to update the TF-A/BL2 with an A/B mechanism.
Is it for a product already on the field?
As said in my first comment, once you have flashed a DV4.x in house you can then use SFU for update on the field for all binaries except BL2.
Olivier
2023-03-21 05:46 AM
Hi, sorry for the late reply.
As suggested by the STM, I have set two partitions, one fsbl1 and the second fsbl2. I made a file using dd if-/dev/zero of=blank_data.stm32 and use that blank_data in the WIC file to put it on fsbl1.
According to your logic, the board should then go to the second partition name fsbl2, and it should boot from there, and yes there is a working TFA available on fsbl2.
It does not do that after installing the.WIC file, it just does not work and gets stuck, meaning it cannot load TFA.
2023-03-22 02:14 AM
Hi @ZUl A.1 ,
"As suggested by STM" Sorry, can you point me where you read this ?
Thanks
Olivier