Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 3 | # Copyright (c) 2019-2024, Arm Limited. All rights reserved. |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
Daniel Boulby | 5f29598 | 2023-05-17 12:03:05 +0100 | [diff] [blame] | 7 | source "$ci_root/run_config/tc_rss_utils.sh" |
laurenw-arm | b568410 | 2023-03-14 11:25:45 -0500 | [diff] [blame] | 8 | |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 9 | fetch_tf_resource() { |
Harrison Mutai | 6f4fd6c | 2023-03-27 13:22:41 +0100 | [diff] [blame] | 10 | image="kernel" type="tc-kernel" get_boot_image |
| 11 | image="initrd" type="tc-ramdisk" get_boot_image |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 12 | |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 13 | url="$tc_prebuilts/tc_fitimage.bin" saveas="tc_fitimage.bin" fetch_file |
| 14 | archive_file "tc_fitimage.bin" |
| 15 | |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 16 | # Use SCP binary from SCP build if it exists, or fetch pre-built ones. |
Nicola Mazzucato | d15f713 | 2021-10-27 14:56:34 +0100 | [diff] [blame] | 17 | if [ ! -f "$archive/scp_rom.bin" ]; then |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 18 | # Pick the appropriate binary based on target platform variant |
Manish V Badarkhe | 8b896ef | 2024-01-29 18:44:03 +0000 | [diff] [blame] | 19 | url="$scp_mcp_downloads/tc$plat_variant/platform_variant_0/release/tc$plat_variant-bl1.bin" saveas="scp_rom.bin" fetch_file |
Nicola Mazzucato | d15f713 | 2021-10-27 14:56:34 +0100 | [diff] [blame] | 20 | archive_file "scp_rom.bin" |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 21 | fi |
| 22 | |
Rupinderjit Singh | 8d4e1e4 | 2022-08-18 14:51:41 +0100 | [diff] [blame] | 23 | # RSS is applicable to TC2 |
| 24 | if [ $plat_variant -eq 2 ]; then |
| 25 | |
Sandrine Bailleux | 67bf650 | 2022-09-07 15:41:18 +0200 | [diff] [blame] | 26 | # Hold RSS terminal_uart_ap |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 27 | uart="1" port="5003" file="hold_uart.exp" track_expect |
| 28 | |
| 29 | get_rss_prov_bins |
Sandrine Bailleux | 67bf650 | 2022-09-07 15:41:18 +0200 | [diff] [blame] | 30 | |
Rupinderjit Singh | 8d4e1e4 | 2022-08-18 14:51:41 +0100 | [diff] [blame] | 31 | # sign AP bl1 |
| 32 | sign_image bl1.bin $ap_bl1_flash_load_addr $ap_bl1_flash_size |
| 33 | |
laurenw-arm | 60de274 | 2023-03-08 10:50:15 -0600 | [diff] [blame] | 34 | # Update FIP with pre-built RSS binaries and signed AP BL1 to create host flash fip image |
| 35 | update_fip |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 36 | |
| 37 | # Create GPT image |
| 38 | gen_gpt_bin $archive/host_flash_fip.bin 12582912 16 |
Rupinderjit Singh | 8d4e1e4 | 2022-08-18 14:51:41 +0100 | [diff] [blame] | 39 | fi |
Madhukar Pappireddy | 2f284e1 | 2021-08-30 16:06:14 -0500 | [diff] [blame] | 40 | } |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 41 | |
| 42 | generate_lava_job_template() { |
| 43 | # Hold scp terminal_s0 |
Chris Kay | 24d039f | 2022-11-23 12:53:30 +0000 | [diff] [blame] | 44 | uart="0" port="5002" file="hold_uart.exp" track_expect |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 45 | uart="2" port="5000" file="tc-fitimage-busybox.exp" set_primary="1" \ |
| 46 | track_expect |
Chris Kay | 24d039f | 2022-11-23 12:53:30 +0000 | [diff] [blame] | 47 | |
Manish V Badarkhe | 3896998 | 2024-01-29 19:56:01 +0000 | [diff] [blame] | 48 | set_uart_port "${archive:?}" 1 5003 |
Chris Kay | 24d039f | 2022-11-23 12:53:30 +0000 | [diff] [blame] | 49 | set_uart_port "${archive:?}" 3 5001 |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 50 | |
Harrison Mutai | a6d6e68 | 2023-03-27 13:20:33 +0100 | [diff] [blame] | 51 | payload_type="linux" gen_yaml_template |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 52 | } |