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

[no-std branch] An effort to standardize OP-TEE rust based TAs development environment #115

Merged
merged 31 commits into from
Dec 29, 2023

Conversation

b49020
Copy link
Contributor

@b49020 b49020 commented Dec 28, 2023

For details please refer to: #114. The CI should pass with OP-TEE/build#714 OP-TEE build PR included.

@DemesneGH @Sword-Destiny @jbech-linaro @jenswi-linaro @jforissier @etienne-lms @daniel-thompson @Ablu Fyi..

Feedback/comments are very much welcome, thanks.

Default feature remains std support, no_std can be enabled optionally.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Default feature remains std support, no_std can be enabled optionally.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Drop Box corresponding to the handle which has been freed to avoid
following warning:

warning: unused return value of `Box::<T>::from_raw` that must be used

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
As of now rust ring crate don't support no_std, so drop that support
from TA. mbedtls can be a good alternative supporting no_std if we
really need to use a separate user-space library. But here since GP TEE
APIs already provides signature/verification APIs so that instead.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
While at it drop redundant Cargo.lock

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
In no_std environment we have to explicitly link against libutils
provided by OP-TEE.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Along with that drop global .cargo/config and move linker specific
configuration to TA build.rs file and Makefile. This allows TA directory
to be self sufficient to build up corresponding TA binary.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Having copies of TA linker scripts for every TA written in rust isn't
scalable and prone to version skews with the linker script provided by
TA devkit. And we would like to build and run TAs with different OP-TEE
versions. So lets reuse linker script provided by TA devkit and therby
drop copies from every TA direcetory.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
This will allow us to upgrade toolchain for non_std TAs while keeping
std TAs tied to a fixed nightly release until corresponding rust
toolchain target lands upstream.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Upgrade rust toolchain to use nightly-2023-12-18 release.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Only no_std mode is supported with latest nightly, so build it for the
time being.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
As std TA examples have a dependency on downstream rust toolchain target
which is cumbersome to maintain alongside, so instead drop them for now.
Once the std target becomes fully upstream then we can add them again.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Downstream OP-TEE toolchain is not needed to no_std TAs, hence drop it.
Along with that drop xargo support as we no longer require custom sysroot
setup for TAs to be built under no_std environment.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
@b49020 b49020 changed the title [no-std branch]: An effort to standardize OP-TEE rust based TAs development environment [no-std branch] An effort to standardize OP-TEE rust based TAs development environment Dec 28, 2023
@b49020
Copy link
Contributor Author

b49020 commented Dec 29, 2023

All the CI checks passed with OP-TEE/build#714 already merged.

@DemesneGH DemesneGH merged commit 4c65f12 into apache:no-std Dec 29, 2023
3 checks passed
@DemesneGH
Copy link
Contributor

merged, thanks!

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.

2 participants