mk_trustonic.mk编译脚本
生活随笔
收集整理的這篇文章主要介紹了
mk_trustonic.mk编译脚本
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Q1、如何編譯64位TA?
編譯之前設(shè)置以下環(huán)境變量
export TARGET_ARCH=arm64
export PLATFORM=ARM_V8A_AARCH64
Q2、如何編譯Debug版本TA?
編譯之前設(shè)置以下環(huán)境變量
export MODE=$mode_name
附上我自己常用的編譯腳本
FILEPATH=$(readlink -f "$0") DIRPATH=$(dirname "$FILEPATH")specific_name=$1dest_dir=/home/test/workspace/code/logssource sdk/t-base-MTK-A64-Android-510a-V001/setup.shdemo_name="" demo_name=${demo_name}" storage" demo_name=${demo_name}" zhouhehe" mode_list="Debug Release"if [[ $specific_name != "" ]];thenecho $specific_nameif [ ! -d ta/$specific_name ];thenecho "The paramater is incorrect. Please try to input again."exit 1fidemo_name=$specific_name fifor name in $demo_name dorm -rf ./ta/$name/Outrm -rf ./ca/$name/Outfor mode_name in $mode_listdoexport MODE=$mode_nameecho "===================== Start to compile $name TA ========================="export TARGET_ARCH=armexport PLATFORM=ARM_V7A_STD./ta/$name/Locals/Build/build.shexport TARGET_ARCH=arm64export PLATFORM=ARM_V8A_AARCH64./ta/$name/Locals/Build/build.shecho "===================== Start to compile $name CA ========================="./ca/$name/Locals/Build/build.shmkdir -p $dest_dir/$name/aarch64/$mode_namemkdir -p $dest_dir/$name/aarch32/$mode_nameecho "------------------$name"cp ./ca/$name/Out/Bin/arm64-v8a/Debug/$name $dest_dir/$name/aarch64/$mode_namecp ./ca/$name/Out/Bin/armeabi-v7a/Debug/$name $dest_dir/$name/aarch32/$mode_namecp ./ta/$name/Out/Bin/ARM_V8A_AARCH64/GNU/Debug/*.tabin $dest_dir/$name/aarch64/$mode_namecp ./ta/$name/Out/Bin/ARM_V7A_STD/GNU/Debug/*.tabin $dest_dir/$name/aarch32/$mode_namecp ./ta/$name/Out/Bin/ARM_V8A_AARCH64/GNU/Debug/${name}.axf $dest_dir/$name/aarch64/$mode_namecp ./ta/$name/Out/Bin/ARM_V7A_STD/GNU/Debug/${name}.axf $dest_dir/$name/aarch32/$mode_namedone doneecho "$0 done!!"總結(jié)
以上是生活随笔為你收集整理的mk_trustonic.mk编译脚本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: optee中mutex的实现方式
- 下一篇: [专栏目录]-Crypto学习笔记目录