SKALE-4110 upgrade to sgx 2.13

parent ec396cb7
......@@ -22,13 +22,13 @@ RUN apt update && \
ln -s /usr/bin/ccache /usr/local/bin/g++ && \
ln -s /usr/bin/ccache /usr/local/bin/cc && \
ln -s /usr/bin/ccache /usr/local/bin/c++ && \
git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx && \
git clone -b sgx_2.13 --depth 1 https://github.com/intel/linux-sgx && \
cd linux-sgx && \
patch -p1 -i ../install-psw.patch && \
./download_prebuilt.sh 2> /dev/null && \
make -s -j$(nproc) sdk_install_pkg psw_install_pkg && \
./linux/installer/bin/sgx_linux_x64_sdk_2.5.100.49891.bin --prefix=/opt/intel && \
./linux/installer/bin/sgx_linux_x64_psw_2.5.100.49891.bin && \
make preparation && \
make -s -j$(nproc) sdk_install_pkg deb_psw_pkg && \
./linux/installer/bin/sgx_linux_x64_sdk_2.13.100.4.bin --prefix=/opt/intel && \
./linux/installer/bin/sgx_linux_x64_psw_2.13.100.4.bin && \
cd .. && rm -rf linux-sgx/ && cd scripts && ./build_deps.py && \
wget --progress=dot:mega -O - https://github.com/intel/dynamic-application-loader-host-interface/archive/072d233296c15d0dcd1fb4570694d0244729f87b.tar.gz | tar -xz && \
cd dynamic-application-loader-host-interface-072d233296c15d0dcd1fb4570694d0244729f87b && \
......
diff --git a/linux/installer/bin/install-sgx-psw.bin.tmpl b/linux/installer/bin/install-sgx-psw.bin.tmpl
index 3510e97c..751831ab 100755
index 7d19987..7386ce7 100755
--- a/linux/installer/bin/install-sgx-psw.bin.tmpl
+++ b/linux/installer/bin/install-sgx-psw.bin.tmpl
@@ -30,34 +30,10 @@
@@ -30,33 +30,10 @@
#
#
......@@ -12,7 +12,7 @@ index 3510e97c..751831ab 100755
- if [[ $? != "0" ]]; then
- /sbin/modinfo intel_sgx &> /dev/null
- if [[ $? != "0" ]]; then
- lsmod | grep 'isgx\|intel_sgx' &> /dev/null
- /sbin/lsmod 2> /dev/null | grep 'isgx\|intel_sgx'
- if [[ $? = "0" ]]; then
- echo "Warning: You did not follow the document to install the driver package."
- echo
......@@ -33,45 +33,6 @@ index 3510e97c..751831ab 100755
- exit 4
-fi
-
-
PKG_ARCH=@arch@
ARCH=$(uname -m)
diff --git a/linux/installer/common/libsgx-enclave-common/install.sh b/linux/installer/common/libsgx-enclave-common/install.sh
index 296879af..851d520b 100755
--- a/linux/installer/common/libsgx-enclave-common/install.sh
+++ b/linux/installer/common/libsgx-enclave-common/install.sh
@@ -33,11 +33,6 @@
set -e
-if test $(id -u) -ne 0; then
- echo "Root privilege is required."
- exit 1
-fi
-
SCRIPT_DIR=$(dirname "$0")
source ${SCRIPT_DIR}/installConfig
@@ -95,7 +90,7 @@ elif [ -d /etc/init/ ]; then
else
echo " failed."
echo "Unsupported platform - neither systemctl nor initctl is found."
- exit 5
+ retval=0
fi
if test $retval -ne 0; then
diff --git a/linux/installer/common/psw/install.sh b/linux/installer/common/psw/install.sh
index 59f3ed61..8ba940a3 100755
--- a/linux/installer/common/psw/install.sh
+++ b/linux/installer/common/psw/install.sh
@@ -96,7 +96,7 @@ elif [ -d /etc/init/ ]; then
else
echo " failed."
echo "Unsupported platform - neither systemctl nor initctl is found."
- exit 5
+ retval=0
fi
if test $retval -ne 0; then
......@@ -45,11 +45,11 @@ apt-get install build-essential
Run the following command:
```bash
cd scripts; sudo ./sgx_linux_x64_driver_2.5.0_2605efa.bin; cd ..
cd scripts; sudo ./sgx_linux_x64_driver_2.11.0_0373e2e.bin; cd ..
```
Alternatively, other driver versions may be downloaded from Intel.
Please note that version `2.5.0_2605efa` is what is currently supported.
Please note that version `2.11.0_0373e2e` is what is currently supported.
Reboot you machine after driver install. Do `ls /dev/isgx` to check that `isgx` device is properly installed.
If you do not see the `isgx` device, you need to troubleshoot your driver installation.
......
Subproject commit 8dc9f547c612010ea0b6257d86bcbd4ff7149565
Subproject commit a70a1b07fd1bbfd3797197654297f8aa010e269a
Subproject commit 95eaa6f6693cd86c35e10a22b4f8e483373c987c
Subproject commit 75bf89f7d6dd4598b9f8148bd6374a407f37105c
......@@ -105,12 +105,12 @@ assert subprocess.call(["bash", "-c", "./build.sh"]) == 0
print("Install Linux SDK");
os.chdir(SCRIPTS_DIR)
assert subprocess.call(["bash", "-c", "./sgx_linux_x64_sdk_2.5.100.49891.bin --prefix=" + topDir + "/sgx-sdk-build"]) == 0
assert subprocess.call(["bash", "-c", "./sgx_linux_x64_sdk_2.13.100.4.bin --prefix=" + topDir + "/sgx-sdk-build"]) == 0
print("Make GMP");
os.chdir(GMP_DIR)
assert subprocess.call(["bash", "-c", "./configure --prefix=" + TGMP_BUILD_DIR + " --disable-shared --enable-static --with-pic --enable-sgx --with-sgxsdk=" + SDK_DIR + "/sgxsdk"]) == 0
assert subprocess.call(["bash", "-c", "./configure --prefix=" + TGMP_BUILD_DIR + " --disable-shared --enable-static --with-pic --enable-sgx --with-sgxsdk=" + SDK_DIR + "/sgxsdk"]) == 0
assert subprocess.call(["make", "install"]) == 0
assert subprocess.call(["make", "clean"]) == 0
......
File added
File deleted
File added
File deleted
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment