Created
May 10, 2020 10:49
-
-
Save deknos/6fb358a8f794a3a2cb5ac8fbb2b16e26 to your computer and use it in GitHub Desktop.
Provisioning the ibm simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SIMULATOR_TARGZ="ibmtpm1563.tar.gz" | |
export DEBIAN_FRONTEND=noninteractive | |
apt update | |
apt-get install -y lcov pandoc autoconf-archive liburiparser-dev libdbus-1-dev libglib2.0-dev dbus-x11 aptitude \ | |
dpkg-dev devscripts build-essential git-buildpackage vim autoconf automake libtool pkg-config gcc \ | |
libssl-dev libcurl4-gnutls-dev uuid-dev python-yaml libjson-c-dev doxygen docbook-xsl libgcrypt20-dev libgpg-error-dev libxslt1.1 sgml-base xml-core xsltproc | |
# some parts i always install for convienience with git-buildpackage i have for example tools i use often | |
CUR_DIR="$(pwd)" | |
# install tpm2-tss | |
git clone https://github.com/tpm2-software/tpm2-tss.git | |
cd tpm2-tss | |
./bootstrap | |
./configure --prefix=/usr | |
make -j5 | |
make install | |
cd "${CUR_DIR}" | |
# install tpm2-abrmd | |
git clone https://github.com/tpm2-software/tpm2-abrmd.git | |
cd tpm2-abrmd | |
./bootstrap | |
./configure --with-dbuspolicydir=/etc/dbus-1/system.d --with-udevrulesdir=/usr/lib/udev/rules.d --with-systemdsystemunitdir=/usr/lib/systemd/system \ | |
--libdir=/usr/lib64 --prefix=/usr | |
make -j5 | |
make install | |
cd "${CUR_DIR}" | |
# install tpm2-tools | |
git clone https://github.com/tpm2-software/tpm2-tools.git | |
cd tpm2-tools | |
./bootstrap | |
./configure --prefix=/usr | |
make -j5 | |
make install | |
cd "${CUR_DIR}" | |
# installing simulator | |
mkdir tpm-ibmsimulator && cd tpm-ibmsimulator | |
wget https://sourceforge.net/projects/ibmswtpm2/files/latest/download -O tpmibmsimulator.tar.gz | |
tar -zxvf tpmibmsimulator.tar.gz | |
cd src | |
make -j5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- modexport DEBIAN_FRONTEND=noninteractivee: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "debian/contrib-buster64" | |
config.vm.provision "shell", path: "provision.sh" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment