diff options
Diffstat (limited to 'build.sh')
-rw-r--r-- | build.sh | 70 |
1 files changed, 30 insertions, 40 deletions
@@ -1,7 +1,6 @@ #!/bin/bash set -e - sudo apt -y update sudo apt-get -y install \ @@ -30,7 +29,8 @@ sudo apt-get -y install \ libssl-dev \ pandoc \ opensc \ - default-jdk + default-jdk \ + libgcrypt20-dev export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/ @@ -41,52 +41,42 @@ sh autogen.sh sudo make install cd .. -echo "Install tpm2-tss 1.2.0..." -git clone https://github.com/tpm2-software/tpm2-tss.git -cd tpm2-tss -git checkout 1.2.0 -./bootstrap -./configure --enable-unit -#cp ../implementation.h ./include/sapi/implementation.h -make -j$(nproc) check -sudo make install -sudo ldconfig -cd .. -rm -rf tpm2-tss +echo "Install tpm2-tss 2.0.0" +wget https://github.com/tpm2-software/tpm2-tss/releases/download/2.0.0/tpm2-tss-2.0.0.tar.gz +tar -xvf tpm2-tss-2.0.0.tar.gz +wget https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.0.0/tpm2-abrmd-2.0.0.tar.gz +tar -xvf tpm2-abrmd-2.0.0.tar.gz +wget https://github.com/tpm2-software/tpm2-tools/releases/download/3.1.0/tpm2-tools-3.1.0.tar.gz +tar -xvf tpm2-tools-3.1.0.tar.gz -echo "Install tpm2-abrmd 1.1.1..." -#sudo useradd --system --user-group tss -git clone https://github.com/tpm2-software/tpm2-abrmd.git -cd tpm2-abrmd -git checkout 1.1.1 -./bootstrap -./configure --with-dbuspolicydir=/etc/dbus-1/system.d --with-systemdsystemunitdir=/lib/systemd/system --with-systemdpresetdir=/lib/systemd/system-preset --with-udevrulesdir=/etc/udev/rules.d --datarootdir=/usr/share --enable-unit -make -j$(nproc) check +cd tpm2-tss-2.0.0 +./configure +make sudo make install -sudo ldconfig -sudo udevadm control --reload-rules && sudo udevadm trigger -sudo pkill -HUP dbus-daemon -sudo systemctl daemon-reload cd .. -rm -rf tpm2-abrmd +sudo cp tpm2-tss-2.0.0/src/util/tpm2b.h /usr/local/include/tss2/ +rm -rf tpm2-tss-2.0.0 -echo "Install tpm2-tools 2.1.1..." -git clone https://github.com/tpm2-software/tpm2-tools.git -cd tpm2-tools -git checkout 2.1.1 -./bootstrap -./configure --enable-unit -make -j$(nproc) check +cd tpm2-abrmd-2.0.0 +sudo useradd --system --user-group tss +./configure --with-dbuspolicydir=/etc/dbus-1/system.d \ + --with-udevrulesdir=/etc/udev/rules.d/ \ + --with-systemdsystemunitdir=/lib/systemd/system +make sudo make install -sudo ldconfig cd .. -rm -rf tpm2-tools +rm -rf tpm2-abrmd-2.0.0 -echo "Build TPM2_plugin..." -cd TPM2-Plugin -./bootstrap +cd tpm2-tools-3.1.0 ./configure make sudo make install -sudo ldconfig cd .. +rm -rf tpm2-tools-3.1.0 + +echo "Build Import utility tool" +cd tpm-util/import +make -f sampleMakefile +cd ../../ + +sudo ldconfig |