From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: fam@euphon.net, Thomas Huth <thuth@redhat.com>,
Beraldo Leal <bleal@redhat.com>,
sw@weilnetz.de, richard.henderson@linaro.org,
qemu-devel@nongnu.org,
Wainer dos Santos Moschetta <wainersm@redhat.com>,
f4bug@amsat.org, qemu-arm@nongnu.org, stefanha@redhat.com,
crosa@redhat.com, pbonzini@redhat.com, aurelien@aurel32.net
Subject: Re: [PATCH v2 04/18] tests/docker: update debian-arm64-cross with lci-tool
Date: Mon, 28 Feb 2022 09:28:28 +0000 [thread overview]
Message-ID: <YhyVvAv0M8WwiK2A@redhat.com> (raw)
In-Reply-To: <20220225172021.3493923-5-alex.bennee@linaro.org>
$SUBJECT =~ s/lci-tool/lcitool/
On Fri, Feb 25, 2022 at 05:20:07PM +0000, Alex Bennée wrote:
> Using lci-tool update debian-arm64-cross to a Debian 11 based system.
Likewise
> As a result we can drop debian-arm64-test-cross just for building
> tests.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20220211160309.335014-5-alex.bennee@linaro.org>
> ---
> .gitlab-ci.d/container-cross.yml | 10 +-
> tests/docker/Makefile.include | 3 -
> .../dockerfiles/debian-arm64-cross.docker | 186 +++++++++++++++---
> .../debian-arm64-test-cross.docker | 13 --
> tests/lcitool/refresh | 11 ++
> tests/tcg/configure.sh | 2 +-
> 6 files changed, 173 insertions(+), 52 deletions(-)
> delete mode 100644 tests/docker/dockerfiles/debian-arm64-test-cross.docker
>
> +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 \
...snip native packages...
> + 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
>
> -RUN apt update && \
> - DEBIAN_FRONTEND=noninteractive eatmydata \
> - apt install -y --no-install-recommends \
> - libbz2-dev:arm64 \
> - liblzo2-dev:arm64 \
> - librdmacm-dev:arm64 \
> - libsnappy-dev:arm64 \
> - libxen-dev:arm64
> +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"
>
> -# nettle
> -ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-nettle
> +RUN export DEBIAN_FRONTEND=noninteractive && \
> + dpkg --add-architecture arm64 && \
> + 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++-aarch64-linux-gnu \
...snip cross packages...
> + zlib1g-dev:arm64 && \
> + eatmydata apt-get autoremove -y && \
> + eatmydata apt-get autoclean -y && \
> + mkdir -p /usr/local/share/meson/cross && \
> + echo "[binaries]\n\
> +c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
> +ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
> +strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
> +pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
> +\n\
> +[host_machine]\n\
> +system = 'linux'\n\
> +cpu_family = 'aarch64'\n\
> +cpu = 'aarch64'\n\
> +endian = 'little'" > /usr/local/share/meson/cross/aarch64-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/aarch64-linux-gnu-c++ && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-g++ && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
> +
> +ENV ABI "aarch64-linux-gnu"
> +ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
> +ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
> +ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user
This cross dockerfile is a fully self-contained image.
Traditionally QEMU has had a split image for Debian cross targets,
where there is a base with common native packages, and then a
layer for the cross packages.
lcitool is capable of generating the image in this split format
using the arg
--layers {all,native,foreign}
Personally I think it is simpler to just use the fully self
contained image, as it would simplify our gitlab pipeline
to only need 1 build stage for containers. The cost is that
we'll not be sharing layers for native packages and more wall
clock time building since we're installing the same native
packages over & over.
I'm not saying to change your patch, I just wanted to point
out the possibility in case someone cares strongly about
keeping a split layer model for cross containers.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-02-28 9:33 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 17:20 [PATCH v2 00/18] testing and semihosting pre-PR Alex Bennée
2022-02-25 17:20 ` [PATCH v2 01/18] tests/docker: restore TESTS/IMAGES filtering Alex Bennée
2022-02-25 20:11 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 02/18] tests/docker: add NOUSER for alpine image Alex Bennée
2022-02-25 20:12 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 03/18] tests/lcitool: update to latest version Alex Bennée
2022-02-25 17:57 ` Peter Maydell
2022-02-28 16:44 ` Alex Bennée
2022-02-28 16:49 ` Peter Maydell
2022-02-25 17:20 ` [PATCH v2 04/18] tests/docker: update debian-arm64-cross with lci-tool Alex Bennée
2022-02-28 8:39 ` Thomas Huth
2022-02-28 9:20 ` Daniel P. Berrangé
2022-02-28 9:28 ` Daniel P. Berrangé [this message]
2022-02-28 14:39 ` Alex Bennée
2022-03-01 10:03 ` Daniel P. Berrangé
2022-02-25 17:20 ` [PATCH v2 05/18] tests/docker: update debian-s390x-cross with lcitool Alex Bennée
2022-02-25 20:15 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 06/18] tests/docker: introduce debian-riscv64-test-cross Alex Bennée
2022-02-25 17:20 ` [PATCH v2 07/18] scripts/ci: add build env rules for aarch32 on aarch64 Alex Bennée
2022-02-25 20:17 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 08/18] scripts/ci: allow for a secondary runner Alex Bennée
2022-02-25 20:18 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 09/18] gitlab: add a new aarch32 custom runner definition Alex Bennée
2022-02-25 20:25 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 10/18] tests/tcg/ppc64: clean-up handling of byte-reverse Alex Bennée
2022-02-25 20:26 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 11/18] tests/tcg: build sha1-vector with O3 and compare Alex Bennée
2022-02-25 17:20 ` [PATCH v2 12/18] tests/tcg: add sha512 test Alex Bennée
2022-02-25 17:20 ` [PATCH v2 13/18] tests/tcg: add vectorised sha512 versions Alex Bennée
2022-02-25 22:52 ` Richard Henderson
2022-02-28 13:58 ` Alex Bennée
2022-02-28 16:43 ` Alex Bennée
2022-02-28 20:56 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 14/18] travis.yml: Update the s390x jobs to Ubuntu Focal Alex Bennée
2022-02-25 20:27 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 15/18] gitlab: upgrade the job definition for s390x to 20.04 Alex Bennée
2022-02-25 20:28 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 16/18] tests/tcg: completely disable threadcount for sh4 Alex Bennée
2022-02-25 20:29 ` Richard Henderson
2022-02-25 17:20 ` [PATCH v2 17/18] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO Alex Bennée
2022-02-25 17:20 ` [PATCH v2 18/18] tests/tcg: port SYS_HEAPINFO to a system test Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhyVvAv0M8WwiK2A@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=pbonzini@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).