diff mbox series

[RFC,06/10] docker: fall-back to binfmt_misc debian-ppc64el-user-cross on non-x86

Message ID 20180718100505.7546-7-alex.bennee@linaro.org
State New
Headers show
Series docker on non-x86 hosts | expand

Commit Message

Alex Bennée July 18, 2018, 10:05 a.m. UTC
The Debian archives don't package their large array of cross compilers
for all host architectures. For ppc64el let's fall back to a linux-user
based image when we can't use the native ones.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/Makefile.include                    | 10 +++++++++-
 .../dockerfiles/debian-ppc64el-user-cross.docker | 16 ++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 tests/docker/dockerfiles/debian-ppc64el-user-cross.docker

-- 
2.17.1
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 5cfb1a57bb..879bacde93 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -161,8 +161,16 @@  docker-image-debian-mips64el-user-cross: docker-binfmt-image-debian-mips64el-use
 DOCKER_USER_IMAGES += debian-mips64el-user-cross
 DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
 
+# No ppc64el cross-compilers in non-x86 Debian images, so use linux-user
+docker-binfmt-image-debian-ppc64el-user: DEB_ARCH = ppc64el
+docker-binfmt-image-debian-ppc64el-user: DEB_TYPE = stretch
+docker-binfmt-image-debian-ppc64el-user: EXECUTABLE = ${BUILD_DIR}/ppc64le-linux-user/qemu-ppc64le
+docker-image-debian-ppc64el-user-cross: docker-binfmt-image-debian-ppc64el-user
+DOCKER_USER_IMAGES += debian-ppc64el-user-cross
+DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
+
 else
-DOCKER_PARTIAL_IMAGES += debian-mips64el-user-cross
+DOCKER_PARTIAL_IMAGES += debian-mips64el-user-cross debian-ppc64el-user-cross
 endif
 
 
diff --git a/tests/docker/dockerfiles/debian-ppc64el-user-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-user-cross.docker
new file mode 100644
index 0000000000..aeb207e9c2
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-ppc64el-user-cross.docker
@@ -0,0 +1,16 @@ 
+#
+# Docker ppc64el user cross-compiler target
+#
+# This is a binfmt image for when the ppc64el cross compilers are not
+# available in the host architecture archives. This image is based of
+# the debootstrapped qemu:debian-ppc64el-user but doesn't need any
+# extra magic once it is setup.
+#
+
+FROM qemu:debian-ppc64el-user
+
+MAINTAINER Alex Bennee <alex.bennee@linaro.org>
+
+RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu