eclair/analyze_common2.sh: Variant of eclair/analyze_common.sh

Which does actions only related to TF-A, not ECLAIR, as settings for
ECLAIR would be managed outside of TF-A build env.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I69d727cd675cd0303613d8a46a82840f3b2afa40
diff --git a/eclair/analyze_common2.sh b/eclair/analyze_common2.sh
new file mode 100644
index 0000000..cd0c57b
--- /dev/null
+++ b/eclair/analyze_common2.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Copyright (c) 2021-2022 BUGSENG srl. All rights reserved.
+# Copyright (c) 2022 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Common code to setup analysis environment.
+
+# Automatically export vars
+set -a
+source ${WORKSPACE}/tf-a-ci-scripts/tf_config/${TF_CONFIG}
+set +a
+
+if [ "${TRUSTED_BOARD_BOOT}" = 1 -o "${MEASURED_BOOT}" = 1 ]; then
+    # These configurations require mbedTLS component
+    wget -q ${MBEDTLS_URL}
+    tar xaf $(basename ${MBEDTLS_URL})
+    rm $(basename ${MBEDTLS_URL})
+    pwd; ls -l
+    export MBEDTLS_DIR="${PWD}/$(ls -1d mbedtls-*)"
+fi
+
+which ${CROSS_COMPILE}gcc
+${CROSS_COMPILE}gcc -v
diff --git a/eclair/build-tfa-multiple.sh b/eclair/build-tfa-multiple.sh
index c135fdd..700ddab 100755
--- a/eclair/build-tfa-multiple.sh
+++ b/eclair/build-tfa-multiple.sh
@@ -8,7 +8,7 @@
 
 for TF_CONFIG in ${TF_CONFIG_LIST}; do
     echo "============== ${TF_CONFIG} =============="
-    . tf-a-ci-scripts/eclair/analyze_common.sh
+    . tf-a-ci-scripts/eclair/analyze_common2.sh
     export ECLAIR_PROJECT_NAME="TF_A_Cumulative"
     detachLicense 3000
     tf-a-ci-scripts/eclair/build-tfa.sh ${TF_CONFIG}