Philippe Mathieu-Daudé <f4...@amsat.org> writes:
> On 9/14/21 8:58 PM, Richard Henderson wrote: >> From: Alex Bennée <alex.ben...@linaro.org> >> >> To be able to cross build QEMU itself we need to include a few more >> libraries. These are only available in Debian's unstable ports repo >> for now so we need to base the riscv64 image on sid with the the >> minimal libs needed to build QEMU (glib/pixman). >> >> The result works but is not as clean as using build-dep to bring in >> more dependencies. However sid is by definition a shifting pile of >> sand and by keeping the list of libs minimal we reduce the chance of >> having an image we can't build. It's good enough for a basic cross >> build testing of TCG. >> <snip> >> diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker >> b/tests/docker/dockerfiles/debian-riscv64-cross.docker >> index 2bbff19772..594d97982c 100644 >> --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker >> +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker >> @@ -1,12 +1,48 @@ >> # >> -# Docker cross-compiler target >> +# Docker cross-compiler target for riscv64 >> # >> -# This docker target builds on the debian Buster base image. >> +# Currently the only distro that gets close to cross compiling riscv64 >> +# images is Debian Sid (with unofficial ports). As this is a moving >> +# target we keep the library list minimal and are aiming to migrate >> +# from this hack as soon as we are able. >> # >> -FROM qemu/debian10 >> +FROM docker.io/library/debian:sid-slim >> + >> +# Add ports >> +RUN apt update && \ >> + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ >> + DEBIAN_FRONTEND=noninteractive eatmydata apt update -yy && \ >> + DEBIAN_FRONTEND=noninteractive eatmydata apt upgrade -yy >> + >> +# Install common build utilities >> +RUN DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \ >> + bc \ >> + build-essential \ >> + ca-certificates \ >> + debian-ports-archive-keyring \ >> + dpkg-dev \ >> + gettext \ >> + git \ >> + ninja-build \ >> + pkg-config \ >> + python3 > > Alex, why not using a debian-sid intermediate image? Well we removed the original debian-sid image a while ago having excised images that used it. Basing things on sid does cause problems given it's such a moving feast. Rather than encouraging others to build sid based images we decided it made more sense to make this a pure standalone image which we can migrate away from at the first opportunity. -- Alex Bennée