1 # THIS FILE WAS AUTO-GENERATED
3 # $ lcitool dockerfile --layers all --cross-arch riscv64 debian-sid qemu-minimal
5 # https://gitlab.com/libvirt/libvirt-ci
7 FROM docker.io/library/debian:sid-slim
9 RUN export DEBIAN_FRONTEND=noninteractive && \
11 apt-get install -y eatmydata && \
12 eatmydata apt-get dist-upgrade -y && \
13 eatmydata apt-get install --no-install-recommends -y \
33 eatmydata apt-get autoremove -y && \
34 eatmydata apt-get autoclean -y && \
35 sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
36 dpkg-reconfigure locales && \
37 rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
39 ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
40 ENV LANG "en_US.UTF-8"
41 ENV MAKE "/usr/bin/make"
42 ENV NINJA "/usr/bin/ninja"
43 ENV PYTHON "/usr/bin/python3"
45 RUN export DEBIAN_FRONTEND=noninteractive && \
46 dpkg --add-architecture riscv64 && \
47 eatmydata apt-get install debian-ports-archive-keyring && \
48 eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ sid main' > /etc/apt/sources.list.d/ports.list && \
49 eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ unreleased main' >> /etc/apt/sources.list.d/ports.list && \
50 eatmydata apt-get update && \
51 eatmydata apt-get dist-upgrade -y && \
52 eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
53 eatmydata apt-get install --no-install-recommends -y \
54 gcc-riscv64-linux-gnu \
58 libglib2.0-dev:riscv64 \
59 libpixman-1-dev:riscv64 && \
60 eatmydata apt-get autoremove -y && \
61 eatmydata apt-get autoclean -y && \
62 mkdir -p /usr/local/share/meson/cross && \
64 c = '/usr/bin/riscv64-linux-gnu-gcc'\n\
65 ar = '/usr/bin/riscv64-linux-gnu-gcc-ar'\n\
66 strip = '/usr/bin/riscv64-linux-gnu-strip'\n\
67 pkgconfig = '/usr/bin/riscv64-linux-gnu-pkg-config'\n\
71 cpu_family = 'riscv64'\n\
73 endian = 'little'\n" > /usr/local/share/meson/cross/riscv64-linux-gnu && \
74 dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
75 mkdir -p /usr/libexec/ccache-wrappers && \
76 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-cc && \
77 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-gcc
79 ENV ABI "riscv64-linux-gnu"
80 ENV MESON_OPTS "--cross-file=riscv64-linux-gnu"
81 ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu-
82 ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user
83 # As a final step configure the user (if env is defined)
86 RUN if [ "${USER}" ]; then \
87 id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi