Merge pull request #1421 from Yann-lms/cpp_dtc

Build: add cpp build processing for dtb
This commit is contained in:
Dimitris Papastamos 2018-06-20 16:36:00 +01:00 committed by GitHub
commit bdd33afc10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -198,7 +198,8 @@ BL_COMMON_SOURCES += common/bl_common.c \
${COMPILER_RT_SRCS} \
${STDLIB_SRCS}
INCLUDES += -Iinclude/bl1 \
INCLUDES += -Iinclude \
-Iinclude/bl1 \
-Iinclude/bl2 \
-Iinclude/bl2u \
-Iinclude/bl31 \

View File

@ -372,11 +372,14 @@ endef
define MAKE_DTB
$(eval DOBJ := $(addprefix $(1)/,$(call SOURCES_TO_DTBS,$(2))))
$(eval DPRE := $(addprefix $(1)/,$(patsubst %.dts,%.pre.dts,$(notdir $(2)))))
$(eval DEP := $(patsubst %.dtb,%.d,$(DOBJ)))
$(DOBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | fdt_dirs
@echo " CPP $$<"
$$(Q)$$(CPP) $$(CPPFLAGS) -x assembler-with-cpp -o $(DPRE) $$<
@echo " DTC $$<"
$$(Q)$$(DTC) $$(DTC_FLAGS) -d $(DEP) -o $$@ $$<
$$(Q)$$(DTC) $$(DTC_FLAGS) -i fdts -d $(DEP) -o $$@ $(DPRE)
-include $(DEP)