Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
@ 2023-11-05 18:37 Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: " Peter Korsgaard
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-05 18:37 UTC (permalink / raw)
  To: buildroot; +Cc: Bartosz Bilas

With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
switch to gcc 12.x as the default), TF-A now fails to build as a warning is
generated and it builds with -Werror:

  CC      plat/st/stm32mp1/bl2_plat_setup.c
drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
  249 |         int result;
      |             ^~~~~~
cc1: all warnings being treated as errors

This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
uninitialized variable warning), but I do not have the board to verify if
v2.6 works, so instead disable -Werror by masssing E=0.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 configs/stm32mp157a_dk1_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/stm32mp157a_dk1_defconfig b/configs/stm32mp157a_dk1_defconfig
index ecaace54b8..e764a1558d 100644
--- a/configs/stm32mp157a_dk1_defconfig
+++ b/configs/stm32mp157a_dk1_defconfig
@@ -30,7 +30,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb E=0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
 BR2_TARGET_UBOOT=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
@ 2023-11-05 18:37 ` Peter Korsgaard
  2023-11-10 12:24   ` Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version Peter Korsgaard
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-05 18:37 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
switch to gcc 12.x as the default), TF-A now fails to build as a warning is
generated and it builds with -Werror:

  CC      plat/st/stm32mp1/bl2_plat_setup.c
drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
  249 |         int result;
      |             ^~~~~~
cc1: all warnings being treated as errors

This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
uninitialized variable warning), but I do not have the board to verify if
v2.6 works, so instead disable -Werror by masssing E=0.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 configs/stm32mp157c_dk2_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig
index cf2433d67e..aa0fcfa843 100644
--- a/configs/stm32mp157c_dk2_defconfig
+++ b/configs/stm32mp157c_dk2_defconfig
@@ -30,7 +30,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb E=0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
 BR2_TARGET_UBOOT=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: " Peter Korsgaard
@ 2023-11-05 18:37 ` Peter Korsgaard
  2023-11-10 12:24   ` Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5 Peter Korsgaard
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-05 18:37 UTC (permalink / raw)
  To: buildroot; +Cc: Simon Doppler

Commit f20589cbc7a (configs/stm32mp157c_odyssey: new defconfig) forgot to
specify a fixed TF-A version, so do that now.

When the defconfig was added, the default version was v2.5 - So use that.
Similarly to the other stm32mp1 defconfigs, this needs disabling -Werror
with E=0 to fix a build issue with GCC >= 12.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 configs/stm32mp157c_odyssey_defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configs/stm32mp157c_odyssey_defconfig b/configs/stm32mp157c_odyssey_defconfig
index 15b9a63b39..2d3600410a 100644
--- a/configs/stm32mp157c_odyssey_defconfig
+++ b/configs/stm32mp157c_odyssey_defconfig
@@ -17,8 +17,10 @@ BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-odyssey.dtb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-odyssey.dtb E=0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
 BR2_TARGET_UBOOT=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: " Peter Korsgaard
  2023-11-05 18:37 ` [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version Peter Korsgaard
@ 2023-11-05 18:37 ` Peter Korsgaard
  2023-11-10 12:26   ` Peter Korsgaard
  2023-11-05 20:22 ` [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Arnout Vandecappelle via buildroot
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-05 18:37 UTC (permalink / raw)
  To: buildroot

Commit 27bf08e4addb78 (configs/avenger96_defconfig: bump ATF version to 2.9
for binutils 2.39+ support) bumped TF-A, but it unfortunately does not boot
and instead dies with a panic:

NOTICE:  CPU: STM32MP157AAC Rev.B
NOTICE:  Model: Arrow Electronics STM32MP157A Avenger96 board
ERROR:   nvmem node board_id not found
INFO:    PMIC version = 0x10
ERROR:   Product_below_2v5=1:
ERROR:          HSLVEN update is destructive,
ERROR:          no update as VDD > 2.7V
PANIC at PC : 0x2fff086f

Exception mode=0x00000016 at: 0x2fff086f

Instead use v2.5 to match the other stm32mp1 boards and use the same E=0
-Werror workaround.  The avenger95 support is unfortunately broken since
v2.3 with the introduction of authentication support, so add a patch to the
DTS to fix that.

Notice that the authentication support was reworked in v2.7 so it is skipped
for the mp157a variant used on the avenger96, so the patch is not upstreamable.

While we're at it, also drop the debug option for consistency with the other
boards.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...ger96.dts-enable-hash-device-to-unbr.patch | 51 +++++++++++++++++++
 configs/avenger96_defconfig                   |  6 +--
 2 files changed, 54 insertions(+), 3 deletions(-)
 create mode 100644 board/arrow/avenger96/patches/arm-trusted-firmware/0001-stm32mp157a-avenger96.dts-enable-hash-device-to-unbr.patch

diff --git a/board/arrow/avenger96/patches/arm-trusted-firmware/0001-stm32mp157a-avenger96.dts-enable-hash-device-to-unbr.patch b/board/arrow/avenger96/patches/arm-trusted-firmware/0001-stm32mp157a-avenger96.dts-enable-hash-device-to-unbr.patch
new file mode 100644
index 0000000000..8cec0af3b1
--- /dev/null
+++ b/board/arrow/avenger96/patches/arm-trusted-firmware/0001-stm32mp157a-avenger96.dts-enable-hash-device-to-unbr.patch
@@ -0,0 +1,51 @@
+From 336dc301e02d64507447f82020ce7a349797bef3 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <peter@korsgaard.com>
+Date: Sun, 5 Nov 2023 14:59:16 +0100
+Subject: [PATCH] stm32mp157a-avenger96.dts: enable hash device to unbreak boot
+ issue
+
+The avenger96 board was forgotten when authentication support was added with
+commit 4bdb1a7a6a1325343 (stm32mp1: add authentication support for
+stm32image), causing a panic when stm32mp_init_auth() is called, so fix it
+similar to how it was done for the STM32MP157C-ED1 board with:
+
+commit b37b52ef8bc05bfd8dcca992d4ba84cd7c5d23bb
+Author: Yann Gautier <yann.gautier@st.com>
+Date:   Tue Oct 13 18:05:06 2020 +0200
+
+    fdts: add missing hash node in STM32MP157C-ED1 board DT
+
+    Without this node, the board fails to boot and panics in the function
+    stm32mp_init_auth().
+
+    Change-Id: Ia54924410dac2a8c94dd6e45d7e93977fe7d87e2
+    Signed-off-by: Yann Gautier <yann.gautier@st.com>
+
+Upstream: N/A - Upstream reworked authentication to skip it for MP157A
+ variant since v2.7, see "feat(st): disable authentication based on
+ part_number"
+ (https://github.com/ARM-software/arm-trusted-firmware/commit/49abdfd8cececb91a4bc7e7b29a30c09dce461c7)
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ fdts/stm32mp157a-avenger96.dts | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/fdts/stm32mp157a-avenger96.dts b/fdts/stm32mp157a-avenger96.dts
+index b967736e4..76edecb83 100644
+--- a/fdts/stm32mp157a-avenger96.dts
++++ b/fdts/stm32mp157a-avenger96.dts
+@@ -271,6 +271,10 @@
+ 	};
+ };
+ 
++&hash1 {
++	status = "okay";
++};
++
+ &rng1 {
+ 	status = "okay";
+ };
+-- 
+2.39.2
+
diff --git a/configs/avenger96_defconfig b/configs/avenger96_defconfig
index adfd7585c4..142f6dd8c9 100644
--- a/configs/avenger96_defconfig
+++ b/configs/avenger96_defconfig
@@ -1,6 +1,7 @@
 BR2_arm=y
 BR2_cortex_a7=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
+BR2_GLOBAL_PATCH_DIR="board/arrow/avenger96/patches"
 BR2_ROOTFS_OVERLAY="board/arrow/avenger96/overlay/"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh"
 BR2_LINUX_KERNEL=y
@@ -17,10 +18,9 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.9"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-avenger96.dtb"
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-avenger96.dtb E=0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
 BR2_TARGET_UBOOT=y
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
                   ` (2 preceding siblings ...)
  2023-11-05 18:37 ` [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5 Peter Korsgaard
@ 2023-11-05 20:22 ` Arnout Vandecappelle via buildroot
  2023-11-06  9:18   ` Peter Korsgaard
  2023-11-06 22:11 ` Thomas Petazzoni via buildroot
  2023-11-10 12:24 ` Peter Korsgaard
  5 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2023-11-05 20:22 UTC (permalink / raw)
  To: Peter Korsgaard, buildroot; +Cc: Bartosz Bilas



On 05/11/2023 19:37, Peter Korsgaard wrote:
> With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
> switch to gcc 12.x as the default), TF-A now fails to build as a warning is
> generated and it builds with -Werror:
> 
>    CC      plat/st/stm32mp1/bl2_plat_setup.c
> drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
> drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
>    249 |         int result;
>        |             ^~~~~~
> cc1: all warnings being treated as errors
> 
> This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
> uninitialized variable warning), but I do not have the board to verify if
> v2.6 works, so instead disable -Werror by masssing E=0.

  I (or actually, my colleagues) have both a DK1 and a DK2, so shall I test the 
2.9 bump on them?

  Regards,
  Arnout

> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>   configs/stm32mp157a_dk1_defconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/stm32mp157a_dk1_defconfig b/configs/stm32mp157a_dk1_defconfig
> index ecaace54b8..e764a1558d 100644
> --- a/configs/stm32mp157a_dk1_defconfig
> +++ b/configs/stm32mp157a_dk1_defconfig
> @@ -30,7 +30,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
>   BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
>   BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
>   BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
> -BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb E=0"
>   BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
>   BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
>   BR2_TARGET_UBOOT=y
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 20:22 ` [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Arnout Vandecappelle via buildroot
@ 2023-11-06  9:18   ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-06  9:18 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: Bartosz Bilas, buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 05/11/2023 19:37, Peter Korsgaard wrote:
 >> With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
 >> switch to gcc 12.x as the default), TF-A now fails to build as a warning is
 >> generated and it builds with -Werror:
 >> CC      plat/st/stm32mp1/bl2_plat_setup.c
 >> drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
 >> drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
 >> 249 |         int result;
 >> |             ^~~~~~
 >> cc1: all warnings being treated as errors
 >> This is fixed in TF-A v2.6 with commit c1d732d0db24
 >> (fix(io_stm32image):
 >> uninitialized variable warning), but I do not have the board to verify if
 >> v2.6 works, so instead disable -Werror by masssing E=0.

Ehh, that should naturally be passing ;)

 >  I (or actually, my colleagues) have both a DK1 and a DK2, so shall I
 >  test the 2.9 bump on them?

Feel free to do so, but it afaik requires a change to the "FIP" format
(and hence shared genimage template) as the stm32 format got dropped in
v2.8 with:

commit 981b9dcb878c868983388cd86c133f663eab1af4
Author: Yann Gautier <yann.gautier@st.com>
Date:   Mon Nov 14 14:14:48 2022 +0100

    refactor(stm32mp1): remove STM32MP_USE_STM32IMAGE

    The code managing legacy boot (without FIP) that was under
    STM32MP_USE_STM32IMAGE flag is remove.

    Change-Id: I04452453ed84567b0de39e900594a81526562259
    Signed-off-by: Yann Gautier <yann.gautier@st.com>

So for 2023.11, I think it makes more sense to stick to v2.5.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
                   ` (3 preceding siblings ...)
  2023-11-05 20:22 ` [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Arnout Vandecappelle via buildroot
@ 2023-11-06 22:11 ` Thomas Petazzoni via buildroot
  2023-11-10 12:24 ` Peter Korsgaard
  5 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-06 22:11 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Bartosz Bilas, buildroot

On Sun,  5 Nov 2023 19:37:16 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:

> With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
> switch to gcc 12.x as the default), TF-A now fails to build as a warning is
> generated and it builds with -Werror:
> 
>   CC      plat/st/stm32mp1/bl2_plat_setup.c
> drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
> drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
>   249 |         int result;
>       |             ^~~~~~
> cc1: all warnings being treated as errors
> 
> This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
> uninitialized variable warning), but I do not have the board to verify if
> v2.6 works, so instead disable -Werror by masssing E=0.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  configs/stm32mp157a_dk1_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks all four patches applied. I fixed the massing -> passing typo.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
                   ` (4 preceding siblings ...)
  2023-11-06 22:11 ` Thomas Petazzoni via buildroot
@ 2023-11-10 12:24 ` Peter Korsgaard
  5 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-10 12:24 UTC (permalink / raw)
  To: buildroot; +Cc: Bartosz Bilas

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
 > switch to gcc 12.x as the default), TF-A now fails to build as a warning is
 > generated and it builds with -Werror:

 >   CC      plat/st/stm32mp1/bl2_plat_setup.c
 > drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
 > drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
 >   249 |         int result;
 >       |             ^~~~~~
 > cc1: all warnings being treated as errors

 > This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
 > uninitialized variable warning), but I do not have the board to verify if
 > v2.6 works, so instead disable -Werror by masssing E=0.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2023.02.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: unbreak TF-A build with GCC >= 12
  2023-11-05 18:37 ` [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: " Peter Korsgaard
@ 2023-11-10 12:24   ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-10 12:24 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > With the move to default to GCC 12 in commit e0091e42eef9 (package/gcc:
 > switch to gcc 12.x as the default), TF-A now fails to build as a warning is
 > generated and it builds with -Werror:

 >   CC      plat/st/stm32mp1/bl2_plat_setup.c
 > drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
 > drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
 >   249 |         int result;
 >       |             ^~~~~~
 > cc1: all warnings being treated as errors

 > This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
 > uninitialized variable warning), but I do not have the board to verify if
 > v2.6 works, so instead disable -Werror by masssing E=0.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2023.02.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version
  2023-11-05 18:37 ` [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version Peter Korsgaard
@ 2023-11-10 12:24   ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-10 12:24 UTC (permalink / raw)
  To: buildroot; +Cc: Simon Doppler

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Commit f20589cbc7a (configs/stm32mp157c_odyssey: new defconfig) forgot to
 > specify a fixed TF-A version, so do that now.

 > When the defconfig was added, the default version was v2.5 - So use that.
 > Similarly to the other stm32mp1 defconfigs, this needs disabling -Werror
 > with E=0 to fix a build issue with GCC >= 12.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2023.02.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5
  2023-11-05 18:37 ` [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5 Peter Korsgaard
@ 2023-11-10 12:26   ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2023-11-10 12:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Commit 27bf08e4addb78 (configs/avenger96_defconfig: bump ATF version to 2.9
 > for binutils 2.39+ support) bumped TF-A, but it unfortunately does not boot
 > and instead dies with a panic:

 > NOTICE:  CPU: STM32MP157AAC Rev.B
 > NOTICE:  Model: Arrow Electronics STM32MP157A Avenger96 board
 > ERROR:   nvmem node board_id not found
 > INFO:    PMIC version = 0x10
 > ERROR:   Product_below_2v5=1:
 > ERROR:          HSLVEN update is destructive,
 > ERROR:          no update as VDD > 2.7V
 > PANIC at PC : 0x2fff086f

 > Exception mode=0x00000016 at: 0x2fff086f

 > Instead use v2.5 to match the other stm32mp1 boards and use the same E=0
 > -Werror workaround.  The avenger95 support is unfortunately broken since
 > v2.3 with the introduction of authentication support, so add a patch to the
 > DTS to fix that.

 > Notice that the authentication support was reworked in v2.7 so it is skipped
 > for the mp157a variant used on the avenger96, so the patch is not upstreamable.

 > While we're at it, also drop the debug option for consistency with the other
 > boards.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-10 12:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 18:37 [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Peter Korsgaard
2023-11-05 18:37 ` [Buildroot] [PATCH 2/4] configs/stm32mp157c_dk2_defconfig: " Peter Korsgaard
2023-11-10 12:24   ` Peter Korsgaard
2023-11-05 18:37 ` [Buildroot] [PATCH 3/4] configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version Peter Korsgaard
2023-11-10 12:24   ` Peter Korsgaard
2023-11-05 18:37 ` [Buildroot] [PATCH 4/4] configs/avenger96_defconfig: downgrade to TF-A v2.5 Peter Korsgaard
2023-11-10 12:26   ` Peter Korsgaard
2023-11-05 20:22 ` [Buildroot] [PATCH 1/4] configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12 Arnout Vandecappelle via buildroot
2023-11-06  9:18   ` Peter Korsgaard
2023-11-06 22:11 ` Thomas Petazzoni via buildroot
2023-11-10 12:24 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox