|
| 1 | +From 035aca2948c136e76ec7acfa739e4f0264d55c39 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Geovane Fedrecheski < [email protected]> |
| 3 | +Date: Wed, 29 Nov 2023 11:09:44 +0100 |
| 4 | +Subject: [PATCH] Update config for baremetal targets |
| 5 | + |
| 6 | +Signed-off-by: Geovane Fedrecheski < [email protected]> |
| 7 | +--- |
| 8 | + scripts/config.py | 15 +++++++++++++++ |
| 9 | + 1 file changed, 15 insertions(+) |
| 10 | + |
| 11 | +diff --git a/scripts/config.py b/scripts/config.py |
| 12 | +index 6d5edc7c0..36312df04 100755 |
| 13 | +--- a/scripts/config.py |
| 14 | ++++ b/scripts/config.py |
| 15 | +@@ -241,6 +241,7 @@ def full_adapter(name, active, section): |
| 16 | + # need to be repeated here. |
| 17 | + EXCLUDE_FROM_BAREMETAL = frozenset([ |
| 18 | + #pylint: disable=line-too-long |
| 19 | ++ 'MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS', |
| 20 | + 'MBEDTLS_ENTROPY_NV_SEED', # requires a filesystem and FS_IO or alternate NV seed hooks |
| 21 | + 'MBEDTLS_FS_IO', # requires a filesystem |
| 22 | + 'MBEDTLS_HAVE_TIME', # requires a clock |
| 23 | +@@ -270,6 +271,20 @@ def baremetal_adapter(name, active, section): |
| 24 | + if name == 'MBEDTLS_NO_PLATFORM_ENTROPY': |
| 25 | + # No OS-provided entropy source |
| 26 | + return True |
| 27 | ++ if name == 'MBEDTLS_ENTROPY_HARDWARE_ALT': |
| 28 | ++ # Custom entropy source provided |
| 29 | ++ return True |
| 30 | ++ if name == 'MBEDTLS_ENTROPY_FORCE_SHA256': |
| 31 | ++ # Force SHA-256 accumulator |
| 32 | ++ return True |
| 33 | ++ if name == 'MBEDTLS_MEMORY_BUFFER_ALLOC_C': |
| 34 | ++ return True |
| 35 | ++ if name == 'MBEDTLS_PLATFORM_C': |
| 36 | ++ return True |
| 37 | ++ if name == 'MBEDTLS_PLATFORM_MEMORY': |
| 38 | ++ return True |
| 39 | ++ if name == 'MBEDTLS_PLATFORM_NO_STD_FUNCTIONS': |
| 40 | ++ return True |
| 41 | + return include_in_full(name) and keep_in_baremetal(name) |
| 42 | + |
| 43 | + def include_in_crypto(name): |
| 44 | +-- |
| 45 | +2.34.1 |
| 46 | + |
0 commit comments