Skip to content

Commit

Permalink
Merge pull request #77 from Harry-Ramsey/tf-psa-crypto-out-of-source-…
Browse files Browse the repository at this point in the history
…development

Add out of source build functions for TF-PSA-Crypto
  • Loading branch information
ronald-cron-arm authored Jan 6, 2025
2 parents 9e0557f + f3044f8 commit 81dfe00
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion scripts/all-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,17 @@ pre_initialize_variables () {
PSA_CORE_PATH='tf-psa-crypto/core'
BUILTIN_SRC_PATH='tf-psa-crypto/drivers/builtin/src'
CONFIG_TEST_DRIVER_H='tf-psa-crypto/tests/configs/crypto_config_test_driver.h'
MBEDTLS_ROOT_DIR="$PWD"
TF_PSA_CRYPTO_ROOT_DIR="$PWD/tf-psa-crypto"
fi
config_files="$CONFIG_H $CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H"
else
CRYPTO_CONFIG_H='include/psa/crypto_config.h'
PSA_CORE_PATH='core'
BUILTIN_SRC_PATH='drivers/builtin/src'
CONFIG_TEST_DRIVER_H='tests/configs/config_test_driver.h'
TF_PSA_CRYPTO_ROOT_DIR="$PWD"
MBEDTLS_ROOT_DIR=""

config_files="$CRYPTO_CONFIG_H $CONFIG_TEST_DRIVER_H"
fi
Expand Down Expand Up @@ -214,7 +218,7 @@ pre_initialize_variables () {
: ${OPENSSL_NEXT:="$OPENSSL"}
: ${GNUTLS_CLI:="gnutls-cli"}
: ${GNUTLS_SERV:="gnutls-serv"}
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
: ${OUT_OF_SOURCE_DIR:=$PWD/out_of_source_build}
: ${ARMC6_BIN_DIR:=/usr/bin}
: ${ARM_NONE_EABI_GCC_PREFIX:=arm-none-eabi-}
: ${ARM_LINUX_GNUEABI_GCC_PREFIX:=arm-linux-gnueabi-}
Expand Down Expand Up @@ -400,6 +404,11 @@ cleanup()
rm -f programs/test/cmake_package_install/Makefile
rm -f programs/test/cmake_package_install/cmake_package_install
# Remove out of source directory
if in_tf_psa_crypto_repo; then
rm -rf "$OUT_OF_SOURCE_DIR"
fi
# Restore files that may have been clobbered by the job
restore_backed_up_files
}
Expand Down Expand Up @@ -937,6 +946,10 @@ run_component () {
"${dd_cmd[@]}"
fi
if in_tf_psa_crypto_repo; then
pre_create_tf_psa_crypto_out_of_source_directory
fi
# Run the component in a subshell, with error trapping and output
# redirection set up based on the relevant options.
if [ $KEEP_GOING -eq 1 ]; then
Expand Down Expand Up @@ -975,6 +988,11 @@ run_component () {
unset current_component
}
pre_create_tf_psa_crypto_out_of_source_directory () {
rm -rf "$OUT_OF_SOURCE_DIR"
mkdir "$OUT_OF_SOURCE_DIR"
}
################################################################
#### Main
################################################################
Expand Down

0 comments on commit 81dfe00

Please sign in to comment.