In Teaclave TrustZone SDK, example CAs are built as ARM64 Linux ELF by default. Besides, you can follow these steps to build Rust CAs running on the Android platform:
$ wget https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip $ unzip android-ndk-r21e-linux-x86_64.zip
$ rustup target add aarch64-linux-android
export PATH=$PATH:/your/path/to/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/
incubator-teaclave-trustzone-sdk/.cargo/config
, add:[target.aarch64-linux-android] linker = "aarch64-linux-android28-clang" ar = "aarch64-linux-android-ar"
/incubator-teaclave-trustzone-sdk/optee/optee_client/out/export/usr/lib
.$ cd /path/to/optee/optee_client/ $ ndk-build APP_BUILD_SCRIPT=./Android.mk NDK_PROJECT_PATH=. NDK_LOG=1 APP_PLATFORM=android-29
NAME := hello_world-rs TARGET := aarch64-linux-android OPTEE_DIR ?= ../../../optee OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: host host: @cargo build --target $(TARGET) --release --verbose clean: @cargo clean
$ make -C examples/hello_world-rs/host