If you simply want to build and run Graphene on the same host, try the following steps:
** Note: Please use GCC version 4 or 5 **
** Please make sure the Intel SGX Linux SDK and driver are installed. **
If not, download and install from these two repositories: https://github.com/01org/linux-sgx and https://github.com/01org/linux-sgx-driver
** Note: Please use Intel SGX Linux SDK and driver version 1.9 or lower. **
git clone https://github.com/oscarlab/graphene.git
export GRAPHENE_DIR=$PWD/graphene
cd $GRAPHENE_DIR/Pal/src/host/Linux-SGX/signer
openssl genrsa -3 -out enclave-key.pem 3072
cd $GRAPHENE_DIR/Pal/src
git submodule update --init -- $GRAPHENE_DIR/Pal/src/host/Linux-SGX/sgx-driver/
make SGX=1
cd $GRAPHENE_DIR/Pal/src/host/Linux-SGX/sgx-driver
make
sudo ./load.sh
cd $GRAPHENE_DIR/LibOS
make SGX=1
cd $GRAPHENE_DIR/LibOS/shim/test/native
make SGX=1
make SGX_RUN=1
./pal_loader SGX helloworld or SGX=1 ./pal_loader helloworld
git submodule update --init -- $GRAPHENE_DIR/LibOS/shim/test/apps
cd $GRAPHENE_DIR/LibOS/shim/test/apps/lmbench
make SGX=1
make SGX_RUN=1
cd lmbench-2.5/bin/linux
./pal_loader SGX lat_syscall null or SGX=1 ./pal_loader lat_syscall null
./pal_loader SGX lat_syscall open or SGX=1 ./pal_loader lat_syscall open
./pal_loader SGX lat_syscall read or SGX=1 ./pal_loader lat_syscall read
./pal_loader SGX lat_proc fork or SGX=1 ./pal_loader lat_proc fork