
The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, because when it comes to debug failures, the original container is often lost. This extends the manually written dockerfiles to also create the /packages.txt file. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20240724095505.33544-2-berrange@redhat.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240729144414.830369-2-alex.bennee@linaro.org>
55 lines
1.7 KiB
Docker
55 lines
1.7 KiB
Docker
#
|
|
# Docker cross-compiler target
|
|
#
|
|
# This docker target uses prebuilt toolchains for LoongArch64 from:
|
|
# https://github.com/loongson/build-tools/releases
|
|
#
|
|
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 export DEBIAN_FRONTEND=noninteractive && \
|
|
apt-get update && \
|
|
apt-get install -y eatmydata && \
|
|
eatmydata apt-get dist-upgrade -y && \
|
|
apt build-dep -yy qemu
|
|
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
bison \
|
|
ca-certificates \
|
|
ccache \
|
|
clang \
|
|
flex \
|
|
curl \
|
|
gettext \
|
|
git \
|
|
ninja-build \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-venv \
|
|
python3-wheel && \
|
|
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
|
|
|
|
RUN /usr/bin/pip3 install tomli
|
|
|
|
RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz \
|
|
| tar -xJC /opt
|
|
|
|
ENV PATH $PATH:/opt/cross-tools/bin
|
|
ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH
|
|
|
|
ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
|
|
ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch-softmmu
|
|
ENV MAKE /usr/bin/make
|
|
|
|
# As a final step configure the user (if env is defined)
|
|
ARG USER
|
|
ARG UID
|
|
RUN if [ "${USER}" ]; then \
|
|
id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
|