blob: 6c769ebc34bc4fe9e30aa95a83fdf94e6eb1a5e0 [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Manish Pandey3c435582020-07-15 12:14:26 +01002#
Harrison Mutaia6d6e682023-03-27 13:20:33 +01003# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
Manish Pandey3c435582020-07-15 12:14:26 +01004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
Olivier Deprezf839dcf2021-09-03 10:41:17 +02008pre_tftf_build() {
9 # Build Cactus and Ivy images only
10 targets="cactus ivy" set_tftf_build_targets
11}
12
Manish Pandey3c435582020-07-15 12:14:26 +010013post_tf_build() {
14 #
15 # To build SP packages in TF-A we need to build FIP.
16 # The resulting FIP has valid SP Packages mentioned in SP_LAYOUT_FILE
17 # but dummy BL33 and BL32.
18 #
19 local dummy_file="$(mktempfile)"
Chris Kay4e8aaf12022-09-01 15:21:55 +010020 echo "hello world" >"$dummy_file"
Manish Pandey3c435582020-07-15 12:14:26 +010021
22 build_fip BL33="$dummy_file" BL32="$dummy_file"
23
Manish Pandey3c435582020-07-15 12:14:26 +010024 url="${tf_build_root}/${plat}/${mode}/fdts/fvp_spmc_manifest.dtb" fetch_file
25 url="${tf_build_root}/${plat}/${mode}/cactus-primary.pkg" fetch_file
26 url="${tf_build_root}/${plat}/${mode}/cactus-secondary.pkg" fetch_file
Olivier Deprez0b834092020-08-21 08:36:01 +020027 url="${tf_build_root}/${plat}/${mode}/cactus-tertiary.pkg" fetch_file
Olivier Deprezdd9ed332021-07-02 12:07:17 +020028 url="${tf_build_root}/${plat}/${mode}/ivy.pkg" fetch_file
Manish Pandey3c435582020-07-15 12:14:26 +010029
Manish Pandey3c435582020-07-15 12:14:26 +010030 archive_file "fvp_spmc_manifest.dtb"
31 archive_file "cactus-primary.pkg"
32 archive_file "cactus-secondary.pkg"
Olivier Deprez0b834092020-08-21 08:36:01 +020033 archive_file "cactus-tertiary.pkg"
Olivier Deprezdd9ed332021-07-02 12:07:17 +020034 archive_file "ivy.pkg"
Manish Pandey3c435582020-07-15 12:14:26 +010035}
36
Olivier Deprezaa4d1262020-10-30 15:02:17 +010037fetch_tf_resource() {
Olivier Deprez575bf892021-07-30 10:52:53 +020038 url="$tfa_downloads/spm/07-29-2021/initrd.img" saveas="initrd.bin" fetch_file
Olivier Deprezf839dcf2021-09-03 10:41:17 +020039 url="$tfa_downloads/spm/07-29-2021/manifest.dtb" saveas="dtb.bin" fetch_file
Olivier Deprezaa4d1262020-10-30 15:02:17 +010040
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060041 archive_file "initrd.bin"
Olivier Deprezf839dcf2021-09-03 10:41:17 +020042 archive_file "dtb.bin"
Chris Kay4e8aaf12022-09-01 15:21:55 +010043}
Olivier Deprezaa4d1262020-10-30 15:02:17 +010044
Chris Kay4e8aaf12022-09-01 15:21:55 +010045generate_lava_job_template() {
Harrison Mutaia6d6e682023-03-27 13:20:33 +010046 payload_type="linux" gen_yaml_template
Olivier Deprezaa4d1262020-10-30 15:02:17 +010047}
48
Chris Kay4e8aaf12022-09-01 15:21:55 +010049generate_lava_job() {
50 local model="base-aemv8a"
51
52 uart="0" file="spm-linux-uart0.exp" track_expect
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060053
54 model="$model" \
Chris Kay4e8aaf12022-09-01 15:21:55 +010055 arch_version="8.5" \
56 has_branch_target_exception="1" \
57 has_smmuv3_params="1" \
58 kernel_addr="0x88000000" \
59 kernel_bin="$archive/hafnium.bin" \
60 memory_tagging_support_level="2" \
61 reset_to_bl31="1" \
62 sp1_pkg="cactus-primary.pkg" \
63 sp2_pkg="cactus-secondary.pkg" \
64 sp3_pkg="cactus-tertiary.pkg" \
65 sp4_pkg="ivy.pkg" \
66 spm_bin="$archive/secure_hafnium.bin" \
67 spmc_manifest="fvp_spmc_manifest.dtb" \
Madhukar Pappireddyb642aa02023-08-23 16:49:20 -050068 gicd_are_fixed_one="1" \
69 gicv3_ext_interrupt_range="1" \
70 gicd_ext_ppi_count="64" \
71 gicd_ext_spi_count="1024" \
Manish Pandey3c435582020-07-15 12:14:26 +010072 gen_model_params
Olivier Deprez18101ca2021-04-23 19:42:04 +020073
Leonardo Sandovalb1fb6342021-11-18 15:34:25 -060074 model="$model" gen_fvp_yaml
Manish Pandey3c435582020-07-15 12:14:26 +010075}