From 56a0cc493597f8fccb99c91738b1746892d90427 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 20 Sep 2021 02:34:28 +0300 Subject: kbuild: Add an option to run DT bindings checks Signed-off-by: Laurent Pinchart --- kbuild.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@ -243,6 +249,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 # -- cgit v1.2.3