[tools] Do init-ra build according to TEE type

This commit is contained in:
Zheng, Qi 2023-06-19 10:21:25 +08:00 committed by volcano
parent 72aaa47445
commit 953e67b564
2 changed files with 8 additions and 1 deletions

@ -12,7 +12,9 @@ all:
@$(MAKE) --no-print-directory -C gen_internal_conf
@$(MAKE) --no-print-directory -C copy_bom
@$(MAKE) --no-print-directory -C init
ifndef OCCLUM_DISABLE_DCAP
@$(MAKE) --no-print-directory -C init_grpc_ratls
endif
@$(MAKE) --no-print-directory -C init_aecs
format:
@ -26,5 +28,7 @@ clean:
@$(MAKE) --no-print-directory -C gen_internal_conf clean
@$(MAKE) --no-print-directory -C copy_bom clean
@$(MAKE) --no-print-directory -C init clean
ifndef OCCLUM_DISABLE_DCAP
@$(MAKE) --no-print-directory -C init_grpc_ratls clean
endif
@$(MAKE) --no-print-directory -C init_aecs clean

@ -5,6 +5,9 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
INSTALL_DIR=/opt/occlum/toolchains/aecs_client
AECS_DIR=${script_dir}/enclave-configuration-service
# Default TEE TYPE is SGX2, also support HYPERENCLAVE
TEETYPE=${1:-SGX2}
git clone https://github.com/SOFAEnclave/enclave-configuration-service.git
pushd ${AECS_DIR}
@ -13,7 +16,7 @@ git submodule update --init --recursive
echo "Start building AECS client libraries ..."
pushd client/cpp_occlum
./occlum_build_prepare.sh
./occlum_build_aecs_client.sh --teetype SGX2 --envtype OCCLUM
./occlum_build_aecs_client.sh --teetype ${TEETYPE} --envtype OCCLUM
echo "Move AECS client libraries to toolchain path"
mkdir -p ${INSTALL_DIR}