blob: a924c3846dbc1cc39c602782f32befc67eabc7fa [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Olivier Deprez5e434952020-06-15 18:30:42 +02002#
Madhukar Pappireddye08bc352021-04-23 16:11:20 -05003# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
Olivier Deprez5e434952020-06-15 18:30:42 +02004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8post_tf_build() {
Olivier Deprezd6ec5652021-02-10 07:47:34 +01009 url="$tfa_downloads/spm/02-05-2021/spmc_sel2_optee_sel1.bin" fetch_file
Olivier Deprez5e434952020-06-15 18:30:42 +020010
Olivier Deprez5e434952020-06-15 18:30:42 +020011 archive_file "spmc_sel2_optee_sel1.bin"
Olivier Deprez5e434952020-06-15 18:30:42 +020012 cp "${archive}/spmc_sel2_optee_sel1.bin" "${tf_root}/build/fvp/${bin_mode}"
13
14cat <<EOF > "${tf_root}/build/fvp/${bin_mode}/optee_sp_layout.json"
15{
16 "op-tee" : {
17 "image": "spmc_sel2_optee_sel1.bin",
Olivier Deprezaa4d1262020-10-30 15:02:17 +010018 "pm": "${tf_root}/plat/arm/board/fvp/fdts/optee_sp_manifest.dts"
Olivier Deprez5e434952020-06-15 18:30:42 +020019 }
20}
21EOF
22
23 build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin"
24}
25
Olivier Deprezaa4d1262020-10-30 15:02:17 +010026fetch_tf_resource() {
27 # Expect scripts
28 uart="0" file="tftf.exp" track_expect
29 uart="1" file="spm-optee-sp-uart1.exp" track_expect
Leonardo Sandoval4f0c7912021-03-17 11:35:07 -060030
31 payload_type="tftf" gen_fvp_yaml_template
Olivier Deprezaa4d1262020-10-30 15:02:17 +010032}
33
Olivier Deprez5e434952020-06-15 18:30:42 +020034post_fetch_tf_resource() {
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060035 local model="base-aemv8a"
Leonardo Sandoval6ba23802020-10-27 13:17:53 -060036
Madhukar Pappireddye08bc352021-04-23 16:11:20 -050037 model="$model" arch_version="8.4" has_smmuv3_params="1" gen_model_params
Leonardo Sandoval00ced1f2020-12-07 12:55:08 -060038 model="$model" gen_fvp_yaml
Olivier Deprez5e434952020-06-15 18:30:42 +020039}