[U-Boot] [PATCH] kbuild: get back DTB at the top directory

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Feb 21 07:34:30 CET 2014


Commit 6ab6b2af deleted ./u-boot.dtb because it was a copy
of dts/dt.dtb.

But Simon suggested to keep u-boot.dtb at the top directory
because it is a build output.

After discussions, we agreed on revival of ./u-boot.dtb.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at ti.com>
---

Hello Simon,

In our discussions, I memtioned to post version 4
of "dts: re-write dts/Makefile more simply with Kbuild".

But, before that, version 3 has been applied.

Anyway, I promised to get back ./u-boot.dtb,
so I'm posting this patch.

To avoid a conflict with other patches,
this patch is rebased on
"Follow-up for Kbuild series: more misc targets and short logs" series.
(And using Kbuild style to display short log)

BTW, another question hit me when I was writing this patch.
Please let me ask you a little more questions.

I guess the reason why you want device tree at the top directory
is Sandbox. Is this right?
If so, I am 100% convinced and I'd like to suggest to modify

    ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin

to

    ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.bin
    ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb

Is this better?
For CONFIG_OF_SEPARATE, I think there is no opportunity to use u-boot.dtb
because we have u-boot-dtb.bin.


 Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b91381c..db263ef 100644
--- a/Makefile
+++ b/Makefile
@@ -720,7 +720,7 @@ ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
 ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin
 ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
 ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
-ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.bin
+ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin
 ifneq ($(CONFIG_SPL_TARGET),)
 ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
 endif
@@ -766,6 +766,12 @@ dtbs dts/dt.dtb: checkdtc u-boot
 u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE
 	$(call if_changed,cat)
 
+quiet_cmd_copy = COPY    $@
+      cmd_copy = cp $< $@
+
+u-boot.dtb: dts/dt.dtb
+	$(call cmd,copy)
+
 OBJCOPYFLAGS_u-boot.hex := -O ihex
 
 OBJCOPYFLAGS_u-boot.srec := -O srec
-- 
1.8.3.2



More information about the U-Boot mailing list