diff options
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 07125e697d7a..3e73dfd838cd 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -156,9 +156,9 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | |||
156 | 156 | ||
157 | ld_flags = $(LDFLAGS) $(ldflags-y) | 157 | ld_flags = $(LDFLAGS) $(ldflags-y) |
158 | 158 | ||
159 | dtc_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ | 159 | dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ |
160 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ | 160 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ |
161 | -I$(srctree)/arch/$(SRCARCH)/include/dts \ | 161 | -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ |
162 | -undef -D__DTS__ | 162 | -undef -D__DTS__ |
163 | 163 | ||
164 | # Finds the multi-part object the current object will be linked into | 164 | # Finds the multi-part object the current object will be linked into |
@@ -269,20 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb | |||
269 | $(call cmd,dt_S_dtb) | 269 | $(call cmd,dt_S_dtb) |
270 | 270 | ||
271 | quiet_cmd_dtc = DTC $@ | 271 | quiet_cmd_dtc = DTC $@ |
272 | cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< | 272 | cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ |
273 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ | ||
274 | -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \ | ||
275 | -d $(depfile).dtc $(dtc-tmp) ; \ | ||
276 | cat $(depfile).pre $(depfile).dtc > $(depfile) | ||
273 | 277 | ||
274 | $(obj)/%.dtb: $(src)/%.dts FORCE | 278 | $(obj)/%.dtb: $(src)/%.dts FORCE |
275 | $(call if_changed_dep,dtc) | 279 | $(call if_changed_dep,dtc) |
276 | 280 | ||
277 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts) | 281 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts) |
278 | 282 | ||
279 | quiet_cmd_dtc_cpp = DTC+CPP $@ | ||
280 | cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ | ||
281 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp) | ||
282 | |||
283 | $(obj)/%.dtb: $(src)/%.dtsp FORCE | ||
284 | $(call if_changed_dep,dtc_cpp) | ||
285 | |||
286 | # Bzip2 | 283 | # Bzip2 |
287 | # --------------------------------------------------------------------------- | 284 | # --------------------------------------------------------------------------- |
288 | 285 | ||