blob: fc8e2cafd5cf986ed8f7f780ae085d9a46d19eb7 [file] [log] [blame]
#!/usr/bin/env bash
#
# Copyright (c) 2021 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
post_tf_build() {
#Fetch pre-built SCP/MCP binaries if they haven't been built
if [ ! -f "$archive/mcp_rom.bin" ]; then
url="$scp_mcp_prebuilts/mcp_romfw.bin" saveas="mcp_rom.bin" fetch_file
archive_file "mcp_rom.bin"
fi
if [ ! -f "$archive/scp_rom.bin" ]; then
url="$scp_mcp_prebuilts/scp_bl1.bin" saveas="scp_rom.bin" fetch_file
archive_file "scp_rom.bin"
fi
if [ ! -f "$archive/scp_ramfw_fvp.bin" ]; then
url="$scp_mcp_prebuilts/scp_bl2.bin" saveas="scp_ramfw_fvp.bin" fetch_file
archive_file "scp_ramfw_fvp.bin"
fi
if [ ! -f "$archive/mcp_ramfw_fvp.bin" ]; then
url="$scp_mcp_prebuilts/mcp_ramfw.bin" saveas="mcp_ramfw_fvp.bin" fetch_file
archive_file "mcp_ramfw_fvp.bin"
fi
# Create FIP for SCP
"$fiptool" create --soc-fw "$tf_root/build/morello/$bin_mode/bl31.bin" --scp-fw "$archive/scp_ramfw_fvp.bin" "scp_fw.bin"
archive_file "scp_fw.bin"
# Create FIP for MCP, this needs fixed uuid for now
"$fiptool" create --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="$archive/mcp_ramfw_fvp.bin" "mcp_fw.bin"
archive_file "mcp_fw.bin"
}