From d01fe66eb17a94e94840ccf469e2a408d3b5fd2c Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 8 Sep 2022 16:41:19 +0000 Subject: [PATCH] script: Add support for DTC_FLAG Add support to provide the DTC_FLAG for DTC compilation from makefile and create folder for temporary/ intermediate DT build file creation. This will help to build the DT available in hardware/nvidia. Bug 3787936 Change-Id: I79ca3f2532fd317ff004bc7290185d4878028fff Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2773804 Reviewed-by: Bitan Biswas GVS: Gerrit_Virtual_Submit --- scripts/Makefile.lib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 54871e78..0314ea29 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -223,6 +223,7 @@ DTC_INCLUDE += $(srctree)/scripts/dtc/include-prefixes dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc \ $(addprefix -I,$(DTC_INCLUDE)) \ + $(DTC_CPP_FLAGS) \ -undef -D__DTS__ ifeq ($(CONFIG_LTO_CLANG),y) @@ -348,7 +349,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE $(call if_changed,dt_S_dtb) quiet_cmd_dtc = DTC $@ -cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ +cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(DTC) -o $@ -b 0 \ $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \