-
Notifications
You must be signed in to change notification settings - Fork 77
fix(optee): Document CFLAGS for SDK toolchain #606
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
base: master
Are you sure you want to change the base?
Conversation
|
New warnings found with rstcheck: |
|
@manorit2001, @ti-kamlesh please review. |
|
Yeah, toolchains are, unfortunately, device specific. We used to have a nice overview explaining all of this. That was removed in favor of using the advanced include directive functions to put example commands all over the place. All of those are now wrong... |
|
ig this toolchain problem won't be specific to just optee I presume, it should be updated in some common place ig, IIRC every build requires this sysroot set correctly? |
Current toolchain setup steps are missing sysroot flags required by OP-TEE and U-Boot build systems, causing "cannot find libgcc.a" linker errors. Add CFLAGS64, KCFLAGS, and LDFLAGS exports with sysroot for 64-bit builds. Add SYSROOT_32 and CFLAGS32 for 32-bit builds. Signed-off-by: Shiva Tripathi <[email protected]>
82479c1 to
22f0540
Compare
|
New warnings found with rstcheck: |
22f0540 to
6137a68
Compare
|
New warnings found with rstcheck: |
yes it was required in u-boot as well. Added these flags in generic section which is used across. |
|
New warnings found with rstcheck: |
Building U-Boot with current SDK documentation steps results in missing tee-os blob errors on AM62LX. Include OP-TEE support in U-Boot build steps to resolve this. AM62LX SDK does not include 32-bit ARM toolchain (k3r5-devkit), unlike other K3 platforms. Remove CROSS_COMPILE_32 requirement from OP-TEE build commands and add CFG_USER_TA_TARGETS=ta_arm64 to restrict OP-TEE to build only 64-bit TAs. This resolves "cannot find libgcc.a" errors during OP-TEE build and "missing external blobs" errors during U-Boot build. Also fix indentation for existing code as per guidelines. Signed-off-by: Shiva Tripathi <[email protected]>
|
New warnings found with rstcheck: |
|
|
||
| .. parsed-literal:: | ||
| $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y |
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.
I think looking at AM62LX, in these as well CROSS_COMPILE_32 can be purged out by adding CFG_USER_TA_TARGETS=ta_arm64 but since it's not tested we can keep it as is for now and update it once tested later.
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.
a quick test on am62x does confirm that using the same command for AM62L builds optee for AM62X also.
For AM62L, there's no 32 bit toolchain- hence there's no other option then to use ta_arm64. But for non-AM62L platforms, both architectures can be supported. Hence I feel it's good to have both 32 and 64 mentioned. For e.g. some customer might be using a legacy 32 bit TA or some application
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.
I think I just didn't know at the time that we had CFG_USER_TA_TARGETS=ta_arm64 so had to keep 32 bit compilers then to satisfy the builds and boot but yeah, it's been time so people might've started using it, but I still feel that we should just keep 64 bit builds, I don't see any reason why they'd stick to 32 bit when the architecture does support 64 bit.. we can add both the build commands as well if you see fit but no strong opinions as such from my side
While building OP-TEE with the SDK's Yocto-generated toolchain, the build fails with 'cannot find libgcc.a' linker error. This occurs because the toolchain requires explicit sysroot configuration.
OP-TEE's mk/gcc.mk uses CFLAGS64 and CFLAGS32 while querying gcc for library locations ensuring the compiler returns full paths. Add documentation instructing users to export CFLAGS64 and CFLAGS32 with --sysroot flags before building OP-TEE.