xref: /linux/drivers/gpu/drm/ci/dtbs-check.sh (revision 3f2a5ba784b808109cac0aac921213e43143a216)
1#!/bin/bash
2# SPDX-License-Identifier: MIT
3
4set -euxo pipefail
5
6: "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}"
7: "${LLVM_VERSION:?ERROR: LLVM_VERSION must be set}"
8
9./drivers/gpu/drm/ci/setup-llvm-links.sh
10
11make LLVM=1 ARCH="${KERNEL_ARCH}" defconfig
12
13if ! make -j"${FDO_CI_CONCURRENT:-4}" ARCH="${KERNEL_ARCH}" LLVM=1 dtbs_check \
14        DT_SCHEMA_FILES="${SCHEMA:-}" 2>dtbs-check.log; then
15    echo "ERROR: 'make dtbs_check' failed. Please check dtbs-check.log for details."
16    exit 1
17fi
18
19if [[ -s dtbs-check.log ]]; then
20    echo "WARNING: dtbs_check reported warnings. Please check dtbs-check.log for details."
21    exit 102
22fi
23