From 17d3392189bc3e17e63cc7856cce99b4e2382993 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Tue, 2 Jul 2024 10:23:12 +0200 Subject: [PATCH] Adapt crypto core directory path Adapt crypto core directory path in mbedtls due to the move of the PSA crypto core to tf-psa-crypto/core. Signed-off-by: Ronald Cron --- scripts/mbedtls_framework/build_tree.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/mbedtls_framework/build_tree.py b/scripts/mbedtls_framework/build_tree.py index ec67e4cdf..702a2cd9d 100644 --- a/scripts/mbedtls_framework/build_tree.py +++ b/scripts/mbedtls_framework/build_tree.py @@ -37,9 +37,13 @@ def crypto_core_directory(root: Optional[str] = None, relative: Optional[bool] = return "core" return os.path.join(root, "core") elif looks_like_mbedtls_root(root): + if os.path.isdir(os.path.join(root, 'tf-psa-crypto')): + path = "tf-psa-crypto/core" + else: + path = "library" if relative: - return "library" - return os.path.join(root, "library") + return path + return os.path.join(root, path) else: raise Exception('Neither Mbed TLS nor TF-PSA-Crypto source tree found')