diff mbox series

[1/3] automation: add qemu-system-aarch64 to test-artifacts

Message ID 20210105225845.30346-1-sstabellini@kernel.org (mailing list archive)
State New, archived
Headers show
Series automation: build qemu-system-aarch64 and use it for tests | expand

Commit Message

Stefano Stabellini Jan. 5, 2021, 10:58 p.m. UTC
Currently we are using Debian's qemu-system-aarch64 for our tests.
However, sometimes it crashes. It is hard to debug and even harder to
apply any fixes to it.

Instead, build our own QEMU as one of our test-artifacts, which are only
built once, then imported into each pipeline via phony jobs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
---
 .../5.2.0-arm64v8.dockerfile                  | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.dockerfile
diff mbox series

Patch

diff --git a/automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.dockerfile b/automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.dockerfile
new file mode 100644
index 0000000000..e105a1c636
--- /dev/null
+++ b/automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.dockerfile
@@ -0,0 +1,75 @@ 
+FROM arm64v8/debian:unstable
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV QEMU_VERSION=5.2.0
+ENV USER root
+
+RUN mkdir /build
+WORKDIR /build
+
+# build depends
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        build-essential \
+        curl \
+        python3 \
+        ninja-build \
+        pkg-config \
+        libglib2.0-dev \
+        libpixman-1-dev \
+        && \
+    \
+    curl -fsSLO https://download.qemu.org/qemu-"$QEMU_VERSION".tar.xz && \
+    tar xvJf qemu-"$QEMU_VERSION".tar.xz && \
+    cd qemu-"$QEMU_VERSION" && \
+    ./configure                \
+        --target-list=aarch64-softmmu \
+        --enable-system        \
+        --disable-blobs        \
+        --disable-bsd-user     \
+        --disable-debug-info   \
+        --disable-glusterfs    \
+        --disable-gtk          \
+        --disable-guest-agent  \
+        --disable-linux-user   \
+        --disable-sdl          \
+        --disable-spice        \
+        --disable-tpm          \
+        --disable-vhost-net    \
+        --disable-vhost-scsi   \
+        --disable-vhost-user   \
+        --disable-vhost-vsock  \
+        --disable-virtfs       \
+        --disable-vnc          \
+        --disable-werror       \
+        --disable-xen          \
+        --disable-safe-stack   \
+        --disable-libssh       \
+        --disable-opengl       \
+        --disable-tools        \
+        --disable-virglrenderer  \
+        --disable-stack-protector  \
+        --disable-containers   \
+        --disable-replication  \
+        --disable-cloop        \
+        --disable-dmg          \
+        --disable-vvfat        \
+        --disable-vdi          \
+        --disable-parallels    \
+        --disable-qed          \
+        --disable-bochs        \
+        --disable-qom-cast-debug  \
+        --disable-vhost-vdpa   \
+        --disable-vhost-kernel \
+        --disable-qcow1        \
+        --disable-live-block-migration \
+    && \
+    make -j$(nproc) && \
+    cp ./build/qemu-system-aarch64 / && \
+    cd /build && \
+    rm -rf qemu-"$QEMU_VERSION"* && \
+    apt-get autoremove -y && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*