1# THIS FILE WAS AUTO-GENERATED
2#
3#  $ lcitool dockerfile --layers all --cross mipsel debian-11 qemu
4#
5# https://gitlab.com/libvirt/libvirt-ci
6
7FROM docker.io/library/debian:11-slim
8
9RUN export DEBIAN_FRONTEND=noninteractive && \
10    apt-get update && \
11    apt-get install -y eatmydata && \
12    eatmydata apt-get dist-upgrade -y && \
13    eatmydata apt-get install --no-install-recommends -y \
14                      bash \
15                      bc \
16                      bison \
17                      bsdextrautils \
18                      bzip2 \
19                      ca-certificates \
20                      ccache \
21                      dbus \
22                      debianutils \
23                      diffutils \
24                      exuberant-ctags \
25                      findutils \
26                      flex \
27                      gcc \
28                      gcovr \
29                      gettext \
30                      git \
31                      hostname \
32                      libglib2.0-dev \
33                      libpcre2-dev \
34                      libsndio-dev \
35                      libspice-protocol-dev \
36                      llvm \
37                      locales \
38                      make \
39                      meson \
40                      mtools \
41                      ncat \
42                      ninja-build \
43                      openssh-client \
44                      pkgconf \
45                      python3 \
46                      python3-numpy \
47                      python3-opencv \
48                      python3-pillow \
49                      python3-pip \
50                      python3-sphinx \
51                      python3-sphinx-rtd-theme \
52                      python3-venv \
53                      python3-yaml \
54                      rpm2cpio \
55                      sed \
56                      socat \
57                      sparse \
58                      tar \
59                      tesseract-ocr \
60                      tesseract-ocr-eng \
61                      xorriso \
62                      zstd && \
63    eatmydata apt-get autoremove -y && \
64    eatmydata apt-get autoclean -y && \
65    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
66    dpkg-reconfigure locales
67
68ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
69ENV LANG "en_US.UTF-8"
70ENV MAKE "/usr/bin/make"
71ENV NINJA "/usr/bin/ninja"
72ENV PYTHON "/usr/bin/python3"
73
74RUN export DEBIAN_FRONTEND=noninteractive && \
75    dpkg --add-architecture mipsel && \
76    eatmydata apt-get update && \
77    eatmydata apt-get dist-upgrade -y && \
78    eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
79    eatmydata apt-get install --no-install-recommends -y \
80                      g++-mipsel-linux-gnu \
81                      gcc-mipsel-linux-gnu \
82                      libaio-dev:mipsel \
83                      libasound2-dev:mipsel \
84                      libattr1-dev:mipsel \
85                      libbpf-dev:mipsel \
86                      libbrlapi-dev:mipsel \
87                      libbz2-dev:mipsel \
88                      libc6-dev:mipsel \
89                      libcacard-dev:mipsel \
90                      libcap-ng-dev:mipsel \
91                      libcapstone-dev:mipsel \
92                      libcmocka-dev:mipsel \
93                      libcurl4-gnutls-dev:mipsel \
94                      libdaxctl-dev:mipsel \
95                      libdrm-dev:mipsel \
96                      libepoxy-dev:mipsel \
97                      libfdt-dev:mipsel \
98                      libffi-dev:mipsel \
99                      libfuse3-dev:mipsel \
100                      libgbm-dev:mipsel \
101                      libgcrypt20-dev:mipsel \
102                      libglib2.0-dev:mipsel \
103                      libglusterfs-dev:mipsel \
104                      libgnutls28-dev:mipsel \
105                      libgtk-3-dev:mipsel \
106                      libibumad-dev:mipsel \
107                      libibverbs-dev:mipsel \
108                      libiscsi-dev:mipsel \
109                      libjemalloc-dev:mipsel \
110                      libjpeg62-turbo-dev:mipsel \
111                      libjson-c-dev:mipsel \
112                      liblttng-ust-dev:mipsel \
113                      liblzo2-dev:mipsel \
114                      libncursesw5-dev:mipsel \
115                      libnfs-dev:mipsel \
116                      libnuma-dev:mipsel \
117                      libpam0g-dev:mipsel \
118                      libpipewire-0.3-dev:mipsel \
119                      libpixman-1-dev:mipsel \
120                      libpng-dev:mipsel \
121                      libpulse-dev:mipsel \
122                      librbd-dev:mipsel \
123                      librdmacm-dev:mipsel \
124                      libsasl2-dev:mipsel \
125                      libsdl2-dev:mipsel \
126                      libsdl2-image-dev:mipsel \
127                      libseccomp-dev:mipsel \
128                      libselinux1-dev:mipsel \
129                      libslirp-dev:mipsel \
130                      libsnappy-dev:mipsel \
131                      libspice-server-dev:mipsel \
132                      libssh-gcrypt-dev:mipsel \
133                      libsystemd-dev:mipsel \
134                      libtasn1-6-dev:mipsel \
135                      libudev-dev:mipsel \
136                      liburing-dev:mipsel \
137                      libusb-1.0-0-dev:mipsel \
138                      libusbredirhost-dev:mipsel \
139                      libvdeplug-dev:mipsel \
140                      libvirglrenderer-dev:mipsel \
141                      libvte-2.91-dev:mipsel \
142                      libzstd-dev:mipsel \
143                      nettle-dev:mipsel \
144                      systemtap-sdt-dev:mipsel \
145                      xfslibs-dev:mipsel \
146                      zlib1g-dev:mipsel && \
147    eatmydata apt-get autoremove -y && \
148    eatmydata apt-get autoclean -y && \
149    mkdir -p /usr/local/share/meson/cross && \
150    printf "[binaries]\n\
151c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
152ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
153strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
154pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
155\n\
156[host_machine]\n\
157system = 'linux'\n\
158cpu_family = 'mips'\n\
159cpu = 'mipsel'\n\
160endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
161    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
162    mkdir -p /usr/libexec/ccache-wrappers && \
163    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-c++ && \
164    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
165    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-g++ && \
166    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-gcc
167
168ENV ABI "mipsel-linux-gnu"
169ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
170ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
171ENV DEF_TARGET_LIST mipsel-softmmu,mipsel-linux-user
172# As a final step configure the user (if env is defined)
173ARG USER
174ARG UID
175RUN if [ "${USER}" ]; then \
176  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
177