| Source codes of optee applications locates in openwrt/marvell/services/optee_app. | |
| Currently, only a few example applications are provided for customers' reference, | |
| such as random, cipher and so on. | |
| Customers can develop their own TAs and CAs according to ASR examples, | |
| then add their source codes of TA/CA to openwrt/marvell/services/optee_app | |
| and modify package/services/optee_app/Makefile to build their applications. | |
| For example, if customers want to add an application named 'hello_world'. | |
| Firstly, they need to develop the source codes following below layout: | |
| marvell/services/optee_app/helloworld/ | |
| ├── host | |
| │ ├── Makefile BINARY=optee_example_hello_world | |
| │ └── main.c Implementation of host application of hello world | |
| └── ta | |
| ├── Makefile BINARY=<uuid> | |
| ├── sub.mk srcs-y += hello_world_ta.c | |
| ├── include | |
| │ └── hello_world_ta.h Header exported to non-secure: TA commands API | |
| ├── hello_world_ta.c Implementation of TA entry points | |
| └── user_ta_header_defines.h TA_UUID, TA_FLAGS, TA_DATA/STACK_SIZE, ... | |
| Secondly, add below two items to package/services/optee_app/Makefile | |
| a): | |
| define Package/optee_app/config | |
| menu "OPTEE application Configuration" | |
| ....... | |
| config HELLOWORLD | |
| bool "Enable hello world TA/CA" | |
| default n | |
| ........ | |
| endmenu | |
| endef | |
| b): | |
| ifeq ($(CONFIG_HELLOWORLD),y) | |
| APP_LIST := $(APP_LIST)" helloworld" | |
| endif | |
| "helloworld" appended to APP_LIST should be the folder name of the hello world application. | |
| Thirdly, 'make menuconfig' under top directory and enable the hello world applcaition as below: | |
| services---> | |
| optee_app | |
| OPTEE application Configuration--> | |
| [*]Enable hello world TA/CA | |
| Lastly, after build openwrt and burn the images to board, the helloworld executable CA is under | |
| usr/sbin and its TA is under /usr/lib/optee_armtz。 |