1#!/bin/bash 2 3set -e 4set -o xtrace 5 6export DEBIAN_FRONTEND=noninteractive 7 8# Ephemeral packages (installed for this script and removed again at the end) 9STABLE_EPHEMERAL=" \ 10 autoconf \ 11 automake \ 12 bc \ 13 bison \ 14 bzip2 \ 15 ccache \ 16 clang-13 \ 17 clang-11 \ 18 cmake \ 19 flex \ 20 g++ \ 21 glslang-tools \ 22 libasound2-dev \ 23 libcap-dev \ 24 libclang-cpp13-dev \ 25 libclang-cpp11-dev \ 26 libelf-dev \ 27 libexpat1-dev \ 28 libfdt-dev \ 29 libgbm-dev \ 30 libgles2-mesa-dev \ 31 libllvmspirvlib-dev \ 32 libpciaccess-dev \ 33 libpng-dev \ 34 libudev-dev \ 35 libvulkan-dev \ 36 libwaffle-dev \ 37 libx11-xcb-dev \ 38 libxcb-dri2-0-dev \ 39 libxext-dev \ 40 libxkbcommon-dev \ 41 libxrender-dev \ 42 llvm-13-dev \ 43 llvm-11-dev \ 44 llvm-spirv \ 45 make \ 46 meson \ 47 ocl-icd-opencl-dev \ 48 patch \ 49 pkg-config \ 50 python3-distutils \ 51 xz-utils \ 52 " 53 54apt-get update 55 56apt-get install -y --no-remove \ 57 $STABLE_EPHEMERAL \ 58 clinfo \ 59 iptables \ 60 libclang-common-13-dev \ 61 libclang-common-11-dev \ 62 libclang-cpp13 \ 63 libclang-cpp11 \ 64 libcap2 \ 65 libegl1 \ 66 libepoxy-dev \ 67 libfdt1 \ 68 libllvmspirvlib11 \ 69 libxcb-shm0 \ 70 ocl-icd-libopencl1 \ 71 python3-lxml \ 72 python3-renderdoc \ 73 python3-simplejson \ 74 socat \ 75 spirv-tools \ 76 sysvinit-core \ 77 wget 78 79 80. .gitlab-ci/container/container_pre_build.sh 81 82############### Build libdrm 83 84. .gitlab-ci/container/build-libdrm.sh 85 86############### Build Wayland 87 88. .gitlab-ci/container/build-wayland.sh 89 90############### Build Crosvm 91 92. .gitlab-ci/container/build-rust.sh 93. .gitlab-ci/container/build-crosvm.sh 94rm -rf /root/.cargo 95rm -rf /root/.rustup 96 97############### Build kernel 98 99export DEFCONFIG="arch/x86/configs/x86_64_defconfig" 100export KERNEL_IMAGE_NAME=bzImage 101export KERNEL_ARCH=x86_64 102export DEBIAN_ARCH=amd64 103 104mkdir -p /lava-files/ 105. .gitlab-ci/container/build-kernel.sh 106 107############### Build libclc 108 109. .gitlab-ci/container/build-libclc.sh 110 111############### Build piglit 112 113PIGLIT_OPTS="-DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUILD_DMA_BUF_TESTS=ON" . .gitlab-ci/container/build-piglit.sh 114 115############### Build dEQP GL 116 117DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh 118 119############### Build apitrace 120 121. .gitlab-ci/container/build-apitrace.sh 122 123############### Uninstall the build software 124 125ccache --show-stats 126 127apt-get purge -y \ 128 $STABLE_EPHEMERAL 129 130apt-get autoremove -y --purge 131