summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/container/arm_build.sh
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2019-11-07 20:08:03 +0100
committerMichel Dänzer <[email protected]>2019-11-15 16:21:10 +0100
commit506e9d5fc712b828584fe6e7afe980efb225e727 (patch)
tree837d84e81de9f76dd7cf18fdb6b2efa3ef081aa7 /.gitlab-ci/container/arm_build.sh
parent3a48f4565e4fd00b35144dc785ca0d38220cff3d (diff)
gitlab-ci: Rename container install scripts to match job names (better)
Cleans up .gitlab-ci/ a little, and allows using a single DEBIAN_EXEC line for all container jobs. v2: * Use lava_arm.sh instead of arm_lava.sh for consistency with v2 of the previous change Reviewed-by: Eric Anholt <[email protected]> # v1 Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to '.gitlab-ci/container/arm_build.sh')
-rw-r--r--.gitlab-ci/container/arm_build.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh
new file mode 100644
index 00000000000..c08746b1df2
--- /dev/null
+++ b/.gitlab-ci/container/arm_build.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+############### Install packages for building
+apt-get -y install ca-certificates
+sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
+echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
+dpkg --add-architecture armhf
+apt-get update
+apt-get -y install \
+ bc \
+ bison \
+ ccache \
+ crossbuild-essential-armhf \
+ flex \
+ g++ \
+ gettext \
+ libdrm-dev:armhf \
+ libelf-dev \
+ libelf-dev:armhf \
+ libexpat1-dev \
+ libexpat1-dev:armhf \
+ libssl-dev \
+ llvm-7-dev:armhf \
+ llvm-8-dev \
+ meson \
+ pkg-config \
+ python \
+ python3-mako \
+ wget \
+ zlib1g-dev
+
+# dependencies where we want a specific version
+export LIBDRM_VERSION=libdrm-2.4.100
+
+wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
+tar -xvf $LIBDRM_VERSION.tar.bz2 && rm $LIBDRM_VERSION.tar.bz2
+cd $LIBDRM_VERSION; meson build -D vc4=true -D freedreno=true -D etnaviv=true; ninja -j4 -C build install; cd ..
+rm -rf $LIBDRM_VERSION
+
+############### Generate cross build file for Meson
+
+cross_file="/cross_file-armhf.txt"
+/usr/share/meson/debcrossgen --arch armhf -o "$cross_file"
+# Explicitly set ccache path for cross compilers
+sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
+# Don't need wrapper for armhf executables
+sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
+
+apt-get purge -y \
+ wget
+
+apt-get autoremove -y --purge