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() { |
David Vincze | bfb554f | 2024-10-18 14:37:42 +0000 | [diff] [blame] | 10 | if [ $plat_variant -eq 3 ]; then |
| 11 | # Use pre-built SCP BL2 binary |
| 12 | url="$tfa_downloads/total_compute/tc$plat_variant/scp/$scp_revision/tc$plat_variant-bl2.bin" saveas="scp_ram.bin" fetch_file |
| 13 | else |
| 14 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
| 15 | if [ ! -f "$archive/scp_ram.bin" ]; 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 | fi |
Juan Pablo Conde | bc764ee | 2024-04-01 13:50:25 -0500 | [diff] [blame] | 18 | fi |
David Vincze | bfb554f | 2024-10-18 14:37:42 +0000 | [diff] [blame] | 19 | archive_file "scp_ram.bin" |
Juan Pablo Conde | bc764ee | 2024-04-01 13:50:25 -0500 | [diff] [blame] | 20 | |
David Vincze | bfb554f | 2024-10-18 14:37:42 +0000 | [diff] [blame] | 21 | if [ $plat_variant -eq 3 ]; then |
| 22 | build_fip BL33="$archive/tftf.bin" SCP_BL2="$archive/scp_ram.bin" |
| 23 | else |
| 24 | build_fip BL33="$archive/tftf.bin" |
| 25 | fi |
Juan Pablo Conde | bc764ee | 2024-04-01 13:50:25 -0500 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | fetch_tf_resource() { |
| 29 | # RSE output is printed to UART 2 so track it. |
| 30 | uart="1" port="5003" file="hold_uart.exp" track_expect |
| 31 | |
| 32 | get_rse_prov_bins |
| 33 | |
| 34 | # sign AP bl1 |
| 35 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 36 | |
David Vincze | 9d68908 | 2024-10-21 16:23:19 +0000 | [diff] [blame] | 37 | # Update FIP with pre-built RSE binaries and signed AP BL1 to create host flash fip image |
Juan Pablo Conde | bc764ee | 2024-04-01 13:50:25 -0500 | [diff] [blame] | 38 | update_fip |
| 39 | |
| 40 | # Create GPT image |
| 41 | gen_gpt_bin $archive/host_flash_fip.bin 12582912 16 |
| 42 | } |
| 43 | |
| 44 | generate_lava_job_template() { |
| 45 | uart="2" port="5000" set_primary="1" file="tftf-non-primary.exp" track_expect |
| 46 | |
| 47 | set_uart_port "${archive:?}" 0 5002 |
| 48 | set_uart_port "${archive:?}" 1 5003 |
| 49 | set_uart_port "${archive:?}" 2 5000 |
| 50 | set_uart_port "${archive:?}" 3 5001 |
| 51 | |
| 52 | payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template |
| 53 | } |