The Makefile
includes useful install scripts for install the SGX SDK as well as the SGX driver. The prerequisites are to have Ubuntu 20.04 installed as well as have SGX enabled in the BIOS
The first step is to install the SGX SDK as well as build tooks for the driver. This can be done with
make sgx-sdk
A MOK key is necessary for signing any custom drivers. Creating one at /user/modules/MOK.(key|der)
can be done by running
make mok-key
You'll need to set an arbitrary password during the creation process that you will have to remember during the Secure Boot import process. After creating the MOK key, to import it into the Secure Boot:
- Restart your computer
- A blue screen should appear. If it does not, repeat the steps for creating a MOK key above.
- Select Enroll
- Select Continue
- Enter password
- Reboot
To install the SGX driver (after creating the MOK key) do the following
make sgx-driver
You can verify the driver is installed by doing
ls /dev | grep sgx
and /dev/isgx
or similar should be installed. This needs to be done for every kernel version. So if you ever do a dist-upgrade
or otherwise find your /dev/isgx
missing for any reason just perform make sgx-driver
again