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                      libpixman-1-dev:mipsel \
119                      libpng-dev:mipsel \
120                      libpulse-dev:mipsel \
121                      librbd-dev:mipsel \
122                      librdmacm-dev:mipsel \
123                      libsasl2-dev:mipsel \
124                      libsdl2-dev:mipsel \
125                      libsdl2-image-dev:mipsel \
126                      libseccomp-dev:mipsel \
127                      libselinux1-dev:mipsel \
128                      libslirp-dev:mipsel \
129                      libsnappy-dev:mipsel \
130                      libspice-server-dev:mipsel \
131                      libssh-gcrypt-dev:mipsel \
132                      libsystemd-dev:mipsel \
133                      libtasn1-6-dev:mipsel \
134                      libudev-dev:mipsel \
135                      liburing-dev:mipsel \
136                      libusb-1.0-0-dev:mipsel \
137                      libusbredirhost-dev:mipsel \
138                      libvdeplug-dev:mipsel \
139                      libvirglrenderer-dev:mipsel \
140                      libvte-2.91-dev:mipsel \
141                      libzstd-dev:mipsel \
142                      nettle-dev:mipsel \
143                      systemtap-sdt-dev:mipsel \
144                      xfslibs-dev:mipsel \
145                      zlib1g-dev:mipsel && \
146    eatmydata apt-get autoremove -y && \
147    eatmydata apt-get autoclean -y && \
148    mkdir -p /usr/local/share/meson/cross && \
149    printf "[binaries]\n\
150c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
151ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
152strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
153pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
154\n\
155[host_machine]\n\
156system = 'linux'\n\
157cpu_family = 'mips'\n\
158cpu = 'mipsel'\n\
159endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
160    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
161    mkdir -p /usr/libexec/ccache-wrappers && \
162    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-c++ && \
163    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
164    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-g++ && \
165    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-gcc
166
167ENV ABI "mipsel-linux-gnu"
168ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
169ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
170ENV DEF_TARGET_LIST mipsel-softmmu,mipsel-linux-user
171# As a final step configure the user (if env is defined)
172ARG USER
173ARG UID
174RUN if [ "${USER}" ]; then \
175  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
176