Testing and CI changes:

- reduce number of targets for cross_user_build
   - update avocado xlnx_versal test with new binaries
   - add explicit timeouts to a number of avocado TCG tests
   - reduce default timeout to 120s
   - update lcitool to support cross-amd64
   - flatten a number of docker cross containers
   - clean up stale qemu/debian10 dependencies
   - remove obsolete Fedora VM test
   - add configure workaround for meson --disable-pie bug
   - disable --static-pie for aarch64 gitlab runner
   - update aarch32/aarch64 jobs to 22.04
   - deprecate 32 bit big-endian MIPS as a host
   - remove FROM qemu/ support from docker.py
   - remove Debian base images now everything is flat
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmMp8Q8ACgkQ+9DbCVqe
 KkQmlwf/awT+jOmAW7TjlQnUTgHJ2hyOo7EViY/nmRkPOCT3ZG32pWFHBorHPX7s
 BeqZzpzCvhzaIfObnjIssx13C5QId5XjJGuTgMAnSsGhzTrp7VUJc1/bBfHcD9L2
 dJJduG+bfAkh95heBkry5EhFt2ZMui5yv9DjEH44hUUc9nwKtIQGts3H3fnVqzvv
 rzLZ7c2lhdLpAxHjmjSiiD8H59lJ+DpoziaobW4D7teGgecnyGVvJ9m1YH4Rc+kM
 gpLTOGMhADkQlysf5e5cvxXSJbP7YpXYrsr9X+DfEy5PMt2L3y4Yv0wiAz9ClYvm
 obD4wMQS5echYvb77qS1G8A0VMEPqA==
 =3oYu
 -----END PGP SIGNATURE-----

Merge tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu into staging

Testing and CI changes:

  - reduce number of targets for cross_user_build
  - update avocado xlnx_versal test with new binaries
  - add explicit timeouts to a number of avocado TCG tests
  - reduce default timeout to 120s
  - update lcitool to support cross-amd64
  - flatten a number of docker cross containers
  - clean up stale qemu/debian10 dependencies
  - remove obsolete Fedora VM test
  - add configure workaround for meson --disable-pie bug
  - disable --static-pie for aarch64 gitlab runner
  - update aarch32/aarch64 jobs to 22.04
  - deprecate 32 bit big-endian MIPS as a host
  - remove FROM qemu/ support from docker.py
  - remove Debian base images now everything is flat

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmMp8Q8ACgkQ+9DbCVqe
# KkQmlwf/awT+jOmAW7TjlQnUTgHJ2hyOo7EViY/nmRkPOCT3ZG32pWFHBorHPX7s
# BeqZzpzCvhzaIfObnjIssx13C5QId5XjJGuTgMAnSsGhzTrp7VUJc1/bBfHcD9L2
# dJJduG+bfAkh95heBkry5EhFt2ZMui5yv9DjEH44hUUc9nwKtIQGts3H3fnVqzvv
# rzLZ7c2lhdLpAxHjmjSiiD8H59lJ+DpoziaobW4D7teGgecnyGVvJ9m1YH4Rc+kM
# gpLTOGMhADkQlysf5e5cvxXSJbP7YpXYrsr9X+DfEy5PMt2L3y4Yv0wiAz9ClYvm
# obD4wMQS5echYvb77qS1G8A0VMEPqA==
# =3oYu
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 20 Sep 2022 12:57:51 EDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu: (30 commits)
  tests/docker: remove the Debian base images
  tests/docker: remove FROM qemu/ support from docker.py
  tests/docker: update and flatten debian-toolchain
  tests/docker: update and flatten debian-hexagon-cross
  tests/docker: update and flatten debian-loongarch-cross
  tests/docker: update and flatten debian-amd64-cross
  tests/lcitool: bump to latest version
  tests/docker: update and flatten debian-all-test-cross
  tests/docker: flatten debian-riscv64-test-cross
  Deprecate 32 bit big-endian MIPS
  gitlab-ci: update aarch32/aarch64 custom runner jobs
  gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64
  configure: explicitly set cflags for --disable-pie
  tests/vm: Remove obsolete Fedora VM test
  tests/docker: remove amd64 qemu/debian10 dependency
  tests/docker: remove tricore qemu/debian10 dependency
  tests/docker: flatten debian-powerpc-test-cross
  tests/docker: update and flatten debian-sparc64-cross
  tests/docker: update and flatten debian-sh4-cross
  tests/docker: update and flatten debian-mips64-cross
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2022-09-21 13:10:51 -04:00
commit 8f3aeb012f
43 changed files with 361 additions and 475 deletions

View file

@ -229,7 +229,7 @@ def exec_command_and_wait_for_pattern(test, command,
class QemuBaseTest(avocado.Test):
# default timeout for all tests, can be overridden
timeout = 900
timeout = 120
def _get_unique_tag_val(self, tag_name):
"""

View file

@ -63,6 +63,7 @@ class BootLinuxAarch64(LinuxTest):
:avocado: tags=machine:virt
:avocado: tags=machine:gic-version=2
"""
timeout = 240
def add_common_args(self):
self.vm.add_args('-bios',
@ -114,6 +115,8 @@ class BootLinuxPPC64(LinuxTest):
:avocado: tags=arch:ppc64
"""
timeout = 180
def test_pseries_tcg(self):
"""
:avocado: tags=machine:pseries
@ -129,6 +132,8 @@ class BootLinuxS390X(LinuxTest):
:avocado: tags=arch:s390x
"""
timeout = 240
@skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
def test_s390_ccw_virtio_tcg(self):
"""

View file

@ -335,13 +335,13 @@ class BootLinuxConsole(LinuxKernelTest):
"""
images_url = ('http://ports.ubuntu.com/ubuntu-ports/dists/'
'bionic-updates/main/installer-arm64/'
'20101020ubuntu543.15/images/')
'20101020ubuntu543.19/images/')
kernel_url = images_url + 'netboot/ubuntu-installer/arm64/linux'
kernel_hash = '5bfc54cf7ed8157d93f6e5b0241e727b6dc22c50'
kernel_hash = 'e167757620640eb26de0972f578741924abb3a82'
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
initrd_url = images_url + 'netboot/ubuntu-installer/arm64/initrd.gz'
initrd_hash = 'd385d3e88d53e2004c5d43cbe668b458a094f772'
initrd_hash = 'cab5cb3fcefca8408aa5aae57f24574bfce8bdb9'
initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
self.vm.set_console()

View file

@ -6,12 +6,14 @@
# later. See the COPYING file in the top-level directory.
import time
import os
from avocado_qemu import QemuSystemTest
from avocado_qemu import wait_for_console_pattern
from avocado_qemu import exec_command
from avocado_qemu import exec_command_and_wait_for_pattern
from avocado.utils import archive
from avocado import skipIf
class AST1030Machine(QemuSystemTest):
@ -176,6 +178,20 @@ class AST2x00Machine(QemuSystemTest):
self.do_test_arm_aspeed_buidroot_poweroff()
class AST2x00MachineSDK(QemuSystemTest):
# FIXME: Although these tests boot a whole distro they are still
# slower than comparable machine models. There may be some
# optimisations which bring down the runtime. In the meantime they
# have generous timeouts and are disable for CI which aims for all
# tests to run in less than 60 seconds.
timeout = 240
def wait_for_console_pattern(self, success_message, vm=None):
wait_for_console_pattern(self, success_message,
failure_message='Kernel panic - not syncing',
vm=vm)
def do_test_arm_aspeed_sdk_start(self, image, cpu_id):
self.vm.set_console()
self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
@ -187,6 +203,7 @@ class AST2x00Machine(QemuSystemTest):
self.wait_for_console_pattern('Starting kernel ...')
self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id)
@skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
def test_arm_ast2500_evb_sdk(self):
"""
:avocado: tags=arch:arm
@ -204,6 +221,7 @@ class AST2x00Machine(QemuSystemTest):
self.workdir + '/ast2500-default/image-bmc', '0x0')
self.wait_for_console_pattern('ast2500-default login:')
@skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
def test_arm_ast2600_evb_sdk(self):
"""
:avocado: tags=arch:arm

View file

@ -69,40 +69,24 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
{ echo "You will need to build $(EXECUTABLE)"; exit 1;},\
"CHECK", "debian-$* exists"))
# Enforce dependencies for composite images
# we don't run tests on intermediate images (used as base by another image)
DOCKER_PARTIAL_IMAGES := debian10 debian11
# Special case cross-compiling x86_64 on non-x86_64 systems.
ifeq ($(HOST_ARCH),x86_64)
docker-image-debian-amd64: docker-image-debian10
DOCKER_PARTIAL_IMAGES += debian-amd64-cross
else
docker-image-debian-amd64-cross: docker-image-debian10
DOCKER_PARTIAL_IMAGES += debian-amd64
endif
# For non-x86 hosts not all cross-compilers have been packaged
ifneq ($(HOST_ARCH),x86_64)
DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
DOCKER_PARTIAL_IMAGES += debian-mipsel-cross debian-mips64el-cross
DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
DOCKER_PARTIAL_IMAGES += debian-s390x-cross
DOCKER_PARTIAL_IMAGES += fedora
endif
docker-image-debian-alpha-cross: docker-image-debian10
docker-image-debian-hppa-cross: docker-image-debian10
docker-image-debian-m68k-cross: docker-image-debian10
docker-image-debian-mips-cross: docker-image-debian10
docker-image-debian-mips64-cross: docker-image-debian10
docker-image-debian-sh4-cross: docker-image-debian10
docker-image-debian-sparc64-cross: docker-image-debian10
# The native build should never use the registry
docker-image-debian-native: DOCKER_REGISTRY=
# base images should not add a local user
docker-image-debian10: NOUSER=1
docker-image-debian11: NOUSER=1
# alpine has no adduser
docker-image-alpine: NOUSER=1
@ -137,15 +121,6 @@ docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \
$(DOCKER_FILES_DIR)/debian-nios2-cross.d/build-toolchain.sh
$(call debian-toolchain, $@)
# Specialist build images, sometimes very limited tools
docker-image-debian-tricore-cross: docker-image-debian10
docker-image-debian-all-test-cross: docker-image-debian10
docker-image-debian-loongarch-cross: docker-image-debian11
docker-image-debian-microblaze-cross: docker-image-debian10
docker-image-debian-nios2-cross: docker-image-debian10
docker-image-debian-powerpc-test-cross: docker-image-debian11
docker-image-debian-riscv64-test-cross: docker-image-debian11
# These images may be good enough for building tests but not for test builds
DOCKER_PARTIAL_IMAGES += debian-alpha-cross
DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross
@ -153,6 +128,7 @@ DOCKER_PARTIAL_IMAGES += debian-hppa-cross
DOCKER_PARTIAL_IMAGES += debian-loongarch-cross
DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
DOCKER_PARTIAL_IMAGES += debian-mips-cross
DOCKER_PARTIAL_IMAGES += debian-nios2-cross
DOCKER_PARTIAL_IMAGES += debian-riscv64-test-cross
DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross

View file

@ -205,22 +205,17 @@ def _read_qemu_dockerfile(img_name):
return _read_dockerfile(df)
def _dockerfile_preprocess(df):
out = ""
def _dockerfile_verify_flat(df):
"Verify we do not include other qemu/ layers"
for l in df.splitlines():
if len(l.strip()) == 0 or l.startswith("#"):
continue
from_pref = "FROM qemu/"
if l.startswith(from_pref):
# TODO: Alternatively we could replace this line with "FROM $ID"
# where $ID is the image's hex id obtained with
# $ docker images $IMAGE --format="{{.Id}}"
# but unfortunately that's not supported by RHEL 7.
inlining = _read_qemu_dockerfile(l[len(from_pref):])
out += _dockerfile_preprocess(inlining)
continue
out += l + "\n"
return out
print("We no longer support multiple QEMU layers.")
print("Dockerfiles should be flat, ideally created by lcitool")
return False
return True
class Docker(object):
@ -309,23 +304,10 @@ class Docker(object):
if argv is None:
argv = []
# pre-calculate the docker checksum before any
# substitutions we make for caching
checksum = _text_checksum(_dockerfile_preprocess(dockerfile))
if not _dockerfile_verify_flat(dockerfile):
return -1
if registry is not None:
sources = re.findall("FROM qemu\/(.*)", dockerfile)
# Fetch any cache layers we can, may fail
for s in sources:
pull_args = ["pull", "%s/qemu/%s" % (registry, s)]
if self._do(pull_args, quiet=quiet) != 0:
registry = None
break
# Make substitutions
if registry is not None:
dockerfile = dockerfile.replace("FROM qemu/",
"FROM %s/qemu/" %
(registry))
checksum = _text_checksum(dockerfile)
tmp_df = tempfile.NamedTemporaryFile(mode="w+t",
encoding='utf-8',
@ -371,7 +353,7 @@ class Docker(object):
checksum = self.get_image_dockerfile_checksum(tag)
except Exception:
return False
return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
return checksum == _text_checksum(dockerfile)
def run(self, cmd, keep, quiet, as_user=False):
label = uuid.uuid4().hex

View file

@ -6,16 +6,24 @@
# basic compilers for as many targets as possible. We shall use this
# to build and run linux-user tests on GitLab
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
# What we need to build QEMU itself
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
# Duplicate deb line as deb-src
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
apt build-dep -yy qemu
# Add the foreign architecture we want and install dependencies
# Add extra build tools and as many cross compilers as we can for testing
RUN DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
ccache \
clang \
git \
ninja-build \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
gcc-alpha-linux-gnu \

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-alpha-linux-gnu \
libc6.1-dev-alpha-cross

View file

@ -1,22 +1,168 @@
# THIS FILE WAS AUTO-GENERATED
#
# Docker x86_64 cross target
# $ lcitool dockerfile --layers all --cross x86_64 debian-11 qemu
#
# This docker target is used on non-x86_64 machines which need the
# x86_64 cross compilers installed.
#
FROM qemu/debian10
MAINTAINER Alex Bennée <alex.bennee@linaro.org>
# https://gitlab.com/libvirt/libvirt-ci
# Add the foreign architecture we want and install dependencies
RUN dpkg --add-architecture amd64
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
crossbuild-essential-amd64
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt build-dep -yy -a amd64 --arch-only qemu
FROM docker.io/library/debian:11-slim
# Specify the cross prefix for this image (see tests/docker/common.rc)
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
bash \
bc \
bsdextrautils \
bzip2 \
ca-certificates \
ccache \
dbus \
debianutils \
diffutils \
exuberant-ctags \
findutils \
gcovr \
genisoimage \
gettext \
git \
hostname \
libpcre2-dev \
libspice-protocol-dev \
llvm \
locales \
make \
meson \
ncat \
ninja-build \
openssh-client \
perl-base \
pkgconf \
python3 \
python3-numpy \
python3-opencv \
python3-pillow \
python3-pip \
python3-sphinx \
python3-sphinx-rtd-theme \
python3-venv \
python3-yaml \
rpm2cpio \
sed \
sparse \
tar \
tesseract-ocr \
tesseract-ocr-eng \
texinfo && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture amd64 && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
g++-x86-64-linux-gnu \
gcc-x86-64-linux-gnu \
libaio-dev:amd64 \
libasan5:amd64 \
libasound2-dev:amd64 \
libattr1-dev:amd64 \
libbpf-dev:amd64 \
libbrlapi-dev:amd64 \
libbz2-dev:amd64 \
libc6-dev:amd64 \
libcacard-dev:amd64 \
libcap-ng-dev:amd64 \
libcapstone-dev:amd64 \
libcmocka-dev:amd64 \
libcurl4-gnutls-dev:amd64 \
libdaxctl-dev:amd64 \
libdrm-dev:amd64 \
libepoxy-dev:amd64 \
libfdt-dev:amd64 \
libffi-dev:amd64 \
libfuse3-dev:amd64 \
libgbm-dev:amd64 \
libgcrypt20-dev:amd64 \
libglib2.0-dev:amd64 \
libglusterfs-dev:amd64 \
libgnutls28-dev:amd64 \
libgtk-3-dev:amd64 \
libibumad-dev:amd64 \
libibverbs-dev:amd64 \
libiscsi-dev:amd64 \
libjemalloc-dev:amd64 \
libjpeg62-turbo-dev:amd64 \
libjson-c-dev:amd64 \
liblttng-ust-dev:amd64 \
liblzo2-dev:amd64 \
libncursesw5-dev:amd64 \
libnfs-dev:amd64 \
libnuma-dev:amd64 \
libpam0g-dev:amd64 \
libpixman-1-dev:amd64 \
libpmem-dev:amd64 \
libpng-dev:amd64 \
libpulse-dev:amd64 \
librbd-dev:amd64 \
librdmacm-dev:amd64 \
libsasl2-dev:amd64 \
libsdl2-dev:amd64 \
libsdl2-image-dev:amd64 \
libseccomp-dev:amd64 \
libselinux1-dev:amd64 \
libslirp-dev:amd64 \
libsnappy-dev:amd64 \
libspice-server-dev:amd64 \
libssh-gcrypt-dev:amd64 \
libsystemd-dev:amd64 \
libtasn1-6-dev:amd64 \
libubsan1:amd64 \
libudev-dev:amd64 \
liburing-dev:amd64 \
libusb-1.0-0-dev:amd64 \
libusbredirhost-dev:amd64 \
libvdeplug-dev:amd64 \
libvirglrenderer-dev:amd64 \
libvte-2.91-dev:amd64 \
libxen-dev:amd64 \
libzstd-dev:amd64 \
nettle-dev:amd64 \
systemtap-sdt-dev:amd64 \
xfslibs-dev:amd64 \
zlib1g-dev:amd64 && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
echo "[binaries]\n\
c = '/usr/bin/x86_64-linux-gnu-gcc'\n\
ar = '/usr/bin/x86_64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/x86_64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/x86_64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86_64'\n\
cpu = 'x86_64'\n\
endian = 'little'" > /usr/local/share/meson/cross/x86_64-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-linux-gnu-c++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-linux-gnu-g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-linux-gnu-gcc
ENV ABI "x86_64-linux-gnu"
ENV MESON_OPTS "--cross-file=x86_64-linux-gnu"
ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu-
ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user

View file

@ -2,12 +2,10 @@
# Docker Hexagon cross-compiler target
#
# This docker target is used for building hexagon tests. As it also
# needs to be able to build QEMU itself in CI we include it's
# build-deps. It is also a "stand-alone" image so as not to be
# triggered by re-builds on other base images given it takes a long
# time to build.
# needs to be able to build QEMU itself in CI we include its
# build-deps.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
# Install common build utilities
RUN apt update && \
@ -15,11 +13,18 @@ RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
bison \
ca-certificates \
clang \
cmake \
flex \
gcc \
lld \
make \
ninja-build \
python3 \
rsync \
wget
wget \
xz-utils
ENV TOOLCHAIN_INSTALL /usr/local
ENV ROOTFS /usr/local
@ -32,7 +37,7 @@ ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
RUN cd /root/hexagon-toolchain && ./build-toolchain.sh
FROM debian:buster-slim
FROM docker.io/library/debian:11-slim
# Duplicate deb line as deb-src
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
# Install QEMU build deps for use in CI

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-hppa-linux-gnu \
libc6-dev-hppa-cross

View file

@ -1,11 +1,13 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian11 base image,
# using a prebuilt toolchains for LoongArch64 from:
# This docker target uses prebuilt toolchains for LoongArch64 from:
# https://github.com/loongson/build-tools/releases
#
FROM qemu/debian11
FROM docker.io/library/debian:11-slim
# Duplicate deb line as deb-src
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-m68k-linux-gnu \
libc6-dev-m68k-cross

View file

@ -1,32 +1,14 @@
#
# Docker mips cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
# Add the foreign architecture we want and install dependencies
RUN dpkg --add-architecture mips
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
gcc-mips-linux-gnu
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt build-dep -yy -a mips --arch-only qemu
# Specify the cross prefix for this image (see tests/docker/common.rc)
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
ENV DEF_TARGET_LIST mips-softmmu,mipsel-linux-user
# Install extra libraries to increase code coverage
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
libbz2-dev:mips \
liblzo2-dev:mips \
librdmacm-dev:mips \
libsnappy-dev:mips
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mips-linux-gnu \
libc6-dev-mips-cross

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mips64-linux-gnuabi64 \
libc6-dev-mips64-cross

View file

@ -1,13 +1,15 @@
#
# Docker powerpc/ppc64/ppc64le cross-compiler target
#
# This docker target builds on the debian Bullseye base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian11
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-powerpc-linux-gnu \
libc6-dev-powerpc-cross \
gcc-10-powerpc64-linux-gnu \

View file

@ -3,10 +3,12 @@
#
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian11
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-riscv64-linux-gnu \
libc6-dev-riscv64-cross

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-sh4-linux-gnu \
libc6-dev-sh4-cross

View file

@ -1,12 +1,14 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian Buster base image.
# This docker target builds on the Debian Bullseye base image.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
gcc-sparc64-linux-gnu \
libc6-dev-sparc64-cross

View file

@ -4,7 +4,7 @@
# This dockerfile is used for building a cross-compiler toolchain.
# The script for building the toolchain is supplied via extra-files.
#
FROM qemu/debian10
FROM docker.io/library/debian:11-slim
# Install build utilities for building gcc and glibc.
# ??? The build-dep isn't working, missing a number of
@ -15,6 +15,7 @@ RUN apt update && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
bison \
ca-certificates \
flex \
gawk \
libmpc-dev \
@ -32,5 +33,5 @@ RUN cd /root && ./build-toolchain.sh
# Throw away the extra toolchain build deps, the downloaded source,
# and the build trees by restoring the original debian10 image,
# then copying the built toolchain from stage 0.
FROM qemu/debian10
FROM docker.io/library/debian:bullseye-slim
COPY --from=0 /usr/local /usr/local

View file

@ -1,38 +0,0 @@
#
# Docker multiarch cross-compiler target
#
# This docker target is builds on Debian cross compiler targets to build distro
# with a selection of cross compilers for building test binaries.
#
# On its own you can't build much but the docker-foo-cross targets
# build on top of the base debian image.
#
FROM docker.io/library/debian:buster-slim
# Duplicate deb line as deb-src
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
# Install common build utilities
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
bc \
build-essential \
ca-certificates \
ccache \
clang \
dbus \
gdb-multiarch \
gettext \
git \
libffi-dev \
libncurses5-dev \
ninja-build \
pkg-config \
psmisc \
python3 \
python3-sphinx \
python3-sphinx-rtd-theme \
python3-venv \
$(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2)

View file

@ -1,18 +0,0 @@
#
# Docker multiarch cross-compiler target
#
# This docker target uses the current development version of Debian as
# a base for cross compilers for building test binaries. We won't
# attempt to build QEMU on it yet given it is still in development.
#
# On its own you can't build much but the docker-foo-cross targets
# build on top of the base debian image.
#
FROM docker.io/library/debian:bullseye-slim
# Duplicate deb line as deb-src
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
# Install common build utilities
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata

View file

@ -66,6 +66,7 @@ RUN zypper update -y && \
librbd-devel \
libseccomp-devel \
libselinux-devel \
libslirp-devel \
libspice-server-devel \
libssh-devel \
libtasn1-devel \
@ -127,7 +128,7 @@ RUN zypper update -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
RUN pip3 install meson==0.56.0
RUN /usr/bin/pip3 install meson==0.56.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"

View file

@ -137,7 +137,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
RUN pip3 install meson==0.56.0
RUN /usr/bin/pip3 install meson==0.56.0
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"

@ -1 +1 @@
Subproject commit 324355cf62e86fb551408575afb123bac989ac37
Subproject commit e3712b79122180fdb3b7a7ea8cbee47ece253f97

View file

@ -119,6 +119,13 @@ try:
#
# Cross compiling builds
#
generate_dockerfile("debian-amd64-cross", "debian-11",
cross="x86_64",
trailer=debian_cross_build("x86_64-linux-gnu-",
"x86_64-softmmu,"
"x86_64-linux-user,"
"i386-softmmu,i386-linux-user"))
generate_dockerfile("debian-arm64-cross", "debian-11",
cross="aarch64",
trailer=debian_cross_build("aarch64-linux-gnu-",

View file

@ -15,7 +15,7 @@ endif
EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
X86_IMAGES := freebsd netbsd openbsd fedora haiku.x86_64
X86_IMAGES := freebsd netbsd openbsd haiku.x86_64
ifneq ($(GENISOIMAGE),)
X86_IMAGES += centos
ifneq ($(EFI_AARCH64),)
@ -45,7 +45,6 @@ vm-help vm-test:
@echo " vm-build-freebsd - Build QEMU in FreeBSD VM"
@echo " vm-build-netbsd - Build QEMU in NetBSD VM"
@echo " vm-build-openbsd - Build QEMU in OpenBSD VM"
@echo " vm-build-fedora - Build QEMU in Fedora VM"
ifneq ($(GENISOIMAGE),)
@echo " vm-build-centos - Build QEMU in CentOS VM, with Docker"
ifneq ($(EFI_AARCH64),)

View file

@ -1,190 +0,0 @@
#!/usr/bin/env python3
#
# Fedora VM image
#
# Copyright 2019 Red Hat Inc.
#
# Authors:
# Gerd Hoffmann <kraxel@redhat.com>
#
# This code is licensed under the GPL version 2 or later. See
# the COPYING file in the top-level directory.
#
import os
import re
import sys
import time
import socket
import subprocess
import basevm
class FedoraVM(basevm.BaseVM):
name = "fedora"
arch = "x86_64"
base = "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/"
link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso"
repo = base + "Server/x86_64/os/"
full = base + "Everything/x86_64/os/"
csum = "5e4eac4566d8c572bfb3bcf54b7d6c82006ec3c6c882a2c9235c6d3494d7b100"
size = "20G"
pkgs = [
# tools
'git-core',
'gcc', 'binutils', 'make', 'ninja-build',
# perl
'perl',
# libs: usb
'"pkgconfig(libusb-1.0)"',
'"pkgconfig(libusbredirparser-0.5)"',
# libs: crypto
'"pkgconfig(gnutls)"',
# libs: ui
'"pkgconfig(sdl2)"',
'"pkgconfig(gtk+-3.0)"',
'"pkgconfig(ncursesw)"',
# libs: audio
'"pkgconfig(libpulse)"',
'"pkgconfig(alsa)"',
# libs: migration
'"pkgconfig(libzstd)"',
]
BUILD_SCRIPT = """
set -e;
rm -rf /home/qemu/qemu-test.*
cd $(mktemp -d /home/qemu/qemu-test.XXXXXX);
mkdir src build; cd src;
tar -xf /dev/vdb;
cd ../build
../src/configure --python=python3 {configure_opts};
gmake --output-sync -j{jobs} {target} {verbose};
"""
def build_image(self, img):
self.print_step("Downloading install iso")
cimg = self._download_with_cache(self.link, sha256sum=self.csum)
img_tmp = img + ".tmp"
iso = img + ".install.iso"
self.print_step("Preparing iso and disk image")
subprocess.check_call(["cp", "-f", cimg, iso])
self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)
self.print_step("Booting installer")
self.boot(img_tmp, extra_args = [
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso
])
self.console_init(300)
self.console_wait("installation process.")
time.sleep(0.3)
self.console_send("\t")
time.sleep(0.3)
self.console_send(" console=ttyS0")
proxy = os.environ.get("http_proxy")
if not proxy is None:
self.console_send(" proxy=%s" % proxy)
self.console_send(" inst.proxy=%s" % proxy)
self.console_send(" inst.repo=%s" % self.repo)
self.console_send("\n")
self.console_wait_send("2) Use text mode", "2\n")
self.console_wait_send("5) [!] Installation Dest", "5\n")
self.console_wait_send("1) [x]", "c\n")
self.console_wait_send("2) [ ] Use All Space", "2\n")
self.console_wait_send("2) [x] Use All Space", "c\n")
self.console_wait_send("1) [ ] Standard Part", "1\n")
self.console_wait_send("1) [x] Standard Part", "c\n")
self.console_wait_send("7) [!] Root password", "7\n")
self.console_wait("Password:")
self.console_send("%s\n" % self._config["root_pass"])
self.console_wait("Password (confirm):")
self.console_send("%s\n" % self._config["root_pass"])
self.console_wait_send("8) [ ] User creation", "8\n")
self.console_wait_send("1) [ ] Create user", "1\n")
self.console_wait_send("3) User name", "3\n")
self.console_wait_send("ENTER:", "%s\n" % self._config["guest_user"])
self.console_wait_send("4) [ ] Use password", "4\n")
self.console_wait_send("5) Password", "5\n")
self.console_wait("Password:")
self.console_send("%s\n" % self._config["guest_pass"])
self.console_wait("Password (confirm):")
self.console_send("%s\n" % self._config["guest_pass"])
self.console_wait_send("7) Groups", "c\n")
while True:
good = self.console_wait("3) [x] Installation",
"3) [!] Installation")
self.console_send("r\n")
if good:
break
time.sleep(10)
while True:
good = self.console_wait("4) [x] Software",
"4) [!] Software")
self.console_send("r\n")
if good:
break
time.sleep(10)
self.console_send("r\n" % self._config["guest_pass"])
self.console_wait_send("'b' to begin install", "b\n")
self.print_step("Installation started now, this will take a while")
self.console_wait_send("Installation complete", "\n")
self.print_step("Installation finished, rebooting")
# setup qemu user
prompt = " ~]$"
self.console_ssh_init(prompt, self._config["guest_user"],
self._config["guest_pass"])
self.console_wait_send(prompt, "exit\n")
# setup root user
prompt = " ~]#"
self.console_ssh_init(prompt, "root", self._config["root_pass"])
self.console_sshd_config(prompt)
# setup virtio-blk #1 (tarfile)
self.console_wait(prompt)
self.console_send("echo 'KERNEL==\"vdb\" MODE=\"666\"' >> %s\n" %
"/etc/udev/rules.d/99-qemu.rules")
self.print_step("Configuration finished, rebooting")
self.console_wait_send(prompt, "reboot\n")
self.console_wait("login:")
self.wait_ssh()
self.print_step("Installing packages")
self.ssh_root_check("rm -vf /etc/yum.repos.d/fedora*.repo\n")
self.ssh_root_check("echo '[fedora]' >> /etc/yum.repos.d/qemu.repo\n")
self.ssh_root_check("echo 'baseurl=%s' >> /etc/yum.repos.d/qemu.repo\n" % self.full)
self.ssh_root_check("echo 'gpgcheck=0' >> /etc/yum.repos.d/qemu.repo\n")
self.ssh_root_check("dnf install -y %s\n" % " ".join(self.pkgs))
# shutdown
self.ssh_root(self.poweroff)
self.console_wait("sleep state S5")
self.wait()
if os.path.exists(img):
os.remove(img)
os.rename(img_tmp, img)
os.remove(iso)
self.print_step("All done")
if __name__ == "__main__":
sys.exit(basevm.main(FedoraVM))