6 ############### Install packages for building
7 apt-get
-y install ca-certificates
8 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc
/apt
/sources.list
9 echo 'deb https://deb.debian.org/debian buster-backports main' >/etc
/apt
/sources.list.d
/backports.list
10 dpkg
--add-architecture armhf
16 crossbuild-essential-armhf \
35 # dependencies where we want a specific version
36 export LIBDRM_VERSION
=libdrm-2.4
.100
38 wget https
://dri.freedesktop.org
/libdrm
/$LIBDRM_VERSION.
tar.bz2
39 tar -xvf $LIBDRM_VERSION.
tar.bz2
&& rm $LIBDRM_VERSION.
tar.bz2
40 cd $LIBDRM_VERSION; meson build
-D vc4
=true
-D freedreno
=true
-D etnaviv
=true
; ninja
-j4 -C build
install; cd ..
41 rm -rf $LIBDRM_VERSION
43 ############### Generate cross build file for Meson
45 cross_file
="/cross_file-armhf.txt"
46 /usr
/share
/meson
/debcrossgen
--arch armhf
-o "$cross_file"
47 # Explicitly set ccache path for cross compilers
48 sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
49 # Don't need wrapper for armhf executables
50 sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
55 apt-get autoremove -y --purge