qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

docker: how to use it when developing on QEMU?


From: Philippe Mathieu-Daudé
Subject: docker: how to use it when developing on QEMU?
Date: Tue, 24 Sep 2019 17:25:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

Recently more developers are enthusiast to use Docker/Podman,
and have been confused by the different configurations currently in the
QEMU repository.

There are at least 3 kind of categories I use:

1/ Image used to build QEMU

These images should be restricted/updated to our "supported targets".
They are useful to (cross)build QEMU on variety of
host/target/distributions/distrib_versions.

Example:

- cross build Cris binary using the Fedora 30 toolchain on a Ubuntu
18.04 x86_64.
  host:Ubuntu18.04/x86_64 docker_image:fedora-cris-cross

- cross build MinGW64 binary using Debian 9 MXE toolchain on a Ubuntu
aarch64:
  host:Ubuntu18.04/x86_64 docker_image:debian-win64-cross

An image can not be meant to use on a daily basis, but to avoid
regression previous to release (I'd run them only on release candidate).

Example: building QEMU for the Gentoo PlayStation2 port:
https://www.mail-archive.com/address@hidden/msg574468.html

2/ Image used to build test program used by QEMU

These images provide enough to build binaries you can then use to test
QEMU. If you want to build more of these binaries, there is probably a
better way. Here we are only interested in testing.

Example:

- Test PowerPC Linux-user binaries with qemu-powerpc-linux-user
  docker_image:debian-powerpc-user-cross

- Build EDK2 payload for Virt/AArch64
  It currently doesn't build with Fedora 30 and I'v to use a Fedora 29
image.

Another case I had is when I tried to build a kernel for the Mipssim
machine (supported by QEMU). The Linux kernel code has been removed, so
I had to checkout an old kernel which is not buildable with my recent
host GCC. Using a docker based on a very old distribution worked. Anyway
Thomas Huth found it is easier to use buildroot for pre-3.6 kernels.

Similarly, I am testing QEMU port from Stefan Weil, and he shared a
working binary supporting the MIPS AR7 target. To be able to use this
QEMU I use Debian Lenny and set
DEB_URL=https://snapshot.debian.org/archive/debian/20091004T111800Z.
Yes, this will instanciate a Debian from 10 years ago.

3/ Bisecting

Another of my docker uses is when bisecting before QEMU v3. I use image
using snapshot slighly older than the QEMU release, so my bisect script
can run without worrying about the library API incompatibilities or
newer GCC warnings.

So not all image have the same use. While they might not be useful to
build the latest QEMU, there are still useful for day-to-day development.

Anyhow I agree we should document that better. Maybe the wiki is a good
starting point.

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]