The CONFIG_*PL_BUILD defines are currently not defined when preprocessing the dts files, leading to build problems with binman. Set the defines based on the related CONFIG_*PL values.
Tested-by: Oliver Graute <oliver.gra...@kococonnector.com> Signed-off-by: Hendrik Donner <h...@os-cillation.de> --- scripts/Makefile.lib | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 54403040f00..dd2c6363224 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -217,6 +217,16 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ -D__ASSEMBLY__ \ -undef -D__DTS__ +ifeq ($(CONFIG_SPL),y) +dtc_cpp_flags += -DCONFIG_XPL_BUILD -DCONFIG_SPL_BUILD +endif +ifeq ($(CONFIG_TPL),y) +dtc_cpp_flags += -DCONFIG_XPL_BUILD -DCONFIG_TPL_BUILD +endif +ifeq ($(CONFIG_VPL),y) +dtc_cpp_flags += -DCONFIG_XPL_BUILD -DCONFIG_VPL_BUILD +endif + # Finds the multi-part object the current object will be linked into modname-multi = $(sort $(foreach m,$(multi-used),\ $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) -- 2.43.0