[Qemu-devel] [PATCH] tests/docker: add debian-buster-arm64-cross

Alex Bennée posted 1 patch 2 weeks ago
Test asan passed
Test docker-mingw@fedora passed
Test checkpatch passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190207153651.19271-1-alex.bennee@linaro.org
tests/docker/Makefile.include                 |  1 +
.../debian-buster-arm64-cross.docker          | 15 +++++++++
tests/docker/dockerfiles/debian10.docker      | 31 +++++++++++++++++++
tests/tcg/aarch64/Makefile.include            |  2 +-
4 files changed, 48 insertions(+), 1 deletion(-)
create mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
create mode 100644 tests/docker/dockerfiles/debian10.docker

[Qemu-devel] [PATCH] tests/docker: add debian-buster-arm64-cross

Posted by Alex Bennée 2 weeks ago
We can't build QEMU with this but we can use this image to build newer
arm64 testcases which need more up to date toolchains to build.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                 |  1 +
 .../debian-buster-arm64-cross.docker          | 15 +++++++++
 tests/docker/dockerfiles/debian10.docker      | 31 +++++++++++++++++++
 tests/tcg/aarch64/Makefile.include            |  2 +-
 4 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian10.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 7032c68895..83d43c50e4 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -90,6 +90,7 @@ docker-image-debian-amd64: docker-image-debian9
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
+docker-image-debian-buster-arm64-cross: docker-image-debian10
 docker-image-debian-mips-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-mips64el-cross: docker-image-debian9
diff --git a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker b/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
new file mode 100644
index 0000000000..33ada13806
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
@@ -0,0 +1,15 @@
+#
+# Docker arm64 cross-compiler target
+#
+# This docker target builds on the Debian's Buster base image. There
+# are no QEMU pre-requistes so this image can only be used to build
+# test cases.
+#
+FROM qemu:debian10
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture arm64
+RUN apt update
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        crossbuild-essential-arm64
diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/dockerfiles/debian10.docker
new file mode 100644
index 0000000000..aeeb151b52
--- /dev/null
+++ b/tests/docker/dockerfiles/debian10.docker
@@ -0,0 +1,31 @@
+#
+# Docker multiarch cross-compiler target
+#
+# This docker target is builds on Debian cross compiler targets to build distro
+# with a selection of cross compilers for building test binaries.
+#
+# On its own you can't build much but the docker-foo-cross targets
+# build on top of the base debian image.
+#
+FROM debian:buster-slim
+
+# Duplicate deb line as deb-src
+RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
+
+# Install common build utilities
+RUN apt update
+RUN DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt install -y --no-install-recommends \
+        bison \
+        build-essential \
+        ca-certificates \
+        clang \
+        flex \
+        gettext \
+        git \
+        pkg-config \
+        psmisc \
+        python \
+        texinfo \
+        $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
diff --git a/tests/tcg/aarch64/Makefile.include b/tests/tcg/aarch64/Makefile.include
index de32c91235..5d4e4c6f99 100644
--- a/tests/tcg/aarch64/Makefile.include
+++ b/tests/tcg/aarch64/Makefile.include
@@ -3,6 +3,6 @@
 # We don't have any bigendian build tools so we only use this for AArch64
 
 ifeq ($(TARGET_NAME),aarch64)
-DOCKER_IMAGE=debian-arm64-cross
+DOCKER_IMAGE=debian-buster-arm64-cross
 DOCKER_CROSS_COMPILER=aarch64-linux-gnu-gcc
 endif
-- 
2.20.1