blob: 01c0b175e86dc47f7be143b6c62a4accdb4e1103 [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() {
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060031 url="$tfa_downloads/spm/02-05-2021/initrd.img" saveas="initrd.bin" fetch_file
Olivier Deprezd6ec5652021-02-10 07:47:34 +010032 url="$tfa_downloads/spm/02-05-2021/manifest.dtb" fetch_file
Olivier Deprezaa4d1262020-10-30 15:02:17 +010033
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060034 archive_file "initrd.bin"
Olivier Deprezaa4d1262020-10-30 15:02:17 +010035 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
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060040
41 payload_type="linux" gen_fvp_yaml_template
Olivier Deprezaa4d1262020-10-30 15:02:17 +010042}
43
Manish Pandey3c435582020-07-15 12:14:26 +010044post_fetch_tf_resource() {
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060045 local model="base-aemv8a"
46
47 model="$model" \
Manish Pandey3c435582020-07-15 12:14:26 +010048 arch_version="8.4" \
49 reset_to_bl31="1" \
50 preload_bl33="1" \
Manish Pandey1e7be852020-11-09 16:04:48 +000051 preload_bl33_bin="$archive/hafnium.bin" \
Manish Pandey3c435582020-07-15 12:14:26 +010052 spmc_manifest="fvp_spmc_manifest.dtb" \
Manish Pandey1e7be852020-11-09 16:04:48 +000053 spm_bin="$archive/secure_hafnium.bin" \
Manish Pandey3c435582020-07-15 12:14:26 +010054 sp1_pkg="cactus-primary.pkg" \
55 sp2_pkg="cactus-secondary.pkg" \
Olivier Deprez0b834092020-08-21 08:36:01 +020056 sp3_pkg="cactus-tertiary.pkg" \
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060057 initrd_bin="initrd.bin" \
Manish Pandey3c435582020-07-15 12:14:26 +010058 el3_payload_bin="manifest.dtb" \
59 gen_model_params
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060060 model="$model" model_dtb="manifest.dtb" gen_fvp_yaml
Manish Pandey3c435582020-07-15 12:14:26 +010061}