From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCPmU-0002KF-3F for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:11:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCPmQ-000752-0w for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:11:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCPmP-00074s-Ri for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:11:41 -0400 Date: Mon, 13 Jun 2016 19:11:35 +0800 From: Fam Zheng Message-ID: <20160613111135.GA15373@ad.usersys.redhat.com> References: <20160612081633.GO27167@ad.usersys.redhat.com> <87lh29789w.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87lh29789w.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable 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: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: qemu-devel@nongnu.org, riku.voipio@linaro.org On Mon, 06/13 10:22, Alex Benn=E9e wrote: >=20 > Fam Zheng writes: >=20 > > On Wed, 06/08 17:35, Alex Benn=E9e 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=3Darmhf DEB_TYPE=3Dtesting \ > >> ./tests/docker/docker.py build qemu:debian-bootstrap \ > >> ./tests/docker/dockerfiles/debian-bootstrap.docker \ > >> --include-executable=3D./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 redire= ctor > > doesn't work. Eventually I get this error once the pre script succeed= s 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 =3D 2 desc =3D "oci runtime error: exec format error" > > > > IIUC the sed is an armhf binary? Is something missing in the docker f= ile? I > > cannot find where the copied qemu-arm is used... >=20 > 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 :-/ A question related to this: I assume if we add a debian image it has ever= ything to initialize the debootstrap? Then is it possible to convert everything = in the pre script into Dockerfile RUN directives? That way it's more self-contai= ned, and can benefit from the docker checksum trick provided in docker.py. Not that I don't like the pre script in any way (actually I am imagining = using a pre script to bootstrap an osx cross build image). Fam