Assessment reports>Swisstronik>Discussion>Installation steps

Installation steps

The easiest way to compile the chain is to configure BIOS, install Intel SGX SDK, install Intel SGX PSW, update the environment variables, and then build the chain.

Configure BIOS

This first step involves the following.

  • Enable software guard extensions (SGX)

  • Disable Secure Boot

  • Disable hyper-threading

  • Disable Turbo Mode

  • Enable CPU AES

After adjusting BIOS settings, ensure you save and reboot your machine for the changes to take effect.

Install Intel SGX SDK

Complete the following steps for installation of Intel SGX SDK.

  1. Download the SGX SDK installer. You can obtain the installer from this repository. Adjust the filename if necessary (e.g., sgx_linux_x64_sdk_${version}.bin).

  1. Make the installer executable. Run the following command.

chmod +x sgx_linux_x64_sdk_${version}.bin
  1. Install the SGX SDK. We recommend installing it to /opt/intel/. Use the --prefix option for a custom installation directory and follow the on-screen instructions to complete the installation.

./sgx_linux_x64_sdk_${version}.bin --prefix /opt/intel

Install Intel SGX PSW

Complete the following steps for installation of Intel SGX PSW (platform software).

  1. Add Intel's SGX repository, as below.

echo "deb https://download.01.org/intel-sgx/sgx_repo/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/intel-sgx.list >/dev/null
curl -sSL "https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key" | sudo -E apt-key add -
sudo apt update
  1. Install core PSW packages.

sudo apt install libsgx-launch libsgx-urts libsgx-epid libsgx-quote-ex \
    sgx-aesm-service libsgx-aesm-launch-plugin libsgx-aesm-epid-plugin \
    libsgx-quote-ex libsgx-dcap-ql libsnappy1v5 libsgx-dcap-quote-verify libsgx-dcap-default-qpl

Update environment variables

This involves the following.

  1. Source the SGX SDK environment. This command updates LD_LIBRARY_PATH and other necessary variables.

source /opt/intel/sgxsdk/environment
  1. Add the libdcap_quoteprov.so symbolic link (for quoteprov) and update the LD_LIBRARY_PATH again.

sudo ln -s /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so.1 /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so
sudo ldconfig
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/"

Build the chain

With the SGX SDK and PSW properly installed and configured, the project should now be able to be built:

make build

Ensure this command is run from within the project's directory or wherever the build scripts are located.

Zellic © 2025Back to top ↑