Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2023, Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | source "$ci_root/run_config/tc_rss_utils.sh" |
| 9 | |
| 10 | post_tf_build() { |
| 11 | if [ ! -f "$archive/scp_ram.bin" ]; then |
| 12 | url="$scp_prebuilts/tc$plat_variant/release/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
| 13 | archive_file "scp_ram.bin" |
| 14 | fi |
| 15 | |
| 16 | build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin" SCP_BL2="$archive/scp_ram.bin" |
| 17 | } |
| 18 | |
| 19 | fetch_tf_resource() { |
| 20 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
| 21 | if [ ! -f "$archive/scp_rom.bin" ]; then |
| 22 | # Pick the appropriate binary based on target platform variant |
| 23 | url="$scp_prebuilts/tc$plat_variant/release/tc$plat_variant-bl1.bin" saveas="scp_rom.bin" fetch_file |
| 24 | archive_file "scp_rom.bin" |
| 25 | fi |
| 26 | |
| 27 | # RSS output is printed to UART 2 so track it. |
| 28 | uart="2" file="hold_uart.exp" track_expect |
| 29 | |
| 30 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 31 | |
| 32 | update_fip |
| 33 | } |
| 34 | |
| 35 | generate_lava_job_template() { |
| 36 | uart="0" port="5002" set_primary="1" file="tftf-non-primary.exp" track_expect |
| 37 | uart="1" port="5003" file="spm-cactus-sp-uart1.exp" track_expect |
| 38 | |
| 39 | set_uart_port "${archive:?}" 2 5000 |
| 40 | set_uart_port "${archive:?}" 3 5001 |
| 41 | |
| 42 | payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template |
| 43 | } |