Build a TA with prebuild images

Hello !

I am using OPTEE-OS on Hikey960 and would like to build a Trusted Application.
When building a TA, I need to specify the path to the out/ folder of OPTEE-OS (TA_DEV_KIT_DIR). I believe it is to sign the application. However, I am using the prebuilt from:
http://github.com/96boards-hikey/tools-images-hikey960

and don’t have access to the built OPTEE-OS and thus, cannot specify the path to build the TA.

Is there a way to compile my TA? Apart from building the BSP from source and stop using the prebuild?

Thanks.

@poki Are you using prebuilt “fip.bin” image from here [1]? If yes, then you could find OP-TEE OS head commit info in that link [1] only. So you could built standalone OP-TEE OS, your TA and run it using prebuilt images.

[1] http://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/latest/hikey960/debug/

1 Like

Thanks @sumit.garg I will try this!

Out of curiosity, I found out that the same key is used by default in OPTEE-OS for signing the TA. So I could use any version of OPTEE-OS and this should work ? (https://github.com/OP-TEE/optee_os/issues/1485)
Or is there a version control mechanism that would forbid a TA built with an old version of OPTEE-OS to be loaded in a more recent OPTEE-OS build? (Which would explain why I get an error while trying to open a session with my TA compiled with a different version)

@poki Yes it is due to version skew issue that TA built with an old version of OPTEE-OS fails to run with more recent OPTEE-OS build.

1 Like