board/stmicroelectronics/common/stm32mp157: fix U-Boot corruption on the first boot
authorSergey Matyukevich <geomatsi@gmail.com>
Sun, 4 Jul 2021 15:45:14 +0000 (18:45 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 15 Jul 2021 19:59:15 +0000 (21:59 +0200)
The stm32mp157 images successfully boot only once. Subsequent boot
attempts fail to reach U-Boot. The root cause turns out to be in U-Boot
corruption during the first boot. The stm32mp1 U-Boot stores its
environment at the end of GPT partition named 'ssbl' since v2020.10-rc2.
However Buildroot genimage template for stm32mp157 boards creates 'ssbl'
partition w/o extra space for U-Boot primary and redundant environments.
This patch explicitly specifies 'ssbl' partition size that should be
enough for both u-boot.stm32 image (~1M) and both environments (16K).

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Tested-by: Pierre-Jean Texier <texier.pj2@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
board/stmicroelectronics/common/stm32mp157/genimage.cfg.template

index f341c19f2f2fd6feb58ab2b101ad2f224eada24a..03fba8daf075a0eda9050607eb66b08bef593d24 100644 (file)
@@ -13,6 +13,7 @@ image sdcard.img {
 
        partition ssbl {
                image = "u-boot.stm32"
+               size = 2M
        }
 
        partition rootfs {