blob: 5c49237d89feaee4c85411dfc2741c1d61de7cd1 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001Source codes of optee applications locates in openwrt/marvell/services/optee_app.
2Currently, only a few example applications are provided for customers' reference,
3such as random, cipher and so on.
4Customers can develop their own TAs and CAs according to ASR examples,
5then add their source codes of TA/CA to openwrt/marvell/services/optee_app
6and modify package/services/optee_app/Makefile to build their applications.
7
8For example, if customers want to add an application named 'hello_world'.
9Firstly, they need to develop the source codes following below layout:
10 marvell/services/optee_app/helloworld/
11 ├── host
12 │ ├── Makefile BINARY=optee_example_hello_world
13 │ └── main.c Implementation of host application of hello world
14 └── ta
15 ├── Makefile BINARY=<uuid>
16 ├── sub.mk srcs-y += hello_world_ta.c
17 ├── include
18 │ └── hello_world_ta.h Header exported to non-secure: TA commands API
19 ├── hello_world_ta.c Implementation of TA entry points
20 └── user_ta_header_defines.h TA_UUID, TA_FLAGS, TA_DATA/STACK_SIZE, ...
21
22Secondly, add below two items to package/services/optee_app/Makefile
23a):
24define Package/optee_app/config
25menu "OPTEE application Configuration"
26.......
27config HELLOWORLD
28 bool "Enable hello world TA/CA"
29 default n
30........
31endmenu
32endef
33
34b):
35ifeq ($(CONFIG_HELLOWORLD),y)
36 APP_LIST := $(APP_LIST)" helloworld"
37endif
38
39"helloworld" appended to APP_LIST should be the folder name of the hello world application.
40
41Thirdly, 'make menuconfig' under top directory and enable the hello world applcaition as below:
42services--->
43 optee_app
44 OPTEE application Configuration-->
45 [*]Enable hello world TA/CA
46
47Lastly, after build openwrt and burn the images to board, the helloworld executable CA is under
48usr/sbin and its TA is under /usr/lib/optee_armtz。