blob: d48319f929c4365d4af60acf57a4bf5368ef5372 [file] [log] [blame]
Divin Raj5eb69482024-10-02 11:36:04 +01001#!/usr/bin/env bash
2#
Govindraj Rajafa86cf62025-02-19 14:55:48 -06003# Copyright (c) 2024-2025, Arm Limited. All rights reserved.
Divin Raj5eb69482024-10-02 11:36:04 +01004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7source "$ci_root/run_config/rd1ae_rse_utils.sh"
8source "$ci_root/arm_auto_solutions_utils.sh"
9
10post_tf_build() {
Ziad Elhanafy35771802024-12-02 16:53:42 +000011 # Download and archive rd1ae u-boot.bin file
Divin Raj5eb69482024-10-02 11:36:04 +010012 url="$arm_automotive_solutions/rd1ae/u-boot.bin" saveas="uboot.bin" fetch_file
13 archive_file "uboot.bin"
14
Ziad Elhanafy35771802024-12-02 16:53:42 +000015 # 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 Raj5eb69482024-10-02 11:36:04 +010020}
21
22fetch_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
36generate_lava_job_template() {
37 payload_type="linux" gen_yaml_template
38}
39
40generate_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 Rajafa86cf62025-02-19 14:55:48 -060052 model="$model" gen_model_params
Divin Raj5eb69482024-10-02 11:36:04 +010053 model="$model" gen_fvp_yaml
54}
55