1#!/bin/bash
2
3set -e
4set -o xtrace
5
6ROOTFS=/lava-files/rootfs-${arch}
7
8dpkg --add-architecture $arch
9apt-get update
10
11# Cross-build test deps
12BAREMETAL_EPHEMERAL=" \
13        autoconf \
14        automake \
15        crossbuild-essential-$arch \
16        git-lfs \
17        libdrm-dev:$arch \
18        libboost-dev:$arch \
19        libegl1-mesa-dev:$arch \
20        libelf-dev:$arch \
21        libexpat1-dev:$arch \
22        libffi-dev:$arch \
23        libgbm-dev:$arch \
24        libgles2-mesa-dev:$arch \
25        libpciaccess-dev:$arch \
26        libpcre3-dev:$arch \
27        libpng-dev:$arch \
28        libpython3-dev:$arch \
29        libstdc++6:$arch \
30        libtinfo-dev:$arch \
31        libegl1-mesa-dev:$arch \
32        libvulkan-dev:$arch \
33        libxcb-keysyms1-dev:$arch \
34        libpython3-dev:$arch \
35        python3-dev \
36        qt5-default \
37        qt5-qmake \
38        qtbase5-dev:$arch \
39        "
40
41apt-get install -y --no-remove $BAREMETAL_EPHEMERAL
42
43mkdir /var/cache/apt/archives/$arch
44
45############### Create cross-files
46
47. .gitlab-ci/create-cross-file.sh $arch
48
49. .gitlab-ci/container/container_pre_build.sh
50
51############### Create rootfs
52KERNEL_URL=https://github.com/anholt/linux/archive/cheza-pagetables-2020-09-04.tar.gz
53
54DEBIAN_ARCH=$arch INCLUDE_VK_CTS=1 . .gitlab-ci/container/lava_build.sh
55
56############### Uninstall the build software
57
58apt-get purge -y $BAREMETAL_EPHEMERAL
59
60. .gitlab-ci/container/container_post_build.sh
61