Skip to content

Commit 5fba412

Browse files
committed
scripts: allow dtc to be overridden by env
Use the system's dtc by default, but allow it to be overridden by the environment e.g. during inline builds. Signed-off-by: Park Ju Hyung <[email protected]>
1 parent b571989 commit 5fba412

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: scripts/Makefile.lib

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
268268

269269
# DTC
270270
# ---------------------------------------------------------------------------
271+
DTC ?= dtc
271272

272273
# Disable noisy checks by default
273274
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
@@ -311,7 +312,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
311312
quiet_cmd_dtc = DTC $@
312313
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
313314
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
314-
dtc -O dtb -o $@ -b 0 \
315+
$(DTC) -O dtb -o $@ -b 0 \
315316
$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
316317
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
317318
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)

0 commit comments

Comments
 (0)