1.make sure to run xtest to test the optee works well
ls /dev/tee* find device node
-sh-4.4# ls /dev/tee*
/dev/tee0 /dev/teepriv0
xtest
...
16081 subtests of which 0 failed
74 test cases of which 0 failed
0 test case was skipped
TEE test application done!
...
2. bitbake fsl-image-validation-imx -c populate_sdk. ; generate toolchains and install
3. in optee_examples code to generate host code and tar code, my toolchain installed in /usr/local/optee/
. /usr/local/optee/environment-setup-aarch64-poky-linux
export TEEC_EXPORT=/usr/local/optee/sysroots/aarch64-poky-linux/usr/
export TA_DEV_KIT_DIR=/usr/local/optee/sysroots/aarch64-poky-linux/usr/include/optee/export-user_ta_arm64/
make
3. scp 1234-3456.7890-11111.ta file to board. /lib/optee_armtz/. (UUID is example)
4. now you can run host code use make by step 3
done
5 after that you can install ta in secure store
xtest --install-ta /lib/optee_armtz/1234-3456.7890-11111.ta , you should rm /lib/ptee_armtz/1234-3456.7890-11111.ta
so hide the ta at
/data/tee
6.so the host code only can run in this board, can not use the data at /data/tee in another board if no same ta installed