Juan Pablo Conde | bc764ee | 2024-04-01 13:50:25 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2024, Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | source "$ci_root/run_config/tc_rse_utils.sh" |
| 8 | |
| 9 | post_tf_build() { |
| 10 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
| 11 | if [ ! -f "$archive/scp_ram.bin" ]; then |
| 12 | url="$scp_mcp_downloads/totalcompute/tc$plat_variant/platform_variant_0/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" SCP_BL2="$archive/scp_ram.bin" |
| 17 | } |
| 18 | |
| 19 | fetch_tf_resource() { |
| 20 | # RSE output is printed to UART 2 so track it. |
| 21 | uart="1" port="5003" file="hold_uart.exp" track_expect |
| 22 | |
| 23 | get_rse_prov_bins |
| 24 | |
| 25 | # sign AP bl1 |
| 26 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 27 | |
| 28 | # Update FIP with pre-built RSS binaries and signed AP BL1 to create host flash fip image |
| 29 | update_fip |
| 30 | |
| 31 | # Create GPT image |
| 32 | gen_gpt_bin $archive/host_flash_fip.bin 12582912 16 |
| 33 | } |
| 34 | |
| 35 | generate_lava_job_template() { |
| 36 | uart="2" port="5000" set_primary="1" file="tftf-non-primary.exp" track_expect |
| 37 | |
| 38 | set_uart_port "${archive:?}" 0 5002 |
| 39 | set_uart_port "${archive:?}" 1 5003 |
| 40 | set_uart_port "${archive:?}" 2 5000 |
| 41 | set_uart_port "${archive:?}" 3 5001 |
| 42 | |
| 43 | payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template |
| 44 | } |