[U-Boot,v2,07/10] dtbo: make dtbos special

Message ID 1502441568-22896-8-git-send-email-pantelis.antoniou@konsulko.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Pantelis Antoniou Aug. 11, 2017, 8:52 a.m.
Special rule for dtbo generation

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 scripts/Makefile.lib | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Simon Glass Aug. 26, 2017, 1:37 p.m. | #1
On 11 August 2017 at 02:52, Pantelis Antoniou
<pantelis.antoniou@konsulko.com> wrote:
> Special rule for dtbo generation
>
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  scripts/Makefile.lib | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9ce47b4..2a7ed70 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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
 # ---------------------------------------------------------------------------