Skip to content

Commit 1788874

Browse files
committed
tests/docker: add a debian-native image and make available
This image is intended for building whatever the native versions of QEMU are for the host architecture. This will hopefully be an aid for 3rd parties who want to be able to build QEMU themselves without redoing all the dependencies themselves. We disable the registry because we currently don't have multi-arch support there. Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Anders Roxell <[email protected]> Acked-by: Willian Rampazzo <[email protected]> Message-Id: <[email protected]>
1 parent 9b89cdb commit 1788874

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

tests/docker/Makefile.include

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ docker-image-debian-s390x-cross: docker-image-debian10
145145
docker-image-debian-sh4-cross: docker-image-debian10
146146
docker-image-debian-sparc64-cross: docker-image-debian10
147147

148+
# The native build should never use the registry
149+
docker-image-debian-native: DOCKER_REGISTRY=
150+
151+
148152
#
149153
# The build rule for hexagon-cross is special in so far for most of
150154
# the time we don't want to build it. While dockers caching does avoid

tests/docker/common.rc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
# the top-level directory.
1313

1414
# This might be set by ENV of a docker container... it is always
15-
# overriden by TARGET_LIST if the user sets it.
16-
DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"}
15+
# overriden by TARGET_LIST if the user sets it. We special case
16+
# "none" to allow for other options like --disable-tcg to restrict the
17+
# builds we eventually do.
18+
if test "$DEF_TARGET_LIST" = "none"; then
19+
DEF_TARGET_LIST=""
20+
else
21+
DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"}
22+
fi
1723

1824
requires_binary()
1925
{
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Docker Debian Native
3+
#
4+
# This this intended to build QEMU on native host systems. Debian is
5+
# chosen due to the broadest range on supported host systems for QEMU.
6+
#
7+
# This docker target is based on the docker.io Debian Bullseye base
8+
# image rather than QEMU's base because we would otherwise confuse the
9+
# build grabbing stuff from the registry built for other
10+
# architectures.
11+
#
12+
FROM docker.io/library/debian:bullseye-slim
13+
MAINTAINER Alex Bennée <[email protected]>
14+
15+
# Duplicate deb line as deb-src
16+
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
17+
18+
# Install common build utilities
19+
RUN apt update && \
20+
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
21+
22+
RUN apt update && \
23+
DEBIAN_FRONTEND=noninteractive eatmydata \
24+
apt build-dep -yy --arch-only qemu
25+
26+
RUN apt update && \
27+
DEBIAN_FRONTEND=noninteractive eatmydata \
28+
apt install -y --no-install-recommends \
29+
cscope \
30+
genisoimage \
31+
exuberant-ctags \
32+
global \
33+
libbz2-dev \
34+
liblzo2-dev \
35+
libgcrypt20-dev \
36+
libfdt-dev \
37+
librdmacm-dev \
38+
libsasl2-dev \
39+
libsnappy-dev \
40+
libvte-dev \
41+
netcat-openbsd \
42+
ninja-build \
43+
openssh-client \
44+
python3-numpy \
45+
python3-opencv \
46+
python3-venv
47+
48+
ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS
49+
ENV DEF_TARGET_LIST "none"

0 commit comments

Comments
 (0)