All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: bobby.prani@gmail.com, marcandre.lureau@redhat.com
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Fam Zheng" <famz@redhat.com>
Subject: [Qemu-devel] [RFC/POC PATCH 2/4] new tests/docker/dockerfiles/debian-multiarch-cross.docker
Date: Wed, 14 Dec 2016 17:12:42 +0000	[thread overview]
Message-ID: <20161214171244.26813-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20161214171244.26813-1-alex.bennee@linaro.org>

This provides a basic Debian install with access to the emdebian cross
compilers for armhf, arm64 and ppc64el. On its own it provides the
basic cross build essentials for building any of those architectures.
More complex cross-compilations would need to install library
dependencies on top of this image.

An example use:

  docker run --rm -it \
    -v /home/alex/lsrc/qemu/qemu.git/:/home/alex/lsrc/qemu/qemu.git/ \
    --user=alex:alex \
    -w /home/alex/lsrc/qemu/qemu.git/arm-linux-user/tests \
    -e CROSS_CC="arm-linux-gnueabihf-gcc" \
    debian:cross make -f ../../tests/tcg/arm/Makefile

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .../dockerfiles/debian-multiarch-cross.docker      | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-multiarch-cross.docker

diff --git a/tests/docker/dockerfiles/debian-multiarch-cross.docker b/tests/docker/dockerfiles/debian-multiarch-cross.docker
new file mode 100644
index 0000000000..dba66374c0
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-multiarch-cross.docker
@@ -0,0 +1,39 @@
+#
+# Docker multiarch cross-compiler target
+#
+# This docker target is builds on Debian and Emdebian's cross compiler targets
+# to build distro with a selection of cross compilers for building test binaries.
+#
+# This does not include the build dependancies for QEMU as there are
+# so many there are unresolvable clashes.
+#
+FROM debian:stable-slim
+
+# Do we want to tweak the user?
+ADD . /
+RUN if test -e /setup_user.sh; then /setup_user.sh; fi
+
+# Setup some basic tools we need
+RUN apt update
+RUN apt install -yy curl
+
+# Setup Emdebian
+RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources.list
+RUN curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
+
+# Duplicate deb line as deb-src
+RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
+
+# Add the foriegn architectures we want
+RUN dpkg --add-architecture armhf
+RUN dpkg --add-architecture arm64
+RUN dpkg --add-architecture ppc64el
+
+# Final update
+RUN apt update
+
+# Install the crossbuild essential packages
+RUN apt install -yy crossbuild-essential-arm64 crossbuild-essential-armhf crossbuild-essential-ppc64el
+
+# To install greater dependencies you do a
+# RUN apt-get build-dep -yy -a armhf qemu
-- 
2.11.0

  parent reply	other threads:[~2016-12-14 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 17:12 [Qemu-devel] [RFC/POC PATCH 0/4] Building TCG tests with emdebian cross compilers Alex Bennée
2016-12-14 17:12 ` [Qemu-devel] [RFC/POC PATCH 1/4] tests/docker: add basic user mapping support Alex Bennée
2016-12-14 17:12 ` Alex Bennée [this message]
2016-12-14 17:12 ` [Qemu-devel] [RFC/POC PATCH 3/4] tests/tcg: don't run tests by default Alex Bennée
2016-12-14 17:12 ` [Qemu-devel] [RFC/POC PATCH 4/4] tests/tcg/Makefile: use docker target for arm-tcg-tests Alex Bennée
2016-12-19 11:09 ` [Qemu-devel] [RFC/POC PATCH 0/4] Building TCG tests with emdebian cross compilers Marc-André Lureau
2017-01-09 11:57   ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161214171244.26813-3-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bobby.prani@gmail.com \
    --cc=famz@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.