* [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes
@ 2021-07-04 15:45 Sergey Matyukevich
2021-07-04 15:45 ` [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot Sergey Matyukevich
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Sergey Matyukevich @ 2021-07-04 15:45 UTC (permalink / raw)
To: buildroot
Hi all,
This is the second revision of the patch series that introduces several
updates and fixes for stm32mp157c-dk2:
- update BSP: bump Linux, U-Boot, TF-A versions (applied from v1)
- remove u-boot config fragment that disables watchdog
- fix U-Boot corruption
BSP update part of the series has been already applied. Besides, Thomas
noted that non-trusted configuration is no longer supported by vendor,
so this part has been dropped completely. Finally, a more simple and
straightforward approach has been implemented to fix U-Boot corruption.
Regards,
Sergey
v2:
- drop non-trusted configuration
- simplify U-Boot corruption fix: specify larger ssbl size
Sergey Matyukevich (2):
board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
stm32mp157c_dk2: remove uboot config fragment
board/stmicroelectronics/common/stm32mp157/genimage.cfg.template | 1 +
board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config | 1 -
configs/stm32mp157c_dk2_defconfig | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
2021-07-04 15:45 [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Sergey Matyukevich
@ 2021-07-04 15:45 ` Sergey Matyukevich
2021-07-09 19:24 ` Pierre-Jean Texier
2021-07-04 15:45 ` [Buildroot] [PATCH v2 2/2] stm32mp157c_dk2: remove uboot config fragment Sergey Matyukevich
2021-07-15 20:37 ` [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Thomas Petazzoni
2 siblings, 1 reply; 7+ messages in thread
From: Sergey Matyukevich @ 2021-07-04 15:45 UTC (permalink / raw)
To: buildroot
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(+)
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 {
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
2021-07-04 15:45 ` [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot Sergey Matyukevich
@ 2021-07-09 19:24 ` Pierre-Jean Texier
0 siblings, 0 replies; 7+ messages in thread
From: Pierre-Jean Texier @ 2021-07-09 19:24 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 2/2] stm32mp157c_dk2: remove uboot config fragment
2021-07-04 15:45 [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Sergey Matyukevich
2021-07-04 15:45 ` [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot Sergey Matyukevich
@ 2021-07-04 15:45 ` Sergey Matyukevich
2021-07-15 20:37 ` [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Thomas Petazzoni
2 siblings, 0 replies; 7+ messages in thread
From: Sergey Matyukevich @ 2021-07-04 15:45 UTC (permalink / raw)
To: buildroot
Running stm32mp1 watchdog is properly recognized and handled by kernel
watchdog framework since Linux v5.6. For details see the Linux commit
85fdc63fe256 ("drivers: watchdog: stm32_iwdg: set WDOG_HW_RUNNING at
probe"). So U-Boot config fragment can be safely removed without
adding userspace watchdog daemon.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config | 1 -
configs/stm32mp157c_dk2_defconfig | 1 -
2 files changed, 2 deletions(-)
delete mode 100644 board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config
diff --git a/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config b/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config
deleted file mode 100644
index a278ce9e23..0000000000
--- a/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_STM32MP_WATCHDOG is not set
diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig
index 6fea63d427..a4bff897e5 100644
--- a/configs/stm32mp157c_dk2_defconfig
+++ b/configs/stm32mp157c_dk2_defconfig
@@ -27,7 +27,6 @@ BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.04"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted"
-BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config"
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_STM32=y
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2"
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes
2021-07-04 15:45 [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Sergey Matyukevich
2021-07-04 15:45 ` [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot Sergey Matyukevich
2021-07-04 15:45 ` [Buildroot] [PATCH v2 2/2] stm32mp157c_dk2: remove uboot config fragment Sergey Matyukevich
@ 2021-07-15 20:37 ` Thomas Petazzoni
2021-07-15 20:52 ` Sergey Matyukevich
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2021-07-15 20:37 UTC (permalink / raw)
To: buildroot
On Sun, 4 Jul 2021 18:45:13 +0300
Sergey Matyukevich <geomatsi@gmail.com> wrote:
> Sergey Matyukevich (2):
> board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
> stm32mp157c_dk2: remove uboot config fragment
Both applied, thanks! As I mentioned in my reply to Pierre-Jean Texier,
I would prefer if we could keep in sync the DK1 and DK2 configurations,
so it'd be nice if you and Pierre-Jean could send the appropriate
patches to bring them back in sync.
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes
2021-07-15 20:37 ` [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Thomas Petazzoni
@ 2021-07-15 20:52 ` Sergey Matyukevich
2021-07-15 21:03 ` Sergey Matyukevich
0 siblings, 1 reply; 7+ messages in thread
From: Sergey Matyukevich @ 2021-07-15 20:52 UTC (permalink / raw)
To: buildroot
Hello Thomas, Pierre-Jean,
> > Sergey Matyukevich (2):
> > board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
> > stm32mp157c_dk2: remove uboot config fragment
>
> Both applied, thanks! As I mentioned in my reply to Pierre-Jean Texier,
> I would prefer if we could keep in sync the DK1 and DK2 configurations,
> so it'd be nice if you and Pierre-Jean could send the appropriate
> patches to bring them back in sync.
I don't have DK1 board at my disposal. But I can post the patches
if Pierre-Jean is ready to test them.
Regards,
Sergey
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes
2021-07-15 20:52 ` Sergey Matyukevich
@ 2021-07-15 21:03 ` Sergey Matyukevich
0 siblings, 0 replies; 7+ messages in thread
From: Sergey Matyukevich @ 2021-07-15 21:03 UTC (permalink / raw)
To: buildroot
> Hello Thomas, Pierre-Jean,
>
> > > Sergey Matyukevich (2):
> > > board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
> > > stm32mp157c_dk2: remove uboot config fragment
> >
> > Both applied, thanks! As I mentioned in my reply to Pierre-Jean Texier,
> > I would prefer if we could keep in sync the DK1 and DK2 configurations,
> > so it'd be nice if you and Pierre-Jean could send the appropriate
> > patches to bring them back in sync.
>
> I don't have DK1 board at my disposal. But I can post the patches
> if Pierre-Jean is ready to test them.
Too late =) Pierre-Jean has already posted all the expected patches.
Regards,
Sergey
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-15 21:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-04 15:45 [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Sergey Matyukevich
2021-07-04 15:45 ` [Buildroot] [PATCH v2 1/2] board/stm32mp157c-dk2: fix U-Boot corruption on the first boot Sergey Matyukevich
2021-07-09 19:24 ` Pierre-Jean Texier
2021-07-04 15:45 ` [Buildroot] [PATCH v2 2/2] stm32mp157c_dk2: remove uboot config fragment Sergey Matyukevich
2021-07-15 20:37 ` [Buildroot] [PATCH v2 0/2] stm32mp157c-dk2: bsp updates and fixes Thomas Petazzoni
2021-07-15 20:52 ` Sergey Matyukevich
2021-07-15 21:03 ` Sergey Matyukevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox