@@ -835,7 +835,8 @@ UBOOTINCLUDE := \
-I$(srctree)/arch/arm/thumb1/include), \
-I$(srctree)/arch/arm/thumb1/include)) \
-I$(srctree)/arch/$(ARCH)/include \
- -include $(srctree)/include/linux/kconfig.h
+ -include $(srctree)/include/linux/kconfig.h \
+ -I$(srctree)/dts/upstream/include
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
@@ -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__