From 08b8ce3a4bb5add2d536429ee9c641f8c2c53dfd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 15 Sep 2025 15:13:43 +0200 Subject: [PATCH] Add function to get the framework root Signed-off-by: Gilles Peskine --- scripts/mbedtls_framework/build_tree.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/mbedtls_framework/build_tree.py b/scripts/mbedtls_framework/build_tree.py index cb5f5c958..04dbf54fc 100644 --- a/scripts/mbedtls_framework/build_tree.py +++ b/scripts/mbedtls_framework/build_tree.py @@ -130,6 +130,12 @@ def guess_tf_psa_crypto_root(root: Optional[str] = None) -> str: else: raise Exception('TF-PSA-Crypto source tree not found') +def framework_root(root: Optional[str] = None) -> str: + """Return the path to the framework directory for this project.""" + if root is None: + root = guess_project_root() + return os.path.join(root, 'framework') + def is_mbedtls_3_6() -> bool: """Whether the working tree is an Mbed TLS 3.6 one or not