[U-Boot] [PATCH 1/4] build: support a new image u-boot-dtb.img

Masahiro Yamada
2014-05-14T12:55:07Z

In SPL framework, SPL uses u-boot.img to load u-boot.bin.
Here,
u-boot.img = uImage header + u-boot.bin

To use OF control with a separate devicetree,
u-boot.dtb must be placed right after u-boot.bin.
In this case, u-boot-dtb.bin is generally used.
Here,
u-boot-dtb.bin = u-boot.bin + u-boot.dtb

We need u-boot-dtb.img to use both SPL framework
and separate OF control at the same time.
u-boot-dtb.img = uImage header + u-boot-dtb.bin

For example, Zynq boards already define all of
- CONFIG_SPL
- CONFIG_OF_CONTROL
- CONFIG_OF_SEPARATE

So, the support of u-boot-dtb.img is urgent.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
---

Makefile | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index e82f616..83d1cc6 100644
--- a/Makefile
+++ b/Makefile
@@ -752,6 +752,9 @@ 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 u-boot-dtb.bin
+ifeq ($(CONFIG_SPL_FRAMEWORK),y)
+ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
+endif
ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
ifneq ($(CONFIG_SPL_TARGET),)
ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
@@ -854,6 +857,11 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE
$(call if_changed,mkimage)

+MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img)
+
+u-boot-dtb.img: u-boot-dtb.bin FORCE
+ $(call if_changed,mkimage)
+
u-boot.sha1: u-boot.bin
tools/ubsha1 u-boot.bin

--
1.8.3.2