summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-20 02:34:28 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-20 02:37:13 +0300
commit56a0cc493597f8fccb99c91738b1746892d90427 (patch)
tree688029c9be8b4cfef11fad75981f95e0c4a7c01b
parent43764c01cd8ed103fa6e15a61030e8005757f2d2 (diff)
kbuild: Add an option to run DT bindings checks
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xkbuild.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/kbuild.sh b/kbuild.sh
index d526aad..e0c5877 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -43,6 +43,7 @@ usage() {
echo "--deb Create Debian packages"
echo "--defconfig file Generate a new .config with defaults from file"
echo "--doc[=dir] Compile the documentation (for the specified dir only)"
+ echo "--dt-check file Run DT bindings checks"
echo "-h, --help Print this help text"
echo "--no-dt Don't compile the device trees"
echo "--no-image Don't compile the kernel image"
@@ -63,6 +64,7 @@ opt_build="image,modules,dt"
opt_cmdline_file=
opt_defconfig=
opt_doc_dirs='.'
+opt_dt_bindings=''
opt_make_opts=
while [[ $# != 0 ]] ; do
@@ -111,6 +113,10 @@ while [[ $# != 0 ]] ; do
do_build[doc]=1
opt_doc_dirs="${option/--doc=/}"
;;
+ --dt-check)
+ opt_dt_bindings="$1"
+ shift
+ ;;
-h|--help)
usage $0
exit 1
@@ -244,6 +250,14 @@ if [[ ${do_build[doc]} == 1 ]] ; then
fi
#
+# Check DT bindings
+#
+
+if [[ ! -z ${opt_dt_bindings} ]] ; then
+ $pmake dt_binding_check "DT_SCHEMA_FILES=${opt_dt_bindings}"
+fi
+
+#
# Compile the kernel, modules and DTBs
#