Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 2 | # |
Jayanth Dodderi Chidanand | 4063699 | 2022-04-06 18:21:55 +0100 | [diff] [blame] | 3 | # Copyright (c) 2020-2022, Arm Limited. All rights reserved. |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | post_tf_build() { |
| 9 | url="$tc_prebuilts/u-boot.bin" fetch_file |
| 10 | archive_file "u-boot.bin" |
| 11 | |
| 12 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
Nicola Mazzucato | d15f713 | 2021-10-27 14:56:34 +0100 | [diff] [blame] | 13 | if [ ! -f "$archive/scp_ram.bin" ]; then |
Leo Yan | 2acb902 | 2024-07-26 17:29:32 +0100 | [diff] [blame^] | 14 | if [ $plat_variant -eq 2 ] || [ $plat_variant -eq 3 ]; then |
| 15 | if [ $plat_variant -eq 2 ]; then |
| 16 | url="$scp_mcp_downloads/totalcompute/tc$plat_variant/platform_variant_0/release/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
| 17 | elif [ $plat_variant -eq 3 ]; then |
| 18 | url="$tfa_downloads/total_compute/tc$plat_variant/scp/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
| 19 | fi |
| 20 | |
| 21 | archive_file "scp_ram.bin" |
Leo Yan | 5b73ad9 | 2024-06-20 15:15:36 +0100 | [diff] [blame] | 22 | fi |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 23 | fi |
| 24 | |
Leo Yan | 2acb902 | 2024-07-26 17:29:32 +0100 | [diff] [blame^] | 25 | if [ $plat_variant -eq 2 ] || [ $plat_variant -eq 3 ]; then |
| 26 | build_fip BL33="$archive/u-boot.bin" SCP_BL2="$archive/scp_ram.bin" |
| 27 | elif [ $plat_variant -eq 4 ]; then |
| 28 | build_fip BL33="$archive/u-boot.bin" |
| 29 | fi |
Zelalem | e9e8148 | 2020-07-10 15:18:46 -0500 | [diff] [blame] | 30 | } |