From d9acd7d9b25690ec2c21bed115f20b98f3e3f0b8 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Mon, 8 Apr 2024 15:50:04 +0200 Subject: ci: add FIP compilation and test for STM32MP157C-EV1 board The U-Boot binary and DT (v2024.04) are stored in a dedicated download folder [1], use them to build the FIP binary. This generated FIP is used to test the STM32MP157C-EV1 board. There are also bootfs and rootfs that will allow booting until Linux kernel console. [1] https://downloads.trustedfirmware.org/tf-a/stm32mp157c-ev1/ Signed-off-by: Yann Gautier Change-Id: Ia768509efd1775c66832fda180a6f2bb668474d2 --- run_config/stm32mp1-sp_min.bl2 | 8 ++++++++ script/gen_stm32mp1_test_yaml.sh | 3 +++ script/lava-templates/stm32mp1-boot-test.yaml | 4 +++- stm32mp1_utils.sh | 7 +++++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/run_config/stm32mp1-sp_min.bl2 b/run_config/stm32mp1-sp_min.bl2 index ba7d37d4..662cff17 100644 --- a/run_config/stm32mp1-sp_min.bl2 +++ b/run_config/stm32mp1-sp_min.bl2 @@ -1,10 +1,18 @@ #!/usr/bin/env bash # # Copyright (c) 2023 Arm Limited. All rights reserved. +# Copyright (c) 2024, STMicroelectronics - All Rights Reserved # # SPDX-License-Identifier: BSD-3-Clause # + +post_tf_build() { + url="${tfa_downloads}/stm32mp157c-ev1/u-boot-nodtb.bin" filename="u-boot-nodtb.bin" fetch_and_archive + url="${tfa_downloads}/stm32mp157c-ev1/u-boot.dtb" filename="u-boot.dtb" fetch_and_archive + build_fip BL33="$archive/u-boot-nodtb.bin" BL33_CFG="$archive/u-boot.dtb" +} + post_tf_archive() { payload_type="sp_min_bl2" gen_sp_min_bl2_sd_layout } diff --git a/script/gen_stm32mp1_test_yaml.sh b/script/gen_stm32mp1_test_yaml.sh index 445c9e79..b9d4f597 100755 --- a/script/gen_stm32mp1_test_yaml.sh +++ b/script/gen_stm32mp1_test_yaml.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # # Copyright (c) 2023 Arm Limited. All rights reserved. +# Copyright (c) 2024, STMicroelectronics - All Rights Reserved # # SPDX-License-Identifier: BSD-3-Clause # @@ -23,6 +24,7 @@ case "$payload_type" in sp_min_bl2) job_name="SP_min BL2" rep_bin_file="tf-a-stm32mp157c-ev1.stm32" + fip_bin_file="fip.bin" ;; esac @@ -33,6 +35,7 @@ else fi rep_bin_url="$file_url/$rep_bin_file" +fip_bin_url="$file_url/$fip_bin_file" flash_layout_url="$file_url/$layout_file" expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml" diff --git a/script/lava-templates/stm32mp1-boot-test.yaml b/script/lava-templates/stm32mp1-boot-test.yaml index 9717084d..30075ca5 100644 --- a/script/lava-templates/stm32mp1-boot-test.yaml +++ b/script/lava-templates/stm32mp1-boot-test.yaml @@ -16,11 +16,13 @@ actions: to: flasher images: tarball: - url: https://images.validation.linaro.org/people.linaro.org/~theodore.grey/NEWSTM/stm32mp1_ev1_tarball.tar.gz + url: https://images.validation.linaro.org/people.linaro.org/~arthur.she/images/stm32mp15/rootfs_test/stm32mp157c-ev1-filesystem.tar.bz2 layout: url: $flash_layout_url rep_bin: url: $rep_bin_url + fip_bin: + url: $fip_bin_url os: oe - boot: timeout: diff --git a/stm32mp1_utils.sh b/stm32mp1_utils.sh index 08839d56..80d8e50f 100644 --- a/stm32mp1_utils.sh +++ b/stm32mp1_utils.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # -# Copyright (c) 2023 Arm Limited. All rights reserved. +# Copyright (c) 2023-2024 Arm Limited. All rights reserved. +# Copyright (c) 2024, STMicroelectronics - All Rights Reserved # # SPDX-License-Identifier: BSD-3-Clause # @@ -21,9 +22,11 @@ P 0x04 fsbl1 Binary mmc0 0x00004400 tf-a-stm32mp157c-ev1.stm32 P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a-stm32mp157c-ev1.stm32 P 0x06 metadata1 Binary mmc0 0x00084400 metadata.bin P 0x07 metadata2 Binary mmc0 0x000C4400 metadata.bin -P 0x08 fip-a FIP mmc0 0x00104400 fip-stm32mp157c-ev1-trusted.bin +P 0x08 fip-a FIP mmc0 0x00104400 fip_bin/fip.bin PE 0x09 fip-b FIP mmc0 0x00504400 none PE 0x0A u-boot-env Binary mmc0 0x00904400 none +P 0x10 bootfs System mmc0 0x00984400 bootfs.ext2 +P 0x12 rootfs FileSystem mmc0 0x02984400 rootfs.ext2 EOF ;; esac -- cgit v1.2.3