-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-engine.sh
49 lines (39 loc) · 1.17 KB
/
setup-engine.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
echo "*** Setup TPM2 TSS Engine ***"
if [ ! -d "/home/pi/tssSetup" ]; then
mkdir /home/pi/tssSetup
fi
echo "Installing the packages required to build the TSS Engine"
sudo apt -y install \
build-essential \
autoconf \automake \
m4 \
libtool \
gcc \
pkg-config \
libssl-dev \
ruby-ronn \
pandoc \
expect
echo "Changing the installation directory and downloading the TSS Engine source code"
cd /home/pi/tssSetup
# git clone -b v1.1.x https://github.com/tpm2-software/tpm2-tss-engine.git
git clone https://github.com/tpm2-software/tpm2-tss-engine
echo "Change to the source code directory and bootstrap the TSS Engine"
cd tpm2-tss-engine
./bootstrap
echo "Configuring the TSS Engine"
./configure
echo "Building and installing the TSS Engine"
make -j4
sudo make install
sudo ldconfig
cd /home/pi/tssSetup
echo "Post-installation steps for the TSS Engine"
sudo ldconfig
echo "Configuration file 'tpm2-tss-engine.conf'"
read -p "Press [Enter] key after file updated..."
echo "Export command with exemplary path"
export OPENSSL_CONF=/home/pi/tssSetup/tpm2-tss-engine/tpm2-tss-engine.conf
echo "Sanity-Tests"
openssl engine -t -c tpm2tss