Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47c6fb9e authored by Shashank Mittal's avatar Shashank Mittal
Browse files

scripts: Makefile: add support to use external DTC



Add support to use external DTC to compile device tree blobs.

Change-Id: I268d2332d5328c3b0050b35c96f91e8ef9e1f6f8
Signed-off-by: default avatarShashank Mittal <mittals@codeaurora.org>
parent 18a3ceeb
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -287,10 +287,16 @@ cmd_dt_S_dtb= \
$(obj)/%.dtb.S: $(obj)/%.dtb
	$(call cmd,dt_S_dtb)

ifneq ($(DTC_EXT),)
DTC = $(DTC_EXT)
else
DTC = $(objtree)/scripts/dtc/dtc
endif

quiet_cmd_dtc = DTC     $@
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
	$(DTC) -O dtb -o $@ -b 0 \
		-i $(dir $<) $(DTC_FLAGS) \
		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
+2 −0
Original line number Diff line number Diff line
# scripts/dtc makefile

hostprogs-y	:= dtc
ifeq ($(DTC_EXT),)
always		:= $(hostprogs-y)
endif

dtc-objs	:= dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
		   srcpos.o checks.o util.o