mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
cli: Add command "dts-check"
Validates the dts/dtb file for the selected board and outputs the validation logs to the user. This can be used when adding a new board, developing or improving a dts file. Should lead to higher quality device trees and patches overall, if used.
This commit is contained in:
22
lib/functions/compilation/kernel-dts-check.sh
Normal file
22
lib/functions/compilation/kernel-dts-check.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright (c) 2013-2024 Igor Pecovnik, igor@armbian.com
|
||||
#
|
||||
# This file is a part of the Armbian Build Framework
|
||||
# https://github.com/armbian/build/
|
||||
|
||||
|
||||
# Validate the dts/dtb file against dt bindings found in "linux/Documentation/devicetree/bindings/"
|
||||
# See slide 15 in https://elinux.org/images/1/17/How_to_Get_Your_DT_Schema_Bindings_Accepted_in_Less_than_10_Iterations_-_Krzysztof_Kozlowski%2C_Linaro_-_ELCE_2023.pdf
|
||||
function validate_dts() {
|
||||
[[ -z "${BOOT_FDT_FILE}" ]] && exit_with_error "BOOT_FDT_FILE not set! No dts file to validate."
|
||||
display_alert "Validating dts/dtb file for selected board" "${BOOT_FDT_FILE} ; see output below" "info"
|
||||
|
||||
# "make CHECK_DTBS=y" uses the pip modules "dtschema" and "yamllint"
|
||||
prepare_python_and_pip
|
||||
|
||||
# Run "make CHECK_DTBS=y" for the selected board's dtb file
|
||||
run_kernel_make "CHECK_DTBS=y ${BOOT_FDT_FILE}"
|
||||
}
|
||||
Reference in New Issue
Block a user