-
Notifications
You must be signed in to change notification settings - Fork 62
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] Rust examples build environment cleanup #116
Conversation
Signed-off-by: Sumit Garg <[email protected]>
Similar to C counterparts, use OPTEE_CLIENT_EXPORT as a standard path to export pre-built optee-client libraries and headers. Signed-off-by: Sumit Garg <[email protected]>
Similar to C counterparts, use TA_DEV_KIT_DIR as a standard path to export pre-built TA libraries and headers. Signed-off-by: Sumit Garg <[email protected]>
Refactor OP-TEE rust examples build infrastructure to rather use standard environment variables like: - CROSS_COMPILE - TA_DEV_KIT_DIR With that remove any custom OPTEE_* environment variables. Signed-off-by: Sumit Garg <[email protected]>
Rather than automatically building OP-TEE OS and OP-TEE Client, we should ask users to build them for their particular platforms using whichever OP-TEE release they are targeting. Users just have to export paths for OP-TEE OS build artifacts via TA_DEV_KIT_DIR and for OP-TEE Client via OPTEE_CLIENT_EXPORT. This is the common practice followed by C counterparts like optee_test and optee_examples. Along with that it make OP-TEE rust examples compatible with build systems like Yocto etc. Regarding toolchains, we don't need to fetch them explicitly but rather users can use the distro cross compiler or the one they have installed on a particular location via CROSS_COMPILE environment variable. With that build command simplifies to just following: $ make CROSS_COMPILE=aarch64-linux-gnu- \ TA_DEV_KIT_DIR=<optee_os>/out/arm-plat-vexpress/export-ta_arm64/ \ OPTEE_CLIENT_EXPORT=<optee_client>/out/export/ Signed-off-by: Sumit Garg <[email protected]>
Since we don't have a similar linker script pre-processing capability in rust build script as we have with C Makefile. So manually fix following build error seen with older GCC linker while parsing linker scripts: aarch64-linux-gnu-ld.bfd:ta.lds:3: ignoring invalid character `#' in expression Signed-off-by: Sumit Garg <[email protected]>
arm-none-linux-gnueabihf-ld.bfd reports EABI version mismatch issue, drop that error via adding "--no-warn-mismatch" linker flag. Signed-off-by: Sumit Garg <[email protected]>
Extend CI to build OP-TEE rust examples for both Arm 64-bit and Arm 32-bit mode. Signed-off-by: Sumit Garg <[email protected]>
@DemesneGH The CI has been updated now for refactored build infrastructure. Also, I have added standalone rust examples build too for both Arm 64-bit as well as Arm 32-bit. Please trigger CI again. Although, there is still one dependency as OP-TEE/build#715 left for CI to completely pass. |
Since this is merged, can you re-trigger the CI build now? I hope it should pass now. |
merged, thanks! |
Allow OP-TEE rust examples to be compiled using standard OP-TEE environment variables:
Dependency: OP-TEE/build#715