Hi Vyacheslav,
I confirm my statements, when using eMMC, the BootROM only see one (and only one) single boot partition and has no way to know which boot partition is active (BootROM does not read any CSD nor issue any command to the eMMC, except a reset command).
The choice for this 'boot active' partition is done by the application, not by the BootROM.
I agree that using fsbl1 might be seen as wrong as during flashing of the two boot partitions, we name them fsbl1 and fsbl2. But for bootROM point of view, there is only one fsbl visible (named fsbl1, even if it could be fsbl2 in reality).
There is no bug there, so nothing to fix (btw, BootROM content cannot be changed).
The fsbl1/fsbl2 parameter context is useful only for other Flash boot (SLC NAND, SD-Card, Serial-NOR, Serial-NAND), but seen as useless for eMMC which has a very specific boot.
This is stated in eMMC JEDEC standard (JESD84-B51 for instance)
For eMMC, a safe update on the FSBL could be done in following steps (example with #2 as current active partition in PARTITION_CONFIG):
- check (using PARTITION_CONFIG read) which partition is active for boot (e.g. #2)
- update content of the other partition (e.g. #1), carefully verify it
- update PARTITION_CONFIG to use the other partition (e.g. #1)
In case of unwanted reboot (reset or power fail) at any time before step 3, the platform will restart cleanly from current active boot partition (e.g. #2). It is up to your update SW to manage this failure and restart the update process from the beginning.
I think there is no need here to have a 'step 4' to refresh the 'old' partition (e.g. #2) as after step 3 there is no way to boot from it.
Regards.
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent