blob: 36cabfe78bc8acd61351247f2d3322e5ca86c8f5 [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001FROM anibali/djgpp:6.1.0
2
3USER root
4RUN \
5 userdel appuser && \
6 useradd -p locked -m mani && \
7 zypper -q install -y tar make git ccache
8
Nico Huberfb433ba2023-03-04 19:09:47 +00009RUN mkdir -p -m 1777 /ccache
10
Nico Huberc0b52db2022-12-15 12:42:32 +000011ENV GIT_SSL_NO_VERIFY=1
12USER mani
13
14ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
15RUN cd && \
16 mkdir .ccache && chown mani:users .ccache && \
17 git clone ${ORIGIN} flashrom && \
18 git clone https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git && \
19 cd pciutils && \
20 git checkout v3.5.6 && \
21 curl --insecure https://flashrom.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \
22 make ZLIB=no DNS=no HOST=i386-djgpp-djgpp \
23 CROSS_COMPILE=i586-pc-msdosdjgpp- \
24 PREFIX=/ DESTDIR=$PWD/../ \
25 STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" \
26 install install-lib && \
27 cd ../ && \
28 curl --insecure https://flashrom.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \
29 cd libgetopt && \
30 make && cp libgetopt.a ../lib/ && cp getopt.h ../include/
31
Nico Huberfb433ba2023-03-04 19:09:47 +000032ARG IDENT=mani
33ARG CCACHE_MAX=32M
34RUN \
35 ccache --set-config cache_dir=/ccache/${IDENT} && \
36 ccache --set-config max_size=${CCACHE_MAX}
37
Nico Huberc0b52db2022-12-15 12:42:32 +000038ENV DEVSHELL /bin/bash
39COPY mani-wrapper.sh /home/mani/
40ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]