[U-Boot] [PATCH v3 07/14] fdt: Add DEV_TREE_BIN option to specify a device tree binary file

Masahiro Yamada yamada.m at jp.panasonic.com
Tue Jun 10 07:59:23 CEST 2014


Hi Simon,


On Mon,  2 Jun 2014 22:04:50 -0600
Simon Glass <sjg at chromium.org> wrote:

> In some cases, an externally-built device tree binary is required to be
> attached to U-Boot. An example is when using image signing, since in that
> case the .dtb file must include the public keys.

I do not want to expand this argument, but
I am not sure if DTB stands for "device tree binary".

linux/Documentation often refer it as "device tree blob",
while   linux/Documentation/devicetree/booting-without-of.txt
says  "device tree block".


> Add a DEV_TREE_BIN option to the Makefile, and update the documentation.

Is it possible to rename it without mentioning  _BIN or _BLOB ?

For example,  DTB_PATH=...   or  EXT_DTB=...
or some other variable name you like.


> diff --git a/Makefile b/Makefile
> index ece622f..92819bf 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -867,7 +867,7 @@ MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \
>  MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
>  		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
>  
> -u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE
> +u-boot.img u-boot.kwb u-boot.pbl: u-boot$(if $(CONFIG_OF_SEPARATE),-dtb,).bin FORCE
>  	$(call if_changed,mkimage)

The second comma  in   '(if $(CONFIG_OF_SEPARATE),-dtb,)'  is redundant.


This is duplicating the same image as  u-boot-dtb.img

Your way is that "u-boot.img" includes DTB in some time and doesn't in the other.
I am not sure which way is better.
But we don't need two rules to generate the equivalent image.

If you go along with this change, I think it's OK with me.
Please consider removing below in that case:


ifeq ($(CONFIG_SPL_FRAMEWORK),y)
ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
endif

  and

u-boot-dtb.img: u-boot-dtb.bin FORCE
        $(call if_changed,mkimage)


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list