]> Git Repo - J-u-boot.git/blobdiff - tools/docker/Dockerfile
Dockerfile: build swtpm
[J-u-boot.git] / tools / docker / Dockerfile
index 0195456dfeca9d656ab26b24630b6c4b72a195e0..79b7e1d0fbddf7f9af56a55a7285110bfe64b326 100644 (file)
@@ -2,7 +2,7 @@
 # This Dockerfile is used to build an image containing basic stuff to be used
 # to build U-Boot and run our test suites.
 
-FROM ubuntu:focal-20210723
+FROM ubuntu:focal-20210921
 MAINTAINER Tom Rini <[email protected]>
 LABEL Description=" This image is for building U-Boot inside a container"
 
@@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive
 # Add LLVM repository
 RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/*
 RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main | tee /etc/apt/sources.list.d/llvm.list
+RUN echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main | tee /etc/apt/sources.list.d/llvm.list
 
 # Manually install the kernel.org "Crosstool" based toolchains for gcc-11.1.0
 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
@@ -39,7 +39,7 @@ RUN apt-get update && apt-get install -y \
        binutils-dev \
        bison \
        build-essential \
-       clang-12 \
+       clang-13 \
        coreutils \
        cpio \
        cppcheck \
@@ -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 \
@@ -60,14 +63,18 @@ RUN apt-get update && apt-get install -y \
        iasl \
        imagemagick \
        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 \
@@ -76,6 +83,8 @@ RUN apt-get update && apt-get install -y \
        mount \
        mtd-utils \
        mtools \
+       net-tools \
+       ninja-build \
        openssl \
        picocom \
        parted \
@@ -90,6 +99,8 @@ RUN apt-get update && apt-get install -y \
        rpm2cpio \
        sbsigntool \
        sloccount \
+       socat \
+       softhsm2 \
        sparse \
        srecord \
        sudo \
@@ -166,11 +177,43 @@ RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
 RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \
        cd /tmp/qemu && \
        git submodule update --init dtc && \
-       git checkout v4.2.0 && \
+       git checkout v6.1.0 && \
+       # config user.name and user.email to make 'git am' happy
+       git config user.name u-boot && \
+       git config user.email [email protected] && \
+       # manually apply the bug fix for QEMU 6.1.0 Xilinx Zynq UART emulation codes
+       wget -O - http://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/mbox/ | git am && \
        ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \
        make -j$(nproc) all install && \
        rm -rf /tmp/qemu
 
+# Build genimage (required by some targets to generate disk images)
+RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \
+       cd /tmp/genimage-14 && \
+       ./configure && \
+       make -j$(nproc) && \
+       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
This page took 0.027482 seconds and 4 git commands to generate.