From: Troy Kisky <troy.kisky@boundarydevices.com>
To: sjg@chromium.org, trini@konsulko.com
Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de,
Troy Kisky <troy.kisky@boundarydevices.com>
Subject: [PATCH v1 2/5] dts: allow dts files in board directory
Date: Fri, 17 Dec 2021 15:01:28 -0800 [thread overview]
Message-ID: <20211217230131.2715940-3-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com>
Let the board specific dts files live in the board directory.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
dts/Makefile | 11 +++++++++--
scripts/Makefile.lib | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dts/Makefile b/dts/Makefile
index cb311138295..09b46f9fcfd 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -13,7 +13,9 @@ endif
ifneq ($(EXT_DTB),)
DTB := $(EXT_DTB)
else
-DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
+ifneq "$(ARCH)" "arm64"
+DTB := $(patsubst $(srctree)/%.dts,%.dtb,$(shell find "$(srctree)/board/$(BOARDDIR)" $(srctree)/arch/$(ARCH)/dts/ -type f -name $(DEVICE_TREE).dts))
+endif
endif
$(obj)/dt-$(SPL_NAME).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE
@@ -40,8 +42,13 @@ $(DTB): arch-dtbs
/bin/false)
PHONY += arch-dtbs
+ifneq "$(patsubst board/$(BOARDDIR)/%,,$(DTB))" ""
arch-dtbs:
$(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
+else
+arch-dtbs:
+ $(Q)$(MAKE) $(build)="board/$(BOARDDIR)" dtbs
+endif
ifeq ($(CONFIG_SPL_BUILD),y)
obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
@@ -63,4 +70,4 @@ spl_dtbs: $(obj)/dt-$(SPL_NAME).dtb
clean-files := dt.dtb.S
# Let clean descend into dts directories
-subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts
+subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts ../$(patsubst $(srctree)/%/,%,$(dir $(shell find $(srctree)/board -type f -name "*.dtb")))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 39f03398ed8..18fe42f378f 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -183,6 +183,7 @@ u_boot_dtsi = $(strip $(u_boot_dtsi_options_debug) \
# Modified for U-Boot
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
+ -I$(srctree)/board/$(BOARDDIR) \
-I$(srctree)/arch/$(ARCH)/dts \
-I$(srctree)/arch/$(ARCH)/dts/include \
-Iinclude \
--
2.32.0
next prev parent reply other threads:[~2021-12-17 23:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2022-01-06 21:00 ` Troy Kisky
2021-12-17 23:01 ` Troy Kisky [this message]
2021-12-28 8:33 ` [PATCH v1 2/5] dts: allow dts files " Simon Glass
2022-01-06 21:01 ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2022-01-06 21:09 ` Troy Kisky
2022-01-30 23:14 ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
2021-12-28 8:33 ` Simon Glass
2021-12-28 8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
2021-12-28 13:11 ` Tom Rini
2022-01-06 21:14 ` Troy Kisky
2022-01-07 15:12 ` Tom Rini
2022-01-07 18:33 ` Troy Kisky
2022-01-30 23:14 ` Simon Glass
2022-02-08 14:30 ` Tom Rini
2022-03-15 19:08 ` Troy Kisky
2022-03-15 20:01 ` Tom Rini
2022-03-15 20:23 ` Troy Kisky
2022-03-16 14:48 ` Tom Rini
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=20211217230131.2715940-3-troy.kisky@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=fabio.estevam@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.