Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate TF-M split-build #108

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

gergkv
Copy link

@gergkv gergkv commented Feb 20, 2025

Description

This PR integrates the TF-M split build feature. It contains the following changes:

  • TF-M is built seperately in build.sh
  • The NS toolchain file is now the one exported by TF-M
  • TF-M API is set up by the cmake script exported by TF-M
  • All applications are adapted to use the exported API

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

gergkv and others added 9 commits February 18, 2025 16:27
TF-M is built in build.sh and the configuration parameters are passed
for the build in an initial cache script. The TfmInitialCache.cmake
is only added for the blinky application in this commit. After TF-M is
built, the artifacts to be used during the NS build are exported in the
api_ns folder.

Signed-off-by: Gergely Kovacs <[email protected]>
Removed the previous toolchain dependency and the NS toolchain exported
by TF-M is used instead. The cross compilation flags are set up by
this toolchain file (e.g. -mcpu). The compilation options are set by
FRI, these options are the previously used options from the removed
toolchain and the options used in TF-M merged.

Signed-off-by: Gergely Kovacs <[email protected]>
Blinky application with the seperately build TF-M and the new toolchain.
The cmake files exported by TF-M set up the NS interface. The default
TF-M signing is used and the resulting images are merged by FRI.

Signed-off-by: Gergely Kovacs <[email protected]>
The application is built similarly to blinky. The update image
generation is unchanged. The mbedtls config file needs the DOMAIN_NS
check because S and NS clients are not separated. The minimal config
is added for S clients.

Signed-off-by: Gergely Kovacs <[email protected]>
The TF-M toolchain adds a __ARM_ARCH_8_1M_MAIN__ define which caused a
build error in arm_2d. It is fixed in the new release.

Signed-off-by: Gergely Kovacs <[email protected]>
The image version using the following naming:
major.minor.patch.build

Patch actually is the image header's revision.

Signed-off-by: Dávid Házi <[email protected]>
Copy link
Member

@cookpate cookpate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants