You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by GitBox <gi...@apache.org> on 2022/03/23 16:27:35 UTC

[GitHub] [incubator-teaclave-trustzone-sdk] syedelec opened a new issue #66: Clean TA build environment

syedelec opened a new issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66


   Hi
   
   I wanted to take only the necessary part/libs to build TA using your SDK however it seems that your environment uses workarounds/patches to get examples building, especially building TAs (building host applications seems reasonable).
   
   Is there a way to simplify the TA build?
   I am thinking for example: 
   - avoid patching rust-lang, compiler-builtins and libc?
   - use latest rust toolchains
   - use pre-built optee libutee.a/libutils.a and libteec.so libraries (to avoid pull optee os/client)
   
   If you think of a clean/minimal way of doing things, please share suggestions.
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] syedelec commented on issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
syedelec commented on issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66#issuecomment-1080507170


   Hi @DemesneGH 
   
   Sorry for late answer.
   Thank you again for your valuable inputs/clarifications.
   
   > What are your needs for the minimal building environment? Any thoughts would be appreciated.
   
   I already have a building environment for a library in Rust and I would like to integrate the TA (host + ta) and not build them separately. This is the main reason.
   
   Thanks
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66#issuecomment-1078735978


   Hi @syedelec 
   
   > is it possible to use the latest nightly version (`nightly-x86_64-unknown-linux-gnu`) ?
   
   Yes but not yet. When upgrading toolchains, the std should be upgraded to a proper version at the same time. Because the std code can only be compiled in a certain range of versions of the Rust toolchain. 
   
   > why not the stable version (`stable-x86_64-unknown-linux-gnu`)?
   
   No. The nightly version is needed for building customized std.
   
   > Also why install xargo from specific 1.44.0 version and not use the stable/nightly version
   
   The toolchain for installing xargo can be upgraded to a newer version but we've not tested for it.
   
   
   > Finally, the source code is for rust, compiler-builtins and libc are taken from https://github.com/mesalock-linux org and these specific repos seems not updated. It would be great if the repos could be updated to a stable version and apply the single commit on top to get it working.
   
   The rust, compiler-builtins and libc ported for OP-TEE are based on the stable Rust version 1.56.1. And the patch for OP-TEE is in https://github.com/mesalock-linux/rust/commit/6abda667852184641149d34da4730d96ba4f7d31.
   
   > these are suggestions and I would like to know if this is doable because I may get into it to clean repos and make it working with minimal workarounds.
   
   For simplification of the building environment, one considerable way is to add the `aarch64-unknown-optee-trustzone` target into the upstream Rust compiler repo. Then we can build binaries for this target by `rustup target add aarch64-unknown-optee-trustzone`. 
   But this needs more work to integrate the customized std into the Rust repo.
   
   What are your needs for the minimal building environment? Any thoughts would be appreciated.
   
   Thanks
   Yuan


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] syedelec commented on issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
syedelec commented on issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66#issuecomment-1081751749


   Hi @DemesneGH
   
   Thanks for your inputs! It's very helpful.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66#issuecomment-1081351031


   Hi @syedelec 
   
   > I already have a building environment for a library in Rust and I would like to integrate the TA (host + ta) and not build them separately.
   
   The toolchains for building host applications can be upgraded to the new version or changed to the other architecture(such as Android) as you want, because those are normal Linux binaries.
   As for building TAs, the specific toolchains and the modified std are needed as stated above. Maybe you can try to include the source code of your library as the third-party crate in TA's `Cargo.toml`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] syedelec closed issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
syedelec closed issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #66: Clean TA build environment

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #66:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/66#issuecomment-1077550241


   Hi @syedelec 
   
   Thanks for your advice.
   
   
   > * avoid patching rust-lang, compiler-builtins and libc?
   > * use latest rust toolchains
   
   The patching of rust-lang and other submodules are necessary for building TAs running on OP-TEE OS. In addition, the other solution is to release these dependencies as prebuilt libraries. But AFAIK Rust and cargo don't support the pre-built libraries yet.
   
   
   > * use pre-built optee libutee.a/libutils.a and libteec.so libraries (to avoid pull optee os/client)
   
   The OP-TEE libraries(for building TA,aka ta_dev_kit) are built when building OP-TEE OS. If you have already built OP-TEE OS, you can avoid building the OP-TEE libraries using `export OPTEE_DIR=[YOUR_OPTEE_DIR]`, see the instructions [here](https://github.com/apache/incubator-teaclave-trustzone-sdk#use-op-tee-libraries-as-submodules).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org