mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00

Although riscv64 isn't going to be a release architecture for trixie the packages are still built while it is testing. Moving from sid will also avoid some of the volatility we get from tracking the bleeding edge. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250108121054.1126164-26-alex.bennee@linaro.org>
87 lines
3.4 KiB
Docker
87 lines
3.4 KiB
Docker
# THIS FILE WAS AUTO-GENERATED
|
|
#
|
|
# $ lcitool dockerfile --layers all --cross-arch riscv64 debian-13 qemu-minimal
|
|
#
|
|
# https://gitlab.com/libvirt/libvirt-ci
|
|
|
|
FROM docker.io/library/debian:trixie-slim
|
|
|
|
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 \
|
|
bison \
|
|
ca-certificates \
|
|
ccache \
|
|
findutils \
|
|
flex \
|
|
gcc \
|
|
git \
|
|
libglib2.0-dev \
|
|
locales \
|
|
make \
|
|
meson \
|
|
ninja-build \
|
|
pkgconf \
|
|
python3 \
|
|
python3-venv \
|
|
sed \
|
|
tar && \
|
|
eatmydata apt-get autoremove -y && \
|
|
eatmydata apt-get autoclean -y && \
|
|
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
|
|
dpkg-reconfigure locales && \
|
|
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
|
|
|
|
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
|
ENV LANG "en_US.UTF-8"
|
|
ENV MAKE "/usr/bin/make"
|
|
ENV NINJA "/usr/bin/ninja"
|
|
ENV PYTHON "/usr/bin/python3"
|
|
|
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
|
dpkg --add-architecture riscv64 && \
|
|
eatmydata apt-get install debian-ports-archive-keyring && \
|
|
eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ sid main' > /etc/apt/sources.list.d/ports.list && \
|
|
eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ unreleased main' >> /etc/apt/sources.list.d/ports.list && \
|
|
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 \
|
|
gcc-riscv64-linux-gnu \
|
|
libc6-dev:riscv64 \
|
|
libfdt-dev:riscv64 \
|
|
libffi-dev:riscv64 \
|
|
libglib2.0-dev:riscv64 \
|
|
libpixman-1-dev:riscv64 && \
|
|
eatmydata apt-get autoremove -y && \
|
|
eatmydata apt-get autoclean -y && \
|
|
mkdir -p /usr/local/share/meson/cross && \
|
|
printf "[binaries]\n\
|
|
c = '/usr/bin/riscv64-linux-gnu-gcc'\n\
|
|
ar = '/usr/bin/riscv64-linux-gnu-gcc-ar'\n\
|
|
strip = '/usr/bin/riscv64-linux-gnu-strip'\n\
|
|
pkgconfig = '/usr/bin/riscv64-linux-gnu-pkg-config'\n\
|
|
\n\
|
|
[host_machine]\n\
|
|
system = 'linux'\n\
|
|
cpu_family = 'riscv64'\n\
|
|
cpu = 'riscv64'\n\
|
|
endian = 'little'\n" > /usr/local/share/meson/cross/riscv64-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/riscv64-linux-gnu-cc && \
|
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-gcc
|
|
|
|
ENV ABI "riscv64-linux-gnu"
|
|
ENV MESON_OPTS "--cross-file=riscv64-linux-gnu"
|
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu-
|
|
ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user
|
|
# 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
|