Commit Graph

1771 Commits

Author SHA1 Message Date
Gilles Peskine
46568f3c6e Move some crypto core and drivers variable definitions to crypto-common.make
No behavior change.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-07 11:17:43 +01:00
Gilles Peskine
7bef731f0b Create a TF-PSA-Crypto make helper for Mbed TLS
Currently, Mbed TLS can be built with make, and we rely on this in many
`all.sh` components. Mbed TLS knows how to build TF-PSA-Crypto, but this
changes from time to time, and it's hard to do the necessary changes in both
repositories at the same time.

Create a file that Mbed TLS can consume to find out some information needed
to build TF-PSA-Crypto, such as the locations of various files.

Create this file in Mbed TLS. Once we have finished moving code to it, the
file will move to TF-PSA-Crypto.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-07 11:17:43 +01:00
Gilles Peskine
d78060bda6 Get a clean run from make --warn-undefined-variables
Except in psasim, which I am not touching at this time.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-07 11:17:43 +01:00
Gilles Peskine
3884bf3d89 Remove a XySSL-era comment that has run its course
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-07 11:17:43 +01:00
Gilles Peskine
43784b54cd Create the config option list shadow file
```
tests/scripts/check_option_lists.py -u
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-05 16:29:21 +01:00
Gilles Peskine
1de879c6dd Also reject internal macros that weren't options in 3.6
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-05 16:29:21 +01:00
Gilles Peskine
30323afa6c Read current data rather than data about 4.0
It doesn't matter how a macro was used in a previous minor version of the
library. What matters is current information about options and internal
symbols, and information about past versions from which a macro may have
been removed.

The output is mostly the same, but:

* Macros that were options in 3.6, became internal in 4.0 and have now
  been completely removed are now shown as removed, not internal.
* Macros that were options in 3.6, were completely removed in 4.0, and are
  now back but internal, are now shown as internal, not removed.
* Macros that were options in 3.6, were removed in 4.0 and are back to
  being options are no longer rejected.
* Macros that were options in 3.6, were removed in 4.0 and are back to
  being internal derived macros in TF-PSA-Crypto are no longer rejected.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-05 16:29:21 +01:00
Gilles Peskine
35821e7c77 Switch from config_history to config_macros
Switch from the `config_history` module to the new module `config_macros`.
No behavior change.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-01-05 16:29:21 +01:00
Pengyu Lv
8b364c7436 Fix the commands to build library
In `scripts/common.make`, used by `tests/Makefile` and `programs/Makefile`,
we have the following rules to build the library:

  ```
  $(MBEDLIBS):
      $(MAKE) -C ../library
  ```

$(MBEDLIBS) contains three library files but the command is for all
the 3 files instead of single target generation. This would cause a
race when doing parallel build. This commit fixes command so that
the recipe could generate a single library file.

Fix https://github.com/Mbed-TLS/mbedtls/issues/8229

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
Signed-off-by: Gilles Peskine <gilles.peskine@arm.com>
2025-12-04 17:07:05 +01:00
Manuel Pégourié-Gonnard
a6e59a955b Merge pull request #10450 from bjwtaylor/move-lcov
Remove lcov.sh as this will be moved to the framework
2025-11-06 11:11:59 +00:00
Ben Taylor
9b4f222f4f Update lcov.sh paths in make files
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-10-31 14:18:05 +00:00
Ben Taylor
284481f7ca Remove lcov.sh as this will be moved to the framework
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-10-31 14:18:05 +00:00
Minos Galanakis
a2cba40df6 prepare_release.sh: modify submodule files recursively
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-30 10:00:22 +00:00
Minos Galanakis
bdb1dcbdb6 prepare_release.sh: simplified regex
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-30 10:00:22 +00:00
Minos Galanakis
958d9d97a4 prepare_release.sh: Added documentation
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-30 09:58:17 +00:00
Minos Galanakis
c4d4f6b4a1 prepare_release.sh: Removed -r/-u modes
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-22 11:51:39 +01:00
Minos Galanakis
61fdef52a3 prepare_release.sh: Adjusted psed logic.
Fixed double quoting in sed.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-22 11:17:32 +01:00
Minos Galanakis
0b7966649f prepare_release.sh:Removed Makefiles modification
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-21 10:55:27 +01:00
Minos Galanakis
d995a21b6a prepare_release.sh: Adjusted logic
- Introduced a new -r to explicitely request project
  modification for release
- Changed the default behaviour to print_help when invoked
  without arguments

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-21 10:54:17 +01:00
Minos Galanakis
1f95b78310 prepare_release.sh: Limited .gitignore to current project
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-20 16:24:29 +01:00
Minos Galanakis
d0881eda4e prepare_release.sh: Added psed helper function
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-10-20 16:11:05 +01:00
Ronald Cron
6a9be3de1f Merge pull request #10416 from bensze01/abicheck-worktree-submodules
Use submodule work trees during ABI check
2025-09-30 07:32:22 +00:00
Bence Szépkúti
9defedb833 Fix comment too long for pylint
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-09-29 14:25:12 +02:00
David Horstmann
ee1991a387 Merge pull request #10408 from ronald-cron-arm/historical-libmbedcryto
Restore historical libmbedcrypto.* libraries
2025-09-29 08:41:06 +00:00
Bence Szépkúti
0f2a4f3d1f Prevent unnecessary submodule fetches
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-09-26 20:27:57 +02:00
Bence Szépkúti
8d95062aeb Eliminate use of git worktree prune
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-09-26 15:44:11 +02:00
Bence Szépkúti
dc88f6e1f3 Use f-string literal
This makes path-construction a bit more readable

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-09-26 15:37:42 +02:00
Gilles Peskine
3415d2dd5f Merge pull request #10306 from gilles-peskine-arm/config-error-on-removed-options-mbedtls
Mechanism to error out on removed configuration options
2025-09-25 16:35:51 +00:00
Bence Szépkúti
effa534e71 Use worktrees instead of fetches for submodules
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-09-25 15:51:07 +02:00
Gilles Peskine
c45d9ac4c2 Allow setting removed options that are now always on
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-24 17:20:35 +02:00
Gilles Peskine
8e44a94d39 Automatically generate checkers for removed options
Read the list of historical config options in 3.6, compare that to 1.0/4.0
and emit the appropriate checkers.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-24 17:20:35 +02:00
Gilles Peskine
24273c06db Checks for crypto options or internal macros set in mbedtls
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-24 17:20:35 +02:00
Ronald Cron
3a252dda0c Adapt code_size_compare.py to make deprecation and submodules
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-24 16:31:12 +02:00
Ronald Cron
37148d0fe3 Adapt memory.sh to make deprecation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-24 12:39:29 +02:00
Ronald Cron
15cd8b0a63 Adapt footprint.sh to make deprecation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-24 12:38:35 +02:00
Gilles Peskine
caaf52d6d0 Merge pull request #10391 from bjwtaylor/remove-deprecated-compilation-options-2
Remove deprecated compilation options 2
2025-09-23 08:40:11 +00:00
Ronald Cron
e7bac84a22 Remove the generation of MS visual studio files
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-22 18:00:26 +02:00
Ronald Cron
31f63210ec Deprecate Make
Move and rename the root Makefile to
scripts/legacy.make. That way running
make from the root fails.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-22 18:00:26 +02:00
Ronald Cron
bb02ec121e Prepare abi_check.py to scripts/legacy.make
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-22 18:00:26 +02:00
Ronald Cron
879cba1a67 cmake: Introduce version and soversion variables
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-22 14:34:55 +02:00
Ben Taylor
62491a9327 Revert changes to config.py after dependencies have been merged
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-09-22 09:07:12 +01:00
Gilles Peskine
3374f6e90b Generate checks for bad options in the config file
Just a proof-of-concept for now. Interesting checks will come later.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-19 13:36:24 +02:00
Ronald Cron
919a1e4e22 Cleanup following the removal of RSA legacy options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
2b7f59535f Remove completely MBEDTLS_PLATFORM_GET_ENTROPY_ALT
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-16 15:53:43 +02:00
Ronald Cron
9a10e398fa Simplify footprint.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-10 17:12:05 +02:00
Ronald Cron
b01be14907 Fix footprint.sh
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-10 15:23:32 +02:00
Ronald Cron
ab7610c318 Cleanup following the removal of entropy options
Cleanup following the removal in TF-PSA-Crypto of:
- MBEDTLS_NO_PLATFORM_ENTROPY
- MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
- MBEDTLS_ENTROPY_HARDWARE_ALT
- MBEDTLS_ENTROPY_MIN_HARDWARE

Only MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES was still
present in Mbed TLS.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-10 15:23:32 +02:00
Ronald Cron
eb16a9d9ea Prepare for the removal of MBEDTLS_PLATFORM_GET_ENTROPY_ALT
We cannot remove it completely yet.
It must remain in config.py so that it is not
included in the full configuration.
A temporary exception is required for it in
analyze_outcomes.py.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-09-10 15:23:32 +02:00
Minos Galanakis
906950d8dc config/depends.py: Removed legacy options.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-08-21 15:57:00 +01:00
Gilles Peskine
bb8bafa5e5 Pacify uncrustify
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-26 00:23:05 +02:00