git clone --recurse-submodules https://github.com/skalenetwork/sgxwallet.git
cd scripts; sudo ./install_packages.sh; cd ..We are currently using SGX SDK version 2.13.
Below is a sequence of commands that builds SDK and installs it into /opt/intel directory.
# update to use your sgxwallet folder path
SGX_FOLDER="your-sgxwallet-folder"
git clone -b sgx_2.25 --depth 1 https://github.com/intel/linux-sgx
cd linux-sgx
make preparation
sudo make sdk_install_pkg_no_mitigation
cd /opt/intel
sudo sh -c "echo yes | $SGX_FOLDER/linux-sgx/linux/installer/bin/sgx_linux_x64_sdk_*.bin"
cd $SGX_FOLDER/linux-sgx
sudo make psw_install_pkg
cd /opt/intel
sudo cp $SGX_FOLDER/linux-sgx/linux/installer/bin/sgx_linux_x64_psw*.bin .
sudo ./sgx_linux_x64_psw*.bin --no-start-aesmDependencies only need to be built once.
cd scripts; ./build_deps.py; cd ..source /opt/intel/sgxsdk/environmentGo to the project's top directory, then run
./autoconf.bash
./configure
make
Note: to run in simulation mode, add --enable-sgx-simulation flag when you run configure.
./autoconf.bash
./configure --enable-sgx-simulation
makeTo format code run
cd scripts
python3 format.pyThe base container includes software common to hardware mode and simulation mode.
sudo docker build -t sgxwallet_base .
sudo docker build -t sgxwalletsim -f ./DockerfileSimulation .
sudo docker build -t sgxwallet -f ./Dockerfile .Note that configure, Makefile and Makefile.in files are created by automake tools on the fly.
Please do not add these files to the source tree!
To add new source and include files to app and enclave, edit the corresponding Makefile.am file and then re-run configure.
If you change .edl file, you need to re-run configure too.