blob: 4a90f605d2747ed680602be437c999d56c8341fe [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
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 Condebc764ee2024-04-01 13:50:25 -050018 fi
David Vinczebfb554f2024-10-18 14:37:42 +000019 archive_file "scp_ram.bin"
Juan Pablo Condebc764ee2024-04-01 13:50:25 -050020
David Vinczebfb554f2024-10-18 14:37:42 +000021 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 Condebc764ee2024-04-01 13:50:25 -050026}
27
28fetch_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 Vincze9d689082024-10-21 16:23:19 +000037 # 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 -050038 update_fip
39
40 # Create GPT image
41 gen_gpt_bin $archive/host_flash_fip.bin 12582912 16
42}
43
44generate_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}