Madhukar Pappireddy | c683cf6 | 2021-11-01 14:38:32 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2021, Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | post_tf_build() { |
| 9 | if [ ! -f "$archive/scp_ram.bin" ]; then |
| 10 | url="$scp_prebuilts/tc$plat_variant/release/scp_bl2.bin" saveas="scp_ram.bin" fetch_file |
| 11 | archive_file "scp_ram.bin" |
| 12 | fi |
| 13 | |
| 14 | build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin" SCP_BL2="$archive/scp_ram.bin" |
| 15 | } |
| 16 | |
| 17 | fetch_tf_resource() { |
| 18 | # Expect scripts |
| 19 | uart="0" set_payload_uart="1" file="tftf-non-primary.exp" track_expect |
| 20 | uart="1" set_primary="1" file="spm-cactus-sp-uart1.exp" track_expect |
| 21 | |
| 22 | payload_type="tftf" gen_fvp_yaml_template |
| 23 | |
| 24 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
| 25 | if [ ! -f "$archive/scp_rom.bin" ]; then |
| 26 | # Pick the appropriate binary based on target platform variant |
| 27 | url="$scp_prebuilts/tc$plat_variant/release/scp_bl1.bin" saveas="scp_rom.bin" fetch_file |
| 28 | archive_file "scp_rom.bin" |
| 29 | fi |
| 30 | } |
| 31 | |
| 32 | post_fetch_tf_resource() { |
| 33 | local model="tc0" |
| 34 | |
| 35 | model="$model" gen_model_params |
| 36 | |
| 37 | set_run_env "ports_script" "$ci_root/model/tc-ports.awk" |
| 38 | set_run_env "num_uarts" "2" |
| 39 | uart="1" set_expect_variable "num_cpus" "8" |
| 40 | model="$model" gen_fvp_yaml |
| 41 | } |