is it possible to modify first stage bootloder, u-boot-spl.stm32 for bootup from SD card
To bootup STM32MP157 from SD card, the layout for SD is
partition#1, u-boot-spl.stm32, first copy of first stage bootloader
partition#2, u-boot-spl.stm32, second copy of first stage bootloader
partition#3, u-boot.img, second stage bootloader
partition#4, rfs.ext4, root file system
here there is single copy of second stage bootloader, if there is power off during flashing firmware, uboot on partition#3 might be corrupted and then my device would not be able to bootup, I would like to change the partition layout to
partition#1, u-boot-spl.stm32, first copy of first stage bootloader
partition#2, u-boot-spl.stm32, second copy of first stage bootloader
partition#3, u-boot.img, first copy of second stage bootloader
partition#4, u-boot.img, second copy of second stage bootloader
partition#5, rfs.ext4, root file system
and modify the spl first stage bootloader to add in check, if it detect 1st copy of uboot is corrupted, then it will load second copy instead, so far haven't seen any document on how to do it.
Also actually in my previous production device, I always have 3 copy of boot, 2 of them can be filed update by user, and one copy is read only factory default one, just in case, somehow both first 2 corrupted by human error, device is still able to boot up.
