From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCO4a-0005Cs-9p for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:22:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCO4V-00068g-0w for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:22:19 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:38048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCO4U-00068C-JY for qemu-devel@nongnu.org; Mon, 13 Jun 2016 05:22:14 -0400 Received: by mail-wm0-x22b.google.com with SMTP id m124so70387642wme.1 for ; Mon, 13 Jun 2016 02:22:14 -0700 (PDT) From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <20160612081633.GO27167@ad.usersys.redhat.com> Date: Mon, 13 Jun 2016 10:22:35 +0100 Message-ID: <87lh29789w.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 0/3] Support building qemu-user powered docker test images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, riku.voipio@linaro.org Fam Zheng writes: > On Wed, 06/08 17:35, Alex Bennée wrote: >> Hi, >> >> This is a re-spin of the previous series built on top of >> fam/docker.next. I've made the changes suggested in the last review >> and split the first patch apart to separate (and fix) the build >> directory changes first. >> >> Now it no longer messes with the docker file you can actually >> cross-build tests. First ensure you build the debian-bootstrap image: >> >> DEB_ARCH=armhf DEB_TYPE=testing \ >> ./tests/docker/docker.py build qemu:debian-bootstrap \ >> ./tests/docker/dockerfiles/debian-bootstrap.docker \ >> --include-executable=./arm-linux-user/qemu-arm > > This can take long depending on the network - I had to explicitly use a close > mirror in the pre script to test this, not sure why the mirror redirector > doesn't work. Eventually I get this error once the pre script succeeds and > docker build starts: > > Sending build context to Docker daemon 235.1 MB > Step 1 : FROM scratch > ---> > Step 2 : ADD . / > ---> 807bfa810b0c > Removing intermediate container e57ded00b227 > Step 3 : RUN sed -i 's/in_target mount/echo not for docker in_target mount/g' /debootstrap/functions > ---> Running in fd80232b38fc > rpc error: code = 2 desc = "oci runtime error: exec format error" > > IIUC the sed is an armhf binary? Is something missing in the docker file? I > cannot find where the copied qemu-arm is used... Ahh I realise I missed out the implicit binfmt_misc needs to be set up. So on my Ubuntu system just having qemu-user installed means the host system binfmt_misc is set up for armhf binaries to run /usr/bin/qemu-arm. I haven't experimented with explicitly setting up binfmt_misc in the container because it was already working :-/ > > Fam > >> >> And then run the test quick target: >> >> make docker-test-quick@debian-bootstrap J=9 V=1 >> >> I'll leave it up to you how we cleanly integrate multi-arch builds >> into the Make system ;-) >> >> Alex Bennée (3): >> tests/docker/docker.py: docker_dir outside build >> tests/docker/docker.py: support --include-executable >> add debian-bootstrap.docker target (and pre script) >> >> tests/docker/docker.py | 68 +++++++++++++++++++++--- >> tests/docker/dockerfiles/debian-bootstrap.docker | 21 ++++++++ >> tests/docker/dockerfiles/debian-bootstrap.pre | 5 ++ >> 3 files changed, 86 insertions(+), 8 deletions(-) >> create mode 100644 tests/docker/dockerfiles/debian-bootstrap.docker >> create mode 100755 tests/docker/dockerfiles/debian-bootstrap.pre >> >> -- >> 2.7.4 >> -- Alex Bennée