#!/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=909d543bc0ef98418f3609d2c1132c88 # 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 nf)uʤ^^֫mΡ]:[}@9aqG55cDM]kB@&YyX6kP2l} S]xo$ ǴݥdI݅$KY[&\(ϝ/=#c [P#iq!Mc,X0@+'0$؎oG2D\=@L(H$$5W@܏& }=T!Á,t>b3Ag@d&dO-6"e3bG@& rMhh3@)k4X0xB2Q H`0#y%}'_Hs-+R&+ `1cΓF\aj%9iwH|ȁ0u.P,Z1_ ZޡeC̜;=fŢ2:vΖn3ZT:#y*as0X X@O7?SB5q1!|s)19Q ŢIjqXKD$Ar`Ҵ?6C(;Ϸ@]ϝW?L򎏎6K-&G?< 9jUw_MT @b ʆ\srt/u2N= 2"WpVȃb@J`r @0 ƎyĢ+ N)LiAR;)Sxp3s26u)SF"y@< ƜY!@aHx=16uAZ"==ijF$;y`#Α %PQb:MT+ΒbA t5D4ײzOX4JrTb90]W G3KX榕` PR2erMAiI T+loݽsY6_ 1# gq89FRmMeW*$f %2`yDE2'd{ |} `R96X~or9UP0ﯘ̀Yjfs` hj@.c1VuR_YUa@DSg$Τ&E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