From patchwork Wed Dec 14 17:12:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 88051 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp314407qgi; Wed, 14 Dec 2016 09:28:31 -0800 (PST) X-Received: by 10.55.104.3 with SMTP id d3mr34472985qkc.243.1481736511562; Wed, 14 Dec 2016 09:28:31 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id d129si30418457qke.110.2016.12.14.09.28.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 14 Dec 2016 09:28:31 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHDLx-00065F-46 for patch@linaro.org; Wed, 14 Dec 2016 12:28:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHD7t-00060d-SA for qemu-devel@nongnu.org; Wed, 14 Dec 2016 12:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHD7p-0001yu-Pl for qemu-devel@nongnu.org; Wed, 14 Dec 2016 12:13:57 -0500 Received: from mail-wj0-f173.google.com ([209.85.210.173]:33531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHD7p-0001yk-Is for qemu-devel@nongnu.org; Wed, 14 Dec 2016 12:13:53 -0500 Received: by mail-wj0-f173.google.com with SMTP id xy5so42545731wjc.0 for ; Wed, 14 Dec 2016 09:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZmAz+5h/XENAxLXZ+Iz7VXuPEsFg4BbLHZazQSeVmFI=; b=VRGf06gYdx2Yd+9I4fQdR5EMVH0ykp6+QTPYvnAggDdgIFAP9TBi+J7Fgc2l6BwaH9 woo08oAwHGk2n4LV1taBEQtl3SIfHO5nHLXltSYBeJloVd/++y9EN+u8ZsRvpDwe5sRR XwWy/XQnN8T11+O7sdRpVMsrwbeEbC93jNpnw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZmAz+5h/XENAxLXZ+Iz7VXuPEsFg4BbLHZazQSeVmFI=; b=HgBnH8i+Fq4CN6r/94CprZ/flLkoSD/eF9QR7T3WN7l6PqfV8NzwME+gygJBeCOlgd ao3JyVOyytB07cpEyH8UI9HlTF0nc11UOtvgrpv9rRQvoJVrs+E/qWODQx8qpVHGk8Vi NXqP4FUEV95SUvXca8uagdrVSFJcgFXJWtUVaZ84vtCJgZCvyFSdqkb/81X9dKY0Zyyb IJedlirUr+LopBNz0ocopgR6nqlr/KnWcbBsNHlHmQACUZfKhICHLo9bwA9Ad68/pjPg OCBWLMQqiE+A6Kq+l3Yr/8729796v2mE+XEUsu9XuZc5xOxpwMj2whGqlJjsWfSc+9VT dmZw== X-Gm-Message-State: AKaTC01GwOTgR+drNQy32Tf0sbRGmFemEkWwoJxg4AbuHwZ5FtHg0QNcZ8zfKjR2TsUk5KmU X-Received: by 10.194.21.35 with SMTP id s3mr89116193wje.192.1481735572405; Wed, 14 Dec 2016 09:12:52 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d10sm68025304wja.20.2016.12.14.09.12.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 09:12:50 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 87E683E07A5; Wed, 14 Dec 2016 17:12:48 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: bobby.prani@gmail.com, marcandre.lureau@redhat.com Date: Wed, 14 Dec 2016 17:12:42 +0000 Message-Id: <20161214171244.26813-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161214171244.26813-1-alex.bennee@linaro.org> References: <20161214171244.26813-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.210.173 Subject: [Qemu-devel] [RFC/POC PATCH 2/4] new tests/docker/dockerfiles/debian-multiarch-cross.docker X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- .../dockerfiles/debian-multiarch-cross.docker | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-multiarch-cross.docker -- 2.11.0 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