cancel
Showing results for 
Search instead for 
Did you mean: 

How to make TFA redundant and how to make ROM code select different partitions of FSBL?

ZUl A.1
Associate II

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?

13 REPLIES 13
Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

So what is the mechanism for flash memory corruption? If the FSBL1 is not working it will automatically goes to the FSBL2?

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

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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.

No there is no way.

But again why do you need this ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

We want to update our TFA too.

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

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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.

Hi @ZUl A.1​ ,

"As suggested by STM" Sorry, can you point me where you read this ?

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.