blob: 00fa36b45807eb13f13ef1fbe87c412462fe4488 [file] [log] [blame]
Zelalem799ffdc2020-07-10 16:20:35 -05001#
Leonardo Sandoval579c7372020-10-23 15:23:32 -05002# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
Zelalem799ffdc2020-07-10 16:20:35 -05003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Pali Rohár95bbc7b2021-07-20 17:50:36 +02007pre_tf_build() {
8 targets="all mrvl_flash mrvl_uart" set_tf_build_targets
9
10 pushd "$workspace"
11
12 if [ ! -d "A3700-utils-marvell" ]; then
13 saveas="A3700-utils-marvell.tar.gz" \
14 url="$tfa_downloads/A3700-utils-marvell/A3700-utils-marvell-f014428f4bf7feafec1dcc4c37506d847718649a.tar.gz" \
15 fetch_file
16
17 tar -xzf "A3700-utils-marvell.tar.gz"
18 fi
19
20 echo "Set WTP to $workspace/A3700-utils-marvell"
21 set_hook_var "WTP" "$workspace/A3700-utils-marvell"
22
23 if [ ! -d "mv-ddr-marvell" ]; then
24 saveas="mv-ddr-marvell.tar.gz" \
25 url="$tfa_downloads/mv-ddr-marvell/mv-ddr-marvell-02e23dbcf8dd22e038986052d99319a0eba8f25f.tar.gz" \
26 fetch_file
27
28 tar -xzf "mv-ddr-marvell.tar.gz"
29 fi
30
31 echo "Set MV_DDR_PATH to $workspace/mv-ddr-marvell"
32 set_hook_var "MV_DDR_PATH" "$workspace/mv-ddr-marvell"
33
34 if [ ! -d "cryptopp" ]; then
35 saveas="cryptopp.zip" \
36 url="$tfa_downloads/cryptopp/cryptopp565.zip" \
37 fetch_file
38
39 unzip -d cryptopp "cryptopp.zip"
40 fi
41
42 echo "Set CRYPTOPP_PATH to $workspace/cryptopp"
43 set_hook_var "CRYPTOPP_PATH" "$workspace/cryptopp"
44
45 popd "$workspace"
46}
47
48post_tf_build() {
49 # Remove files in uart-images subdirectory as these files have same names as files in upper directory.
50 # Currently CI is not able to successfully finish all tests if there are two directories with same file names.
51 if [ -d "${tf_build_root}/${plat}/${mode}/uart-images" ];then
52 rm -rf ${tf_build_root}/${plat}/${mode}/uart-images
53 fi
54}