aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt2021-11-09 19:51:20 +0100
committerTom Rini2021-11-14 10:30:48 -0500
commit8a87d1ae95853b2febd2e2631ddeef856c029b5c (patch)
tree9dd0cbff9146b12d66be9c8c17892f4d0009af46
parente035ce4b3ba116016385e8d93ef448c710810286 (diff)
Dockerfile: build swtpm
For testing the TPM drivers and the EFI_TCG2_PROTOCOL we need the tool swtpm. Once we move to Ubuntu Impish we can take libtpms from package libtpms-dev. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--tools/docker/Dockerfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 1a44423d77b..79b7e1d0fbd 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -48,11 +48,14 @@ RUN apt-get update && apt-get install -y \
dosfstools \
e2fsprogs \
efitools \
+ expect \
fakeroot \
flex \
+ gawk \
gdisk \
git \
gnu-efi \
+ gnutls-dev \
graphviz \
grub-efi-amd64-bin \
grub-efi-ia32-bin \
@@ -62,13 +65,16 @@ RUN apt-get update && apt-get install -y \
iputils-ping \
libconfuse-dev \
libgit2-dev \
+ libjson-glib-dev \
libguestfs-tools \
liblz4-tool \
libpixman-1-dev \
libpython3-dev \
libsdl1.2-dev \
libsdl2-dev \
+ libseccomp-dev \
libssl-dev \
+ libtool \
libudev-dev \
libusb-1.0-0-dev \
linux-image-kvm \
@@ -77,6 +83,7 @@ RUN apt-get update && apt-get install -y \
mount \
mtd-utils \
mtools \
+ net-tools \
ninja-build \
openssl \
picocom \
@@ -92,6 +99,8 @@ RUN apt-get update && apt-get install -y \
rpm2cpio \
sbsigntool \
sloccount \
+ socat \
+ softhsm2 \
sparse \
srecord \
sudo \
@@ -186,6 +195,25 @@ RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/geni
make install && \
rm -rf /tmp/genimage-14
+# Build libtpms
+RUN git clone https://github.com/stefanberger/libtpms /tmp/libtpms && \
+ cd /tmp/libtpms && \
+ ./autogen.sh && \
+ ./configure && \
+ make -j$(nproc) && \
+ make install && \
+ ldconfig && \
+ rm -rf /tmp/libtpms
+
+# Build swtpm
+RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \
+ cd /tmp/swtpm && \
+ ./autogen.sh && \
+ ./configure && \
+ make -j$(nproc) && \
+ make install && \
+ rm -rf /tmp/swtpm
+
# Create our user/group
RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
RUN useradd -m -U uboot