blob: 9c0b5f36849756ba608319fed2a23d970dc90fc9 [file] [log] [blame]
Juan Pablo Condebc764ee2024-04-01 13:50:25 -05001#!/usr/bin/env bash
2#
3# Copyright (c) 2024, Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7source "$ci_root/run_config/tc_rse_utils.sh"
8
9post_tf_build() {
David Vinczebfb554f2024-10-18 14:37:42 +000010 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
David Vinczeb38fefa2024-10-28 11:56:28 +000013 archive_file "scp_ram.bin"
David Vinczebfb554f2024-10-18 14:37:42 +000014 build_fip BL33="$archive/tftf.bin" SCP_BL2="$archive/scp_ram.bin"
15 else
16 build_fip BL33="$archive/tftf.bin"
17 fi
Juan Pablo Condebc764ee2024-04-01 13:50:25 -050018}
19
20fetch_tf_resource() {
21 # RSE output is printed to UART 2 so track it.
22 uart="1" port="5003" file="hold_uart.exp" track_expect
23
24 get_rse_prov_bins
25
26 # sign AP bl1
27 sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size
28
David Vincze9d689082024-10-21 16:23:19 +000029 # Update FIP with pre-built RSE binaries and signed AP BL1 to create host flash fip image
Juan Pablo Condebc764ee2024-04-01 13:50:25 -050030 update_fip
31
32 # Create GPT image
33 gen_gpt_bin $archive/host_flash_fip.bin 12582912 16
34}
35
36generate_lava_job_template() {
37 uart="2" port="5000" set_primary="1" file="tftf-non-primary.exp" track_expect
38
39 set_uart_port "${archive:?}" 0 5002
40 set_uart_port "${archive:?}" 1 5003
41 set_uart_port "${archive:?}" 2 5000
42 set_uart_port "${archive:?}" 3 5001
43
44 payload_type="tftf" memory_tagging_support_level="2" gen_yaml_template
45}