panfrost: ci: Switch to kernel 5.2-rc2
[mesa.git] / src / gallium / drivers / panfrost / ci / Dockerfile
1 FROM debian:testing
2
3 ENV DEBIAN_FRONTEND=noninteractive
4
5 RUN echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
6 RUN echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
7 RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d
8 RUN echo 'exit 101' >> /usr/sbin/policy-rc.d
9 RUN chmod +x /usr/sbin/policy-rc.d
10
11 ############### Install packages for building
12
13 ARG DEBIAN_ARCH
14 RUN dpkg --add-architecture ${DEBIAN_ARCH}
15 RUN echo deb-src http://deb.debian.org/debian testing main >> /etc/apt/sources.list
16 RUN apt-get update && \
17 apt-get -y install ca-certificates && \
18 apt-get -y install --no-install-recommends \
19 crossbuild-essential-${DEBIAN_ARCH} \
20 meson \
21 g++ \
22 git \
23 ccache \
24 pkg-config \
25 python3-mako \
26 python-numpy \
27 python-six \
28 python-mako \
29 python3-pip \
30 python3-setuptools \
31 python3-six \
32 python3-wheel \
33 python3-jinja2 \
34 bison \
35 flex \
36 libwayland-dev \
37 gettext \
38 cmake \
39 bc \
40 libssl-dev \
41 lavacli \
42 csvkit \
43 curl \
44 unzip \
45 wget \
46 debootstrap \
47 procps \
48 qemu-user-static \
49 cpio \
50 \
51 libdrm-dev:${DEBIAN_ARCH} \
52 libx11-dev:${DEBIAN_ARCH} \
53 libxxf86vm-dev:${DEBIAN_ARCH} \
54 libexpat1-dev:${DEBIAN_ARCH} \
55 libsensors-dev:${DEBIAN_ARCH} \
56 libxfixes-dev:${DEBIAN_ARCH} \
57 libxdamage-dev:${DEBIAN_ARCH} \
58 libxext-dev:${DEBIAN_ARCH} \
59 x11proto-dev:${DEBIAN_ARCH} \
60 libx11-xcb-dev:${DEBIAN_ARCH} \
61 libxcb-dri2-0-dev:${DEBIAN_ARCH} \
62 libxcb-glx0-dev:${DEBIAN_ARCH} \
63 libxcb-xfixes0-dev:${DEBIAN_ARCH} \
64 libxcb-dri3-dev:${DEBIAN_ARCH} \
65 libxcb-present-dev:${DEBIAN_ARCH} \
66 libxcb-randr0-dev:${DEBIAN_ARCH} \
67 libxcb-sync-dev:${DEBIAN_ARCH} \
68 libxrandr-dev:${DEBIAN_ARCH} \
69 libxshmfence-dev:${DEBIAN_ARCH} \
70 libelf-dev:${DEBIAN_ARCH} \
71 libwayland-dev:${DEBIAN_ARCH} \
72 libwayland-egl-backend-dev:${DEBIAN_ARCH} \
73 libclang-7-dev:${DEBIAN_ARCH} \
74 zlib1g-dev:${DEBIAN_ARCH} \
75 libglvnd-core-dev:${DEBIAN_ARCH} \
76 wayland-protocols:${DEBIAN_ARCH} \
77 libpng-dev:${DEBIAN_ARCH} && \
78 rm -rf /var/lib/apt/lists
79
80 ############### Cross-build dEQP
81 ARG GCC_ARCH
82 RUN mkdir -p /artifacts/rootfs/deqp && \
83 wget https://github.com/KhronosGroup/VK-GL-CTS/archive/opengl-es-cts-3.2.5.0.zip && \
84 unzip -q opengl-es-cts-3.2.5.0.zip -d / && \
85 rm opengl-es-cts-3.2.5.0.zip && \
86 cd /VK-GL-CTS-opengl-es-cts-3.2.5.0 && \
87 python3 external/fetch_sources.py && \
88 cd /artifacts/rootfs/deqp && \
89 cmake -DDEQP_TARGET=wayland \
90 -DCMAKE_BUILD_TYPE=Release \
91 -DCMAKE_C_COMPILER=${GCC_ARCH}-gcc \
92 -DCMAKE_CXX_COMPILER=${GCC_ARCH}-g++ \
93 /VK-GL-CTS-opengl-es-cts-3.2.5.0 && \
94 make -j$(nproc) && \
95 rm -rf /artifacts/rootfs/deqp/external && \
96 rm -rf /artifacts/rootfs/deqp/modules/gles3 && \
97 rm -rf /artifacts/rootfs/deqp/modules/gles31 && \
98 rm -rf /artifacts/rootfs/deqp/modules/internal && \
99 rm -rf /artifacts/rootfs/deqp/executor && \
100 rm -rf /artifacts/rootfs/deqp/execserver && \
101 rm -rf /artifacts/rootfs/deqp/modules/egl && \
102 rm -rf /artifacts/rootfs/deqp/framework && \
103 find . -name CMakeFiles | xargs rm -rf && \
104 find . -name lib\*.a | xargs rm -rf && \
105 du -sh * && \
106 rm -rf /VK-GL-CTS-opengl-es-cts-3.2.5.0
107
108
109 ############### Cross-build kernel
110
111 ARG KERNEL_ARCH
112 ARG DEFCONFIG
113 ARG DEVICE_TREES
114 ARG KERNEL_IMAGE_NAME
115 ENV KERNEL_URL="https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+archive/refs/tags/v5.2-rc2.tar.gz"
116
117 COPY ${KERNEL_ARCH}.config /panfrost-ci/
118 RUN mkdir -p /kernel && \
119 wget -qO- ${KERNEL_URL} | tar -xvz -C /kernel && \
120 cd /kernel && \
121 ARCH=${KERNEL_ARCH} CROSS_COMPILE="${GCC_ARCH}-" ./scripts/kconfig/merge_config.sh ${DEFCONFIG} /panfrost-ci/${KERNEL_ARCH}.config && \
122 ARCH=${KERNEL_ARCH} CROSS_COMPILE="${GCC_ARCH}-" make -j12 ${KERNEL_IMAGE_NAME} dtbs && \
123 cp arch/${KERNEL_ARCH}/boot/${KERNEL_IMAGE_NAME} /artifacts/. && \
124 cp ${DEVICE_TREES} /artifacts/. && \
125 rm -rf /kernel
126
127
128 ############### Create rootfs
129
130 COPY create-rootfs.sh /artifacts/rootfs/
131 RUN debootstrap --variant=minbase --arch=${DEBIAN_ARCH} testing /artifacts/rootfs/ http://deb.debian.org/debian && \
132 chroot /artifacts/rootfs sh /create-rootfs.sh && \
133 rm /artifacts/rootfs/create-rootfs.sh
134
135 ENTRYPOINT [""]