-
Notifications
You must be signed in to change notification settings - Fork 76
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 <s-tripathi1@ti.com>
82479c1 to
22f0540
Compare
|
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. Signed-off-by: Shiva Tripathi <s-tripathi1@ti.com>
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. |
| .. ifconfig:: CONFIG_part_variant not in ('AM62LX') | ||
|
|
||
| .. parsed-literal:: | ||
| $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y | ||
| .. ifconfig:: CONFIG_part_variant in ('AM62LX') | ||
|
|
||
| .. parsed-literal:: | ||
| $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y | ||
| $ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y CFG_USER_TA_TARGETS=ta_arm64 |
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.
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.