From: Jan Kiszka <jan.kiszka@siemens.com>
To: devicetree <devicetree@vger.kernel.org>,
Ian Campbell <ijc@hellion.org.uk>
Subject: [PATCH devicetree-rebasing] Add support for overlays
Date: Mon, 30 Sep 2024 07:41:00 +0200 [thread overview]
Message-ID: <034401d8-cc96-455f-9d2d-780fb917d5d5@siemens.com> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
Make sure that upstream overlays can also be built and, thus, checked.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Makefile | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index fb51acef7c..210830c688 100644
--- a/Makefile
+++ b/Makefile
@@ -100,25 +100,29 @@ clean_%:
ifeq ($(ARCH),)
ALL_DTS := $(shell find src/* -name \*.dts)
+ALL_DTSO := $(shell find src/* -name \*.dtso)
ALL_DTB := $(patsubst %.dts,%.dtb,$(ALL_DTS))
+ALL_DTBO := $(patsubst %.dtso,%.dtbo,$(ALL_DTSO))
-$(ALL_DTB): ARCH=$(word 2,$(subst /, ,$@))
-$(ALL_DTB): FORCE
+$(ALL_DTB) $(ALL_DTBO): ARCH=$(word 2,$(subst /, ,$@))
+$(ALL_DTB) $(ALL_DTBO): FORCE
$(Q)$(MAKE) ARCH=$(ARCH) $@
else
ARCH_DTS := $(shell find src/$(ARCH) -name \*.dts)
+ARCH_DTSO := $(shell find src/$(ARCH) -name \*.dtso)
ARCH_DTB := $(patsubst %.dts,%.dtb,$(ARCH_DTS))
+ARCH_DTBO := $(patsubst %.dtso,%.dtbo,$(ARCH_DTSO))
src := src/$(ARCH)
obj := src/$(ARCH)
include scripts/Kbuild.include
-cmd_files := $(wildcard $(foreach f,$(ARCH_DTB),$(dir $(f)).$(notdir $(f)).cmd))
+cmd_files := $(wildcard $(foreach f,$(ARCH_DTB) $(ARCH_DTBO),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
include $(cmd_files)
@@ -143,15 +147,25 @@ cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
$(obj)/%.dtb: $(src)/%.dts FORCE
$(call if_changed_dep,dtc)
+quiet_cmd_dtco = DTCO $@
+cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+ $(DTC) -@ -O dtb -o $@ -b 0 \
+ -i $(src) $(DTC_FLAGS) \
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
+
+$(obj)/%.dtbo: $(src)/%.dtso FORCE
+ $(call if_changed_dep,dtco)
+
PHONY += all_arch
-all_arch: $(ARCH_DTB)
+all_arch: $(ARCH_DTB) $(ARCH_DTBO)
@:
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
-o -name .pc -o -name .hg -o -name .git \) -prune -o
PHONY += clean_arch
-clean_arch: __clean-files = $(ARCH_DTB)
+clean_arch: __clean-files = $(ARCH_DTB) $(ARCH_DTBO)
clean_arch: FORCE
$(call cmd,clean)
@find . $(RCS_FIND_IGNORE) \
--
2.43.0
next reply other threads:[~2024-09-30 5:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 5:41 Jan Kiszka [this message]
2024-09-30 15:36 ` [PATCH devicetree-rebasing] Add support for overlays Ian Campbell
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=034401d8-cc96-455f-9d2d-780fb917d5d5@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc@hellion.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).