summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorSumit Garg <[email protected]>2024-02-22 15:06:00 +0530
committerTom Rini <[email protected]>2024-02-29 22:24:05 -0500
commit3a4e5944c96c0d4a421132096f88d972569cb307 (patch)
tree2fa484908131d905de9ce35f319d4342185db2c9 /scripts/Makefile.lib
parentdf6fb77c98aaad373bb9851aeb39dd792b8dbffe (diff)
Makefile: Allow upstream DT subtree to provide DT includes
Allow platforms to reuse DT headers and dtsi includes directly form upstream DT subtree which will be frequently synced with Linux kernel. This will further allow us to drop corresponding DT includes copy from U-Boot tree. Also, since the DT includes from upstream DT subtree are done after DT includes from U-Boot tree, so it shouldn't cause any conflicts. Tested-by: Bryan Brattlof <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9e38d75443c..12857316c58 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -189,12 +189,17 @@ dtsi_include_list = $(strip $(u_boot_dtsi_options_debug) \
dtsi_include_list += $(CONFIG_DEVICE_TREE_INCLUDES)
# Modified for U-Boot
+upstream_dtsi_include = $(addprefix -I, $(srctree)/dts/upstream/src/ \
+ $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*))) \
+ $(if (CONFIG_ARM64), \
+ $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/arm64/*/*)))))
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
$(UBOOTINCLUDE) \
-I$(dir $<) \
-I$(u_boot_dtsi_loc) \
-I$(srctree)/arch/$(ARCH)/dts/include \
-I$(srctree)/include \
+ $(upstream_dtsi_include) \
-D__ASSEMBLY__ \
-undef -D__DTS__