Divin Raj | 5eb6948 | 2024-10-02 11:36:04 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
Govindraj Raja | fa86cf6 | 2025-02-19 14:55:48 -0600 | [diff] [blame] | 3 | # Copyright (c) 2024-2025, Arm Limited. All rights reserved. |
Divin Raj | 5eb6948 | 2024-10-02 11:36:04 +0100 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | source "$ci_root/run_config/rd1ae_rse_utils.sh" |
| 8 | source "$ci_root/arm_auto_solutions_utils.sh" |
| 9 | |
| 10 | post_tf_build() { |
Ziad Elhanafy | 3577180 | 2024-12-02 16:53:42 +0000 | [diff] [blame] | 11 | # Download and archive rd1ae u-boot.bin file |
Divin Raj | 5eb6948 | 2024-10-02 11:36:04 +0100 | [diff] [blame] | 12 | url="$arm_automotive_solutions/rd1ae/u-boot.bin" saveas="uboot.bin" fetch_file |
| 13 | archive_file "uboot.bin" |
| 14 | |
Ziad Elhanafy | 3577180 | 2024-12-02 16:53:42 +0000 | [diff] [blame] | 15 | # Download and archive rd1ae tee-pager_v2.bin file |
| 16 | url="$arm_automotive_solutions/rd1ae/tee-pager_v2.bin" saveas="tee-pager_v2.bin" fetch_file |
| 17 | archive_file "tee-pager_v2.bin" |
| 18 | |
| 19 | build_fip BL33="$archive/uboot.bin" BL32="$archive/tee-pager_v2.bin" |
Divin Raj | 5eb6948 | 2024-10-02 11:36:04 +0100 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | fetch_tf_resource() { |
| 23 | # Sign ap_bl2 image with RSE public key |
| 24 | sign_host_ap_bl2_image bl2.bin $rd1ae_ap_bl2_flash_load_addr $rd1ae_ap_bl2_flash_size |
| 25 | |
| 26 | # Update fip image with signed ap_bl2 |
| 27 | bin_name="tb-fw" src="$archive/$signed_bin" fip_update |
| 28 | |
| 29 | # Download all required images to boot rd1ae |
| 30 | downlaod_rd1ae_prebuilt |
| 31 | |
| 32 | # Update ap-flash-image with newly created fip image |
| 33 | update_ap_flash_image |
| 34 | } |
| 35 | |
| 36 | generate_lava_job_template() { |
| 37 | payload_type="linux" gen_yaml_template |
| 38 | } |
| 39 | |
| 40 | generate_lava_job() { |
| 41 | local model="rd1ae" |
| 42 | uart="1" set_expect_variable "num_cpus" "8" |
| 43 | |
| 44 | # Hold scp terminal_uart_scp |
| 45 | uart="2" port="5007" file="hold_uart.exp" track_expect |
| 46 | uart="0" port="5009" file="rd1ae-tf.exp" track_expect |
| 47 | uart="1" port="5008" file="rd1ae-yocto.exp" set_primary="1" timeout="1200" track_expect |
| 48 | |
| 49 | set_run_env "ports_script" "$ci_root/model/rd1ae-ports.awk" |
| 50 | set_run_env "num_uarts" "3" |
| 51 | |
Govindraj Raja | fa86cf6 | 2025-02-19 14:55:48 -0600 | [diff] [blame] | 52 | model="$model" gen_model_params |
Divin Raj | 5eb6948 | 2024-10-02 11:36:04 +0100 | [diff] [blame] | 53 | model="$model" gen_fvp_yaml |
| 54 | } |
| 55 | |