gpoulios opened a new pull request, #3199: URL: https://github.com/apache/nuttx-apps/pull/3199
## Summary Both optee_supplicant and libteec are found in the same external source repo ([optee_client](https://github.com/OP-TEE/optee_client)). optee_supplicant depends on libteec. A Kconfig dependency was in place, but not a makefile dependency. So far, optee_supplicant would not re-download the optee_client archive (zip), and would expect to find it through libteec. In cases where optee_supplicant's context `context` target was invoked before libteec's `context` target, the supplicant would not have a rule available to download the archive. <details> <summary>Symptom: build-time log</summary> ``` Downloading: https://github.com/OP-TEE/optee_client/archive/refs/tags/4.6.0.zip CP: [...]/nuttx/include/nuttx/config.h CC: tcpblaster_host.c CC: tcpblaster_cmdline.c CC: tcpblaster_server.c make[3]: *** No rule to make target '../libteec/4.6.0.zip', needed by 'optee_client'. Stop. make[2]: *** [Makefile:57:[...]/apps/tee/optee_supplicant_context] Error 2 make[2]: *** Waiting for unfinished jobs.... ``` </details> A more straightforward approach is to reflect optee_client file structure in NuttX apps repo, i.e. have an optee_client directory that contains both libteec and the supplicant. ## Impact No change for users. Kconfig semantics are the same (`CONFIG_OPTEE_SUPPLICANT` depends on `CONFIG_LIBTEEC`). Only change is `CONFIG_LIBTEEC_VERSION` and `CONFIG_OPTEE_SUPPLICANT_VERSION` are now both controlled by `CONFIG_OPTEE_CLIENT_VERSION`. The result is a much more straightforward file structure without any out-of-dir dependencies or missing makefile rules. ## Testing Tests performed on an NXP i.MX93 with `imx93-evk:koptee` and: ``` CONFIG_DEV_OPTEE_SUPPLICANT=y CONFIG_EXAMPLES_OPTEE_GP=y CONFIG_LIBTEEC=y CONFIG_OPTEE_SUPPLICANT=y ``` Results: ``` knsh> optee_gp D/TC:0 0 core_mmu_xlat_table_alloc:691 xlat tables used 8 D/TC:? 0 tee_ta_init_pseudo_ta_session:303 Lookup pseudo TA 7011a688-ddde-4053-a5a9-7b3c4ddf13b8 D/TC:? 0 tee_ta_init_pseudo_ta_session:315 Open device.pta D/TC:? 0 tee_ta_init_pseudo_ta_session:330 device.pta : 7011a688-ddde-4053-a5a9-7b3c4ddf13b8 INF [7] TEEC:mainD/TC:? 0 tee_ta_close_session:460 csess 0xd16150d0 id 1 D/TC:? 0 tee_ta_close_session:479 Destroy session :164: Available devices: INF [7] TEEC:main:174: d96a5b40-c3e5-21e3-8794-1002a5d5c61b INF [7] TEEC:main:174: 1619ec9c-18f9-48e3-889c-ed4ef567c806 INF [7] TEEC:main:174: f04a0fe7-1f5d-4b9b-abf7-619b85b4ce8c knsh> optee_supplicant -f /data/tee & optee_supplicant [0:100] knsh> DBG [6] TEEC:open_dev:441: using device "/dev/teepriv0" DBG [6] TEEC:process_one_request:568: looping ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
