configs/avenger96_defconfig: downgrade to TF-A v2.5

Commit 27bf08e4ad (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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Peter Korsgaard 2023-11-05 19:37:19 +01:00 committed by Thomas Petazzoni
parent 69ac9fdbc4
commit deb8d71c92
2 changed files with 54 additions and 3 deletions

View File

@ -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

View File

@ -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