install-psw.patch 3.07 KB
Newer Older
kladko's avatar
kladko committed
1
diff --git a/linux/installer/bin/install-sgx-psw.bin.tmpl b/linux/installer/bin/install-sgx-psw.bin.tmpl
2
index 7d19987..7386ce7 100755
kladko's avatar
kladko committed
3 4
--- a/linux/installer/bin/install-sgx-psw.bin.tmpl
+++ b/linux/installer/bin/install-sgx-psw.bin.tmpl
5
@@ -30,33 +30,10 @@
kladko's avatar
kladko committed
6 7 8 9 10 11 12 13 14
 #
 #
 
-grep 'sgx\.ko$\|intel_sgx\.ko$' /lib/modules/$(uname -r)/modules.builtin &> /dev/null
-if [[ $? != "0" ]]; then
-    /sbin/modinfo isgx &> /dev/null
-    if [[ $? != "0" ]]; then
-        /sbin/modinfo intel_sgx &> /dev/null
-        if [[ $? != "0" ]]; then
15
-            /sbin/lsmod 2> /dev/null | grep 'isgx\|intel_sgx'
kladko's avatar
kladko committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
-            if [[ $? = "0" ]]; then
-                echo "Warning: You did not follow the document to install the driver package."
-                echo
-            elif [[ ! -e /dev/isgx ]] && [[ ! -e /dev/sgx ]]; then
-                echo -e "\033[31;49;1mWarning: You may need to activate the SGX module if SGX is enabled in the kernel (e.g., sudo modprobe sgx) or download and install the SGX driver if the kernel doesn't have SGX support.\033[39;49;0m"
-                echo
-            fi
-        fi
-    fi
-fi
-
 set -e
 
 PKG_NAME="Intel SGX PSW Package"
 
-if test $(id -u) -ne 0; then
-    echo "Root privilege is required to install $PKG_NAME."
-    exit 4
-fi
-
36
 
kladko's avatar
kladko committed
37 38
 PKG_ARCH=@arch@
 ARCH=$(uname -m)
39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/linux/installer/common/psw/install.sh b/linux/installer/common/psw/install.sh
index 042f83c..3043ad1 100755
--- a/linux/installer/common/psw/install.sh
+++ b/linux/installer/common/psw/install.sh
@@ -106,7 +106,7 @@ else
         echo "Warning: No systemctl/initctl to start AESM. You may start AESM manually, e.g., /opt/intel/sgxpsw/aesm/aesm_service --no-daemon"
     else
         echo "Error: Unsupported platform - neither systemctl nor initctl is found."
-        exit 5
+        retval=0
     fi
 fi
51
 
52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/linux/installer/common/sgx-aesm-service/Makefile b/linux/installer/common/sgx-aesm-service/Makefile
index 89c5b21..2b4eb8f 100644
--- a/linux/installer/common/sgx-aesm-service/Makefile
+++ b/linux/installer/common/sgx-aesm-service/Makefile
@@ -48,7 +48,8 @@ AESMD_CONF_DEL=aesmd.conf
 AESMD_CONF_PATH=/lib/systemd/system
 $(warning "You may need to start aesmd manually after it's installed!")
 else
-$(error "Unsupported platform - neither systemctl nor initctl is found!")
+# $(error "Unsupported platform - neither systemctl nor initctl is found!")
+exit 0
 endif
64
 endif
65
 
66
 diff --git a/external/dcap_source/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile b/external/dcap_source/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
67 68 69 70 71 72 73 74 75 76 77 78
index 1f3efdb..07ede24 100644
--- a/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
+++ b/tools/SGXPlatformRegistration/package/installer/common/sgx-ra-service/Makefile
@@ -47,7 +47,8 @@ RAD_CONF_NAME=mpa_registration_tool.service
 RAD_CONF_DEL=mpa_registration.conf
 RAD_CONF_PATH=/lib/systemd/system
 else
-$(error "Unsupported platform - neither systemctl nor initctl is found!")
+# $(error "Unsupported platform - neither systemctl nor initctl is found!")
+exit 0
 endif
 endif