#!/usr/bin/env bash # # Copyright (C) 2011-2021 Intel Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # * Neither the name of Intel Corporation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # set -e PKG_NAME="Intel SGX Driver" if test $(id -u) -ne 0; then echo "Root privilege is required to install $PKG_NAME." exit 4 fi PATH=/usr/bin:/bin umask 022 DRIVERPKG=`mktemp -t sgx-driver-pkg.XXXXXX` DRIVER_TEMP_FOLDER=`mktemp -d sgx-driver-XXXXXX -p /tmp` trap "rm -fr $DRIVERPKG $DRIVER_TEMP_FOLDER 2>/dev/null; /bin/sed -i '/^isgx$/d' /etc/modules; exit 3" HUP INT QUIT TERM EXIT # The number of lines in this script (plus 1). Using this number to # calculate the start address of the payload. NR_SCRIPT_LINES=93 # Run /usr/bin/md5sum on the binary payload to get the MD5 check sum. CHKSUM=46a4d4fee7189e87e14c3632fd1bec21 # Get the install payload from this shell script. echo -n "Unpacking $PKG_NAME ..." tail -n +$NR_SCRIPT_LINES "$0" > $DRIVERPKG echo " done." echo -n "Verifying the integrity of the install package ..." if test $(md5sum $DRIVERPKG | awk '{print $1}') != $CHKSUM; then echo " The install package appears to be corrupted." exit 1 fi echo " done." echo "Installing $PKG_NAME ..." tar zxf $DRIVERPKG -C $DRIVER_TEMP_FOLDER >/dev/null 2>&1 retcode=$? # Save the return code # Clean-up the temporary tarball. rm -f $DRIVERPKG 2>/dev/null if test $retcode -ne 0; then echo " failed." exit 2 fi pushd $DRIVER_TEMP_FOLDER source scripts/installConfig make install popd ${SGX_PACKAGES_PATH}/${DRIVER_PKG_NAME}/scripts/install.sh rm -fr ${DRIVER_TEMP_FOLDER} trap - EXIT exit 0 Rnqѩ5? W8bp5k͟jqlk^k?$*V{tkn}RIZW5">Ct\ݷs@=RkjLjdDM(l9+נebٺ@*eHiM-U!Kɒ ILouP@3;_,{F 6-+F!)u-}Œg LbZl4"E2f LH q=L(0jJfS…h`)tsx&X@#esC< `Q/e(s=GrW꒳)`q$_\rJ#]h#lF `k+0vua8 FDd@G*KJNoܕ(H|%*l@28'WҨs 3'ٌ#&H;^{DpHJזPWru_!"L:g= 'cvQ{  8j>VcNm_/ғt# q(3Eձ*$HrGRNIo0 I6Ɗ̤'Ui4Uy/A:@gw}dٌ4}D( }ek(\G`F$rJEO ZV2MV@fS)c8 (CE'Js Aa\gKXlcOCˆ9w{j͊Ee0u$-7KݸgtFPU`l(6lo~.u%E):K8HkbvC̩!cRbr4SENF1Uܑ&I J-i=mP>&wo;/L򎏎6xV'r# _`x_Wkzu~6S%,%{+*sə=u8 j{[ȜVfx\!ÅF?D[!Ίs)Y9C|q$; 3z:d2eJ8L Wԥ4JOInD~b@'sVȊ,g"\i W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