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

recipes-bsp/optee-ftpm: optee-ftpm package needs to be cross compiled #547

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rakeshk7097
Copy link

optee-ftpm builds successfully only in cross-compilation mode; therefore, setting the recipe to default to cross-compilation can resolve the following build error.

make[2]: Entering directory '/<>/Samples/ARM32-FirmwareTPM/optee_ta' /usr/bin/make -C fTPM CROSS_COMPILE=
make[3]: Entering directory '/<>/Samples/ARM32-FirmwareTPM/optee_ta/fTPM'
Checking symlink to the TPM folder: /<>
Checking symlink to the WolfSSL folder: /<>/external/wolfssl Establishing symlink.
Establishing symlink.
CC ../out/fTPM/platform/AdminPPI.o
CC ../out/fTPM/platform/Cancel.o
make[3]: *** No rule to make target 'lib/wolf/wolf_symlink/wolfcrypt/src/aes.c', needed by '../out/fTPM/./lib/wolf/wolf_symlink/wolfcrypt/src/aes.o'. Stop.
make[3]: *** Waiting for unfinished jobs....
CC ../out/fTPM/platform/Clock.o
CC ../out/fTPM/platform/Entropy.o
CC ../out/fTPM/platform/LocalityPlat.o
CC ../out/fTPM/platform/NvAdmin.o
CC ../out/fTPM/platform/NVMem.o
CC ../out/fTPM/platform/PowerPlat.o
CC ../out/fTPM/platform/PlatformData.o
CC ../out/fTPM/platform/PPPlat.o
CC ../out/fTPM/platform/RunCommand.o
CC ../out/fTPM/platform/Unique.o
CC ../out/fTPM/platform/EPS.o
CC ../out/fTPM/platform/PlatformACT.o
CC ../out/fTPM/reference/RuntimeSupport.o
CC ../out/fTPM/platform/fTPM_helpers.o
CC ../out/fTPM/fTPM.o
make[3]: Leaving directory '/<>/Samples/ARM32-FirmwareTPM/optee_ta/fTPM'
make[2]: *** [Makefile:6: all] Error 2

optee-ftpm successfully build only in cross compilation mode, so setting the recipe
by default build for cross compilation to resolve the below build error.

make[2]: Entering directory '/<<PKGBUILDDIR>>/Samples/ARM32-FirmwareTPM/optee_ta'
/usr/bin/make -C fTPM CROSS_COMPILE=
make[3]: Entering directory '/<<PKGBUILDDIR>>/Samples/ARM32-FirmwareTPM/optee_ta/fTPM'
Checking symlink to the TPM folder: /<<PKGBUILDDIR>>
Checking symlink to the WolfSSL folder: /<<PKGBUILDDIR>>/external/wolfssl
Establishing symlink.
Establishing symlink.
  CC      ../out/fTPM/platform/AdminPPI.o
  CC      ../out/fTPM/platform/Cancel.o
make[3]: *** No rule to make target 'lib/wolf/wolf_symlink/wolfcrypt/src/aes.c', needed by '../out/fTPM/./lib/wolf/wolf_symlink/wolfcrypt/src/aes.o'.  Stop.
make[3]: *** Waiting for unfinished jobs....
  CC      ../out/fTPM/platform/Clock.o
  CC      ../out/fTPM/platform/Entropy.o
  CC      ../out/fTPM/platform/LocalityPlat.o
  CC      ../out/fTPM/platform/NvAdmin.o
  CC      ../out/fTPM/platform/NVMem.o
  CC      ../out/fTPM/platform/PowerPlat.o
  CC      ../out/fTPM/platform/PlatformData.o
  CC      ../out/fTPM/platform/PPPlat.o
  CC      ../out/fTPM/platform/RunCommand.o
  CC      ../out/fTPM/platform/Unique.o
  CC      ../out/fTPM/platform/EPS.o
  CC      ../out/fTPM/platform/PlatformACT.o
  CC      ../out/fTPM/reference/RuntimeSupport.o
  CC      ../out/fTPM/platform/fTPM_helpers.o
  CC      ../out/fTPM/fTPM.o
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Samples/ARM32-FirmwareTPM/optee_ta/fTPM'
make[2]: *** [Makefile:6: all] Error 2

Signed-off-by: Rakesh Kumar <[email protected]>
@rakeshk7097
Copy link
Author

Hi @BaochengSu , could you please review the PR.

@jan-kiszka
Copy link
Collaborator

This rather looks like an issue that is independent of the recipe in meta-iot2050, rather shared by all that use optee-ftpm.inc from isar. But just dropping it there will also not solve the underlying issue because this would still break on arm64 build hosts - which we kind of supported once.

But why are you running into this at all? Are you actually building inside QEMU?

@rakeshk7097
Copy link
Author

rakeshk7097 commented May 31, 2024

Hi @jan-kiszka ,
thanks for your comment.

This rather looks like an issue that is independent of the recipe in meta-iot2050, rather shared by all that use optee-ftpm.inc from isar. But just dropping it there will also not solve the underlying issue because this would still break on arm64 build hosts - which we kind of supported once.

But why are you running into this at all? Are you actually building inside QEMU?

Actually, I am building on an x86 host machine and attempted to build the optee-ftpm-iot2050 package without setting ISAR_CROSS_COMPILE = 1 in local.conf, but the build process reported an error.

Building only optee-ftpm package for cross-compilation might be beneficial rather than setting ISAR_CROSS_COMPILE = 1 in local.conf and compiling all packages in cross-compilation mode, as is the current practice with meta-iot2050 for enabling secure boot.

What would be your suggestion regarding this matter?

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