OP-TEE / optee_os

Trusted side of the TEE
Other
1.56k stars 1.05k forks source link

Build error when using CFG_IN_TREE_EARLY_TAS #4815

Closed matthew-chae closed 3 years ago

matthew-chae commented 3 years ago

I hope to write the early TA, thus I choose to use "CFG_IN_TREE_EARLY_TAS". I did the following things.

  1. This below is added at the conf.mk in the platform directory. CFG_IN_TREE_EARLY_TAS += export-ta_arm64/ta/78911928-eb1e-427f-87dd-f281-58156f28
  2. TA has been written and built successfully. This is shown in /ta/export-ta_arm64/ta/78911928-eb1e-427f-87dd-f2f158256f27.ta
  3. Following error is showing. make: *** No rule to make target 'out/arm-plat-ambarella/ta/export-ta_arm64/ta/78911928-eb1e-427f-87dd-f281- 58156f28.stripped.elf', needed by 'out/arm-plat-ambarella/core/early_ta_78911928-eb1e-427f-87dd-f281-58156f28.c'. Stop.

I'm assuming CFG_IN_TREE_EARLY_TAS seems to require ".stripped.elf" rather than ".ta" In order to make .stripped.elf things, what should I do? Can I get some ideas?

etienne-lms commented 3 years ago

Should be CFG_IN_TREE_EARLY_TAS += <dir-name>/78911928-eb1e-427f-87dd-f281-58156f28 with <dir-name> the name of the subdirectory that contains the TA in _/ta/_. See for example how plat-hikey/conf.mk embeds avb TA:

CFG_IN_TREE_EARLY_TAS += avb/023f8f1a-292a-432b-8fc4-de8471358067
matthew-chae commented 3 years ago

Thank you for your help. I made it.