From: Alexander Stein <alexander.stein@mailbox.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Alexander Stein <alexander.stein@mailbox.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] kbuild: Add DT schema check also when applying DT overlays
Date: Sun, 25 Feb 2024 16:12:08 +0100 [thread overview]
Message-ID: <20240225151209.343160-1-alexander.stein@mailbox.org> (raw)
Add a similar mechanism as for regular DT files to call the DT checker
after applying DT overlays to base DT files.
Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
---
I'm unsure if this is the "right" way, or if the multi-dtb-y lines
should be moved. But checking for schemas in DT overlays is a nice thing.
scripts/Makefile.lib | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 038a12e15586..964892b18f95 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -406,10 +406,6 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ;
quiet_cmd_fdtoverlay = DTOVL $@
cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs)
-$(multi-dtb-y): FORCE
- $(call if_changed,fdtoverlay)
-$(call multi_depend, $(multi-dtb-y), .dtb, -dtbs)
-
ifneq ($(CHECK_DTBS)$(CHECK_DT_BINDING),)
DT_CHECKER ?= dt-validate
DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m)
@@ -418,9 +414,13 @@ DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
quiet_cmd_dtb = DTC_CHK $@
cmd_dtb = $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true
+quiet_cmd_dtbo = DTOVL_CHK $@
+ cmd_dtbo = $(cmd_fdtoverlay) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true
else
quiet_cmd_dtb = $(quiet_cmd_dtc)
cmd_dtb = $(cmd_dtc)
+quiet_cmd_dtbo = $(quiet_cmd_fdtoverlay)
+ cmd_dtbo = $(cmd_fdtoverlay)
endif
$(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
@@ -429,6 +429,10 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
$(call if_changed_dep,dtc)
+$(multi-dtb-y): FORCE
+ $(call if_changed,dtbo)
+$(call multi_depend, $(multi-dtb-y), .dtb, -dtbs)
+
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
# Bzip2
--
2.44.0
next reply other threads:[~2024-02-25 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 15:12 Alexander Stein [this message]
2024-02-26 7:02 ` [PATCH 1/1] kbuild: Add DT schema check also when applying DT overlays Masahiro Yamada
2024-02-27 4:13 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240225151209.343160-1-alexander.stein@mailbox.org \
--to=alexander.stein@mailbox.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.