blob: fa672082618cf6310f47ad1057ae404292f57df5 [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Manish Pandey3c435582020-07-15 12:14:26 +01002#
3# Copyright (c) 2020, Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8post_tf_build() {
9 #
10 # To build SP packages in TF-A we need to build FIP.
11 # The resulting FIP has valid SP Packages mentioned in SP_LAYOUT_FILE
12 # but dummy BL33 and BL32.
13 #
14 local dummy_file="$(mktempfile)"
15 echo "hello world" > "$dummy_file"
16
17 build_fip BL33="$dummy_file" BL32="$dummy_file"
18
Manish Pandey3c435582020-07-15 12:14:26 +010019 url="${tf_build_root}/${plat}/${mode}/fdts/fvp_spmc_manifest.dtb" fetch_file
20 url="${tf_build_root}/${plat}/${mode}/cactus-primary.pkg" fetch_file
21 url="${tf_build_root}/${plat}/${mode}/cactus-secondary.pkg" fetch_file
Olivier Deprez0b834092020-08-21 08:36:01 +020022 url="${tf_build_root}/${plat}/${mode}/cactus-tertiary.pkg" fetch_file
Manish Pandey3c435582020-07-15 12:14:26 +010023
Manish Pandey3c435582020-07-15 12:14:26 +010024 archive_file "fvp_spmc_manifest.dtb"
25 archive_file "cactus-primary.pkg"
26 archive_file "cactus-secondary.pkg"
Olivier Deprez0b834092020-08-21 08:36:01 +020027 archive_file "cactus-tertiary.pkg"
Manish Pandey3c435582020-07-15 12:14:26 +010028}
29
Olivier Deprezaa4d1262020-10-30 15:02:17 +010030fetch_tf_resource() {
Olivier Deprezd6ec5652021-02-10 07:47:34 +010031 url="$tfa_downloads/spm/02-05-2021/initrd.img" fetch_file
32 url="$tfa_downloads/spm/02-05-2021/manifest.dtb" fetch_file
Olivier Deprezaa4d1262020-10-30 15:02:17 +010033
34 archive_file "initrd.img"
35 archive_file "manifest.dtb"
36
37 # Expect scripts
38 uart="0" file="spm-linux-uart0.exp" track_expect
39 uart="2" file="spm-uart2.exp" track_expect
40}
41
Manish Pandey3c435582020-07-15 12:14:26 +010042post_fetch_tf_resource() {
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060043 local model="base-aemv8a"
44
45 model="$model" \
Manish Pandey3c435582020-07-15 12:14:26 +010046 arch_version="8.4" \
47 reset_to_bl31="1" \
48 preload_bl33="1" \
Manish Pandey1e7be852020-11-09 16:04:48 +000049 preload_bl33_bin="$archive/hafnium.bin" \
Manish Pandey3c435582020-07-15 12:14:26 +010050 spmc_manifest="fvp_spmc_manifest.dtb" \
Manish Pandey1e7be852020-11-09 16:04:48 +000051 spm_bin="$archive/secure_hafnium.bin" \
Manish Pandey3c435582020-07-15 12:14:26 +010052 sp1_pkg="cactus-primary.pkg" \
53 sp2_pkg="cactus-secondary.pkg" \
Olivier Deprez0b834092020-08-21 08:36:01 +020054 sp3_pkg="cactus-tertiary.pkg" \
Manish Pandey3c435582020-07-15 12:14:26 +010055 initrd_bin="initrd.img" \
56 el3_payload_bin="manifest.dtb" \
57 gen_model_params
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060058 model="$model" gen_fvp_yaml
Manish Pandey3c435582020-07-15 12:14:26 +010059}