diff mbox series

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

Message ID 20180718100505.7546-6-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 MIPS 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                    | 11 +++++++++++
 .../debian-mips64el-user-cross.docker            | 16 ++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-mips64el-user-cross.docker

-- 
2.17.1
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 2cb180ff6c..5cfb1a57bb 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -153,8 +153,19 @@  ifeq ($(ARCH),aarch64)
 DOCKER_PARTIAL_IMAGES += debian-arm64-cross
 endif
 
+# No MIPS cross-compilers in non-x86 Debian images, so use linux-user
+docker-binfmt-image-debian-mips64el-user: DEB_ARCH = mips64el
+docker-binfmt-image-debian-mips64el-user: DEB_TYPE = stretch
+docker-binfmt-image-debian-mips64el-user: EXECUTABLE = ${BUILD_DIR}/mips64el-linux-user/qemu-mips64el
+docker-image-debian-mips64el-user-cross: docker-binfmt-image-debian-mips64el-user
+DOCKER_USER_IMAGES += debian-mips64el-user-cross
+DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
+
+else
+DOCKER_PARTIAL_IMAGES += debian-mips64el-user-cross
 endif
 
+
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \
 	$(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \
diff --git a/tests/docker/dockerfiles/debian-mips64el-user-cross.docker b/tests/docker/dockerfiles/debian-mips64el-user-cross.docker
new file mode 100644
index 0000000000..98284bc635
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-mips64el-user-cross.docker
@@ -0,0 +1,16 @@ 
+#
+# Docker mips64el user cross-compiler target
+#
+# This is a binfmt image for when the MIPS cross compilers are not
+# available in the host architecture archives. This image is based of
+# the debootstrapped qemu:debian-mips64el-user but doesn't need any
+# extra magic once it is setup.
+#
+
+FROM qemu:debian-mips64el-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