diff mbox series

[v2,1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot

Message ID 20210704154515.431798-2-geomatsi@gmail.com
State Accepted
Headers show
Series stm32mp157c-dk2: bsp updates and fixes | expand

Commit Message

Sergey Matyukevich July 4, 2021, 3:45 p.m. UTC
The stm32mp157c-dk2 image successfully boots 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>
---
 board/stmicroelectronics/common/stm32mp157/genimage.cfg.template | 1 +
 1 file changed, 1 insertion(+)

Comments

Pierre-Jean Texier July 9, 2021, 7:24 p.m. UTC | #1
Hi Sergey,

Le 04/07/2021 à 17:45, Sergey Matyukevich a écrit :
> The stm32mp157c-dk2 image successfully boots 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>

> ---
>   board/stmicroelectronics/common/stm32mp157/genimage.cfg.template | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
> index f341c19f2f..03fba8daf0 100644
> --- a/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
> +++ b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
> @@ -13,6 +13,7 @@ image sdcard.img {
>   
>   	partition ssbl {
>   		image = "u-boot.stm32"
> +		size = 2M
>   	}
>   
>   	partition rootfs {
> 

Thanks !
--
Pierre-Jean Texier
diff mbox series

Patch

diff --git a/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
index f341c19f2f..03fba8daf0 100644
--- a/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
+++ b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template
@@ -13,6 +13,7 @@  image sdcard.img {
 
 	partition ssbl {
 		image = "u-boot.stm32"
+		size = 2M
 	}
 
 	partition rootfs {