Template for Keystone Enclave Application
- Keystone SDK installed & set
KEYSTONE_SDK_DIR
- RISC-V GNU ToolChain
- Compatible version is gcc 10.2.0
- Download pre-built binary here
- Cannot build with latest gnu libc and musl libc now (2023.05)
- Compatible version is gcc 10.2.0
-
Download init script
wget https://gist.githubusercontent.com/Nanamiiiii/8c2d8c76c8b72157ec02814ed6c3aa7b/raw/4d3bb481c90cd30e6209971cab6dc979ab733836/keinit chmod +x keinit
-
Create project
./keinit <project_name> cd <project_name>
-
Setup runtime
- Use setup script
./setup_runtime.sh
- Use existing runtime source
export RUNTIME_SRC=<runtime_dir>
- Use setup script
-
Modify
CMakeLists.txt
- Modify the sections indicated by
### NEED TO MODIFY ###
to fit your project.
- Modify the sections indicated by
mkdir build && cd build
cmake ..
# build individual binary
make
# build self-extract package (makeself)
# the package is named "<project_name>.ke"
make package