dtbo: make dtbos special
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>
Mon, 4 Sep 2017 20:12:20 +0000 (23:12 +0300)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Sep 2017 11:27:49 +0000 (05:27 -0600)
Special rule for dtbo generation

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
scripts/Makefile.lib

index 9ce47b4d22713ff376436acc00ea75e1ad5241c4..2a7ed70cf26b3cd8d72d772d1bb1ae6a6c9f5773 100644 (file)
@@ -321,6 +321,23 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
+# DTCO
+# ---------------------------------------------------------------------------
+
+quiet_cmd_dtco = DTCO    $@
+# Rule for objects only; does not put specific u-boot include at the end
+# No generation of assembly file either
+# Modified for U-Boot
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
+       $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
+       $(DTC) -@ -O dtb -o $@ -b 0 \
+               -i $(dir $<) $(DTC_FLAGS) \
+               -d $(depfile).dtc.tmp $(dtc-tmp) ; \
+       cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
+
+$(obj)/%.dtbo: $(src)/%.dts FORCE
+       $(call if_changed_dep,dtco)
+
 # Fonts
 # ---------------------------------------------------------------------------