stm32mp157c-dk2: bsp updates and fixes
v2 cover stm32mp157c-dk2: bsp updates and fixes
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
Signature · 1 line
2.32.0
PATCH v2 1/2 board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
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).
--- board/stmicroelectronics/common/stm32mp157/genimage.cfg.template | 1 + 1 file changed, 1 insertion(+)
board/stmicroelectronics/common/stm32mp157/genimage.cfg.template +1 -0
@@ -13,6 +13,7 @@ image sdcard.img { partition ssbl { image = "u-boot.stm32" + size = 2M } partition rootfs {
Signature · 1 line
2.32.0
PATCH v2 1/2 board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
Hi Sergey,
Le 04/07/2021 ? 17:45, Sergey Matyukevich a ?crit?:
Quoted 10 lines
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 <[email protected]>
Quoted 10 lines
--- board/stmicroelectronics/common/stm32mp157/genimage.cfg.template | 1 + 1 file changed, 1 insertion(+)board/stmicroelectronics/common/stm32mp157/genimage.cfg.template +0
-0
board/stmicroelectronics/common/stm32mp157/genimage.cfg.template image sdcard.img { · line 19
Quoted 7 lines
board/stmicroelectronics/common/stm32mp157/genimage.cfg.template +1
-0@@ -13,6 +13,7 @@ image sdcard.img { partition ssbl { image = "u-boot.stm32" + size = 2M } partition rootfs {
Thanks !
--
Pierre-Jean Texier
PATCH v2 2/2 stm32mp157c_dk2: remove uboot config fragment
In reply to Sergey MatyukevichRunning 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.
--- 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
board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config deleted +0 -1
@@ -1 +0,0 @@ -# CONFIG_STM32MP_WATCHDOG is not set
configs/stm32mp157c_dk2_defconfig +0 -1
@@ -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"
Signature · 1 line
2.32.0
v2 cover stm32mp157c-dk2: bsp updates and fixes
In reply to Sergey MatyukevichQuoted 3 lines · On Sun, 4 Jul 2021 18:45:13 +0300 Sergey Matyukevich <[email protected]>…
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
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v2 cover stm32mp157c-dk2: bsp updates and fixes
Hello Thomas, Pierre-Jean,
Quoted 8 lines
Quoted 3 lines
Sergey Matyukevich (2):
board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
stm32mp157c_dk2: remove uboot config fragmentBoth 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
v2 cover stm32mp157c-dk2: bsp updates and fixes
Quoted 6 lines
Hello Thomas, Pierre-Jean,
Quoted 4 lines
Quoted 3 lines
Sergey Matyukevich (2):
board/stm32mp157c-dk2: fix U-Boot corruption on the first boot
stm32mp157c_dk2: remove uboot config fragment
Quoted 7 lines
Quoted 4 lines
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