aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/code_style.py5
-rw-r--r--scripts/common.make4
-rw-r--r--scripts/data_files/driver_jsons/p256_transparent_driver.json2
-rwxr-xr-xscripts/generate_driver_wrappers.py4
-rwxr-xr-xscripts/generate_errors.pl2
-rwxr-xr-xscripts/generate_features.pl2
-rwxr-xr-xscripts/generate_visualc_files.pl38
7 files changed, 35 insertions, 22 deletions
diff --git a/scripts/code_style.py b/scripts/code_style.py
index d3f89d9..26de730 100755
--- a/scripts/code_style.py
+++ b/scripts/code_style.py
@@ -66,7 +66,7 @@ def get_src_files(since: Optional[str]) -> List[str]:
that have changed since that commit. Without this argument, list all
files known to git.
- Only C files are included, and certain files (generated, or 3rdparty)
+ Only C files are included, and certain files (generated, or third party)
are excluded.
"""
file_patterns = ["*.[hc]",
@@ -130,7 +130,8 @@ def get_src_files(since: Optional[str]) -> List[str]:
# companion files in the same subtree), or for automatically
# generated files (we're correcting the templates instead).
src_files = [filename for filename in src_files
- if not (filename.startswith("3rdparty/") or
+ if not (filename.startswith("tf-psa-crypto/drivers/everest/") or
+ filename.startswith("tf-psa-crypto/drivers/p256-m/") or
filename in generated_files or
is_file_autogenerated(filename))]
return src_files
diff --git a/scripts/common.make b/scripts/common.make
index 077ac6f..d102a97 100644
--- a/scripts/common.make
+++ b/scripts/common.make
@@ -44,7 +44,9 @@ LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
-lmbedcrypto$(SHARED_SUFFIX)
endif
-include $(MBEDTLS_PATH)/3rdparty/Makefile.inc
+THIRDPARTY_DIR = $(MBEDTLS_PATH)/tf-psa-crypto/drivers
+include $(THIRDPARTY_DIR)/everest/Makefile.inc
+include $(THIRDPARTY_DIR)/p256-m/Makefile.inc
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
ifdef PSASIM
diff --git a/scripts/data_files/driver_jsons/p256_transparent_driver.json b/scripts/data_files/driver_jsons/p256_transparent_driver.json
index 7d2aabf..4794074 100644
--- a/scripts/data_files/driver_jsons/p256_transparent_driver.json
+++ b/scripts/data_files/driver_jsons/p256_transparent_driver.json
@@ -2,7 +2,7 @@
"prefix": "p256",
"type": "transparent",
"mbedtls/h_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
- "headers": ["../3rdparty/p256-m/p256-m_driver_entrypoints.h"],
+ "headers": ["../tf-psa-crypto/drivers/p256-m/p256-m_driver_entrypoints.h"],
"capabilities": [
{
"mbedtls/c_condition": "defined(MBEDTLS_PSA_P256M_DRIVER_ENABLED)",
diff --git a/scripts/generate_driver_wrappers.py b/scripts/generate_driver_wrappers.py
index 0f0c8c7..9579764 100755
--- a/scripts/generate_driver_wrappers.py
+++ b/scripts/generate_driver_wrappers.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-"""Generate library/psa_crypto_driver_wrappers.h
- library/psa_crypto_driver_wrappers_no_static.c
+"""Generate psa_crypto_driver_wrappers.h
+ psa_crypto_driver_wrappers_no_static.c
This module is invoked by the build scripts to auto generate the
psa_crypto_driver_wrappers.h and psa_crypto_driver_wrappers_no_static
diff --git a/scripts/generate_errors.pl b/scripts/generate_errors.pl
index fb95c0d..df546d7 100755
--- a/scripts/generate_errors.pl
+++ b/scripts/generate_errors.pl
@@ -24,7 +24,7 @@ if( @ARGV ) {
$crypto_include_dir = 'tf-psa-crypto/drivers/builtin/include/mbedtls';
$tls_include_dir = 'include/mbedtls';
$data_dir = 'scripts/data_files';
- $error_file = 'library/error.c';
+ $error_file = 'tf-psa-crypto/drivers/builtin/src/error.c';
unless( -d $crypto_include_dir && -d $tls_include_dir && -d $data_dir ) {
chdir '..' or die;
diff --git a/scripts/generate_features.pl b/scripts/generate_features.pl
index cea8c11..6972682 100755
--- a/scripts/generate_features.pl
+++ b/scripts/generate_features.pl
@@ -16,7 +16,7 @@ if( @ARGV ) {
} else {
$include_dir = 'include/mbedtls';
$data_dir = 'scripts/data_files';
- $feature_file = 'library/version_features.c';
+ $feature_file = 'tf-psa-crypto/drivers/builtin/src/version_features.c';
unless( -d $include_dir && -d $data_dir ) {
chdir '..' or die;
diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl
index e9267eb..d48b2b2 100755
--- a/scripts/generate_visualc_files.pl
+++ b/scripts/generate_visualc_files.pl
@@ -25,19 +25,21 @@ my $programs_dir = 'programs';
my $mbedtls_header_dir = 'include/mbedtls';
my $drivers_builtin_header_dir = 'tf-psa-crypto/drivers/builtin/include/mbedtls';
my $psa_header_dir = 'tf-psa-crypto/include/psa';
-my $source_dir = 'library';
+my $tls_source_dir = 'library';
+my $crypto_core_source_dir = 'tf-psa-crypto/core';
+my $crypto_source_dir = 'tf-psa-crypto/drivers/builtin/src';
my $test_source_dir = 'tests/src';
my $test_header_dir = 'tests/include/test';
my $test_drivers_header_dir = 'tests/include/test/drivers';
my $test_drivers_source_dir = 'tests/src/drivers';
my @thirdparty_header_dirs = qw(
- 3rdparty/everest/include/everest
+ tf-psa-crypto/drivers/everest/include/everest
);
my @thirdparty_source_dirs = qw(
- 3rdparty/everest/library
- 3rdparty/everest/library/kremlib
- 3rdparty/everest/library/legacy
+ tf-psa-crypto/drivers/everest/library
+ tf-psa-crypto/drivers/everest/library/kremlib
+ tf-psa-crypto/drivers/everest/library/legacy
);
# Directories to add to the include path.
@@ -47,25 +49,27 @@ my @include_directories = qw(
include
tf-psa-crypto/include
tf-psa-crypto/drivers/builtin/include
- 3rdparty/everest/include/
- 3rdparty/everest/include/everest
- 3rdparty/everest/include/everest/vs2013
- 3rdparty/everest/include/everest/kremlib
+ tf-psa-crypto/drivers/everest/include/
+ tf-psa-crypto/drivers/everest/include/everest
+ tf-psa-crypto/drivers/everest/include/everest/vs2013
+ tf-psa-crypto/drivers/everest/include/everest/kremlib
tests/include
);
my $include_directories = join(';', map {"../../$_"} @include_directories);
-# Directories to add to the include path when building the library, but not
+# Directories to add to the include path when building the libraries, but not
# when building tests or applications.
my @library_include_directories = qw(
library
+ tf-psa-crypto/core
+ tf-psa-crypto/drivers/builtin/src
);
my $library_include_directories =
join(';', map {"../../$_"} (@library_include_directories,
@include_directories));
my @excluded_files = qw(
- 3rdparty/everest/library/Hacl_Curve25519.c
+ tf-psa-crypto/drivers/everest/library/Hacl_Curve25519.c
);
my %excluded_files = ();
foreach (@excluded_files) { $excluded_files{$_} = 1 }
@@ -106,7 +110,9 @@ sub check_dirs {
&& -d $mbedtls_header_dir
&& -d $drivers_builtin_header_dir
&& -d $psa_header_dir
- && -d $source_dir
+ && -d $tls_source_dir
+ && -d $crypto_core_source_dir
+ && -d $crypto_source_dir
&& -d $test_source_dir
&& -d $test_drivers_source_dir
&& -d $test_header_dir
@@ -265,12 +271,16 @@ sub main {
$psa_header_dir,
$test_header_dir,
$test_drivers_header_dir,
- $source_dir,
+ $tls_source_dir,
+ $crypto_core_source_dir,
+ $crypto_source_dir,
@thirdparty_header_dirs,
);
my @headers = (map { <$_/*.h> } @header_dirs);
my @source_dirs = (
- $source_dir,
+ $tls_source_dir,
+ $crypto_core_source_dir,
+ $crypto_source_dir,
$test_source_dir,
$test_drivers_source_dir,
@thirdparty_source_dirs,