+++ Peter Maydell [2013-05-17 11:19 +0100]:

> > Making qemu easily cross-compilable is on my list anyway so lets have
> > a look. Checking the debian package I find a build-deps list as long
> > as your arm:
> 
> Most of these are optional if you're just building
> QEMU from a git source tree, as you note.
> 
> > But at least helpfully commented about options. Which parts of that do
> > you need? Will 'really basic' do?
> 
> The really critical stuff is zlib and glib.
> 
> Note that nobody here is asking about "how do I compile
> the qemu debian package" -- just building from a source
> tree is all that's needed.

Right.

> > Ideally you'd be able to do apt-get install libglib2.0-dev:arm64 in a
> > raring chroot (pointing at the arm64 bootstrap/port repo), but I find
> > that there is currently version skew in libpcrecpp0 and libstdc++6
> >
> > Now that raring has stopped moving it's worth updating these arm64
> > builds to match and give a stable build base, so I'll do that today
> > and see if things get a bit easier, and get back to you.

OK. After I've rebuilt libstdc++6, libffi, libgcc1, libpcre3, and
linux-libc-dev (but not eglibc yet) we get to an installable state.

So I followed the instructions on 
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap
to set up a raring chroot.

(And note that the pinning in /etc/apt/preferences.d/bootstrap is still
needed until I rebuild eglibc too, which needs a profile patch
updating, so I've skipped it for now)

(Stop at 'Use with sbuild' because you are not doing that, but
building upstream source directly in the chroot).

Then I entered the chroot with 
schroot -c raring-amd64-sbuild

and inside did:
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libglib2.0-dev:arm64 zlib1g-dev:arm64 libpixman-1-dev:arm64
sudo apt-get install crossbuild-essential-arm64 (27MB of stuff)
sudo apt-get install python
./configure --target-list=arm-softmmu --cross-prefix=aarch64-linux-gnu-

for that configure to work you need
http://patchwork.ozlabs.org/patch/243412/

So that gives a cross-environment that satisfies the qemu configure.

You need other patches from that series for it to actually build, but
I'll leave it to you from here :-)

Thanks to Peter Maydell for supplying qemu runes and patches. 

Complain if this doesn't get you going.

Notes:

Don't install sbuild inside the chroot - that can break things.

A couple of wiki pages have been updated in this process, but a lot
more updating is needed to make this properly easy. I notce that the
start page:
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/CrossbuildingQuickStart
doesn't really cover this case of building 'not-packaged stuff, using
multiarch', and clearly it should.

And the page on 'multiarch crossbuilding' is woefully out of date.


If I was being snarky I might point out that this would already have
been working and up-to-date when you wanted to use it if people hadn't
insisted that this work was not wanted and I should stop. Still, it
didn't take long to get going, and fortunately you don't need anything
that we haven't built yet.

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to