-
Notifications
You must be signed in to change notification settings - Fork 3k
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
CMake: support signing TF-M targets with post binary hooks #14361
Conversation
@LDong-Arm, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move tools/psa/tfm/bin_utils/mbed_set_post_build_tfm.cmake
to tools/cmake
.
7b13ca4
to
38100aa
Compare
...ERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/mbed_set_post_build_tfm.cmake
Outdated
Show resolved
Hide resolved
38100aa
to
96239bb
Compare
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
The signing keys were previously imported from trusted-firmware-m and located in mbed-os/tools/targets/musca_* (path for Mbed CLI 1). This PR copie them into each target's directory as per the convention of the new tools. Keys in the old path remain untouched for backward compatibility, but they will be eventually removed once we stop supporting Mbed CLI 1.
This commit adds post binary hook support for TF-M targets. To apply this hook to a TF-M target, do the following in the target's `CMakeLists.txt`: * include `mbed_set_post_build_tfm.cmake` * call `mbed_post_build_tfm_sign_image()`, passing - Mbed OS target name - TF-M target name - path containing the target's bootloader, layout files and signing keys - path to the secure binary - path to the non-secure binary (i.e. the "raw" Mbed application)
96239bb
to
3e19778
Compare
Rebased after the merging of the preceding PR. Now looking into the failed test in CI. |
It's a CI issue. "jenkins-ci/mbed-os-ci_tfm-integration" is a brand new pipeline that never ran before, we need to fix the pipeline. |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Preceding PR: #14378 (merged)
Changes:
mbed_post_build_tfm_sign_image()
(should work for any TF-M v1.2+ targets with secure and non-secure images in separate MCUboot slots). This was refactored from the existingtools/targets/ARM_MUSCA.py
.Impact of changes
Images built for Musca B1 and S1 with Mbed CLI 2 are now signed and able to run on the targets.
Migration actions required
None.
Documentation
To be added to the porting guide: how to integrate CMake and the provided post binary hook to a new TF-M target.
Pull request type
Test results
Reviewers
@evedon @0xc0170 @hugueskamba @rajkan01 @ARMmbed/mbed-b-tools