blob: 302f71a209ca906639512600267a4aab90fc3634 [file] [log] [blame]
Anurag Koulc7f61ce2021-02-24 19:11:06 +00001#!/usr/bin/env bash
2#
3# Copyright (c) 2021 Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7post_tf_build() {
Chandni Cherukuri57f4b912021-07-30 14:06:09 +05308 #Fetch pre-built SCP/MCP binaries if they haven't been built
9 if [ ! -f "$archive/mcp_rom.bin" ]; then
10 url="$morello_prebuilts/mcp_rom.bin" fetch_file
11 archive_file "mcp_rom.bin"
12 fi
13
14 if [ ! -f "$archive/scp_rom.bin" ]; then
15 url="$morello_prebuilts/scp_rom.bin" fetch_file
16 archive_file "scp_rom.bin"
17 fi
18
19 if [ ! -f "$archive/scp_ramfw_fvp.bin" ]; then
20 url="$morello_prebuilts/scp_ramfw_fvp.bin" fetch_file
21 archive_file "scp_ramfw_fvp.bin"
22 fi
23
24 if [ ! -f "$archive/mcp_ramfw_fvp.bin" ]; then
25 url="$morello_prebuilts/mcp_ramfw_fvp.bin" fetch_file
26 archive_file "mcp_ramfw_fvp.bin"
27 fi
Anurag Koulc7f61ce2021-02-24 19:11:06 +000028
29 # Create FIP for SCP
30 "$fiptool" create --soc-fw "$tf_root/build/morello/$bin_mode/bl31.bin" --scp-fw "$archive/scp_ramfw_fvp.bin" "scp_fw.bin"
31 archive_file "scp_fw.bin"
32
33 # Create FIP for MCP, this needs fixed uuid for now
34 "$fiptool" create --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="$archive/mcp_ramfw_fvp.bin" "mcp_fw.bin"
35 archive_file "mcp_fw.bin"
36}