diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 122c8e78204..61655240b39 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -255,6 +255,8 @@ upstream_dtsi_include = $(addprefix -I, $(srctree)/dts/upstream/src/ \ $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/arm64/*/*))) \ $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/arm64/*/*/*))))) dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ + $(if $(CONFIG_OF_UPSTREAM), \ + -I$(srctree)/dts/upstream/include) \ $(UBOOTINCLUDE) \ -I$(dir $<) \ -I$(u_boot_dtsi_loc) \