[Buildroot] [PATCH] boot/uboot: add support for custom DT name

Clemens Gruber clemens.gruber at pqgruber.com
Mon Dec 24 16:59:31 UTC 2018


Hi Thomas, Kostya, Matthew,

On Mon, Dec 24, 2018 at 02:47:59PM +0100, Thomas Petazzoni wrote:
> Hello Kostya,
> 
> +Clemens Gruber in Cc, who posted a related U-Boot patch.
> 
> On Mon, 24 Dec 2018 15:19:04 +0200, kostap at marvell.com wrote:
> > From: Konstantin Porotchkin <kostap at marvell.com>
> > 
> > Some u-boot default configuration files could be shared between
> > targets and used for building images for multiple board types.
> > The only difference between such builds is the DTB embedded in
> > in the boot image for each specific platform.
> > This approach is widely used by Marvell, having the same u-boot
> > configuration file for the entire SoC family, but allowing builds
> > of multiple target flavors by supplying the device tree name through
> > make command parameter DEVICE_TREE=xxx
> > This patch adds such capability to uboot module of the buildroot.
> > The custome DT name could be  defined by
> > BR2_TARGET_UBOOT_CUSTOM_DTS_NAME entry.
> > 
> > Change-Id: I69e193339b0369a736bdf98491b9914d24a54e17
> > Signed-off-by: Konstantin Porotchkin <kostap at marvell.com>
> 
> Reading this again, in fact it is very similar to patch
> http://patchwork.ozlabs.org/patch/881197/ we already have in the queue.
> With a very important distinction: your patch passes DEVICE_TREE=,
> while the existing pending patch passes EXT_DTB=. The obvious question
> that comes up is: which one is right ? Or are these two orthogonal
> things ?

They solve different problems.

The reason for the EXT_DTB patch was to allow passing pre-built dtbs
with metadata used for verified boot in U-Boot.
(It's a simple device tree blob which stores the public key for the FIT
image with the kernel, initrd etc. and is generated by U-Boot mkimage)

Matthew Weber suggested alternatives like appending this blob to
uboot.bin or decompiling the dtb and including the resulting dts via
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH.

Afaik, DEVICE_TREE is for user-specified "normal" DTs, e.g. for
configuration sharing / to override CONFIG_DEFAULT_DEVICE_TREE.
EXT_DTB is used for these extra DT blobs in verified boot scenarios.

Happy holidays!
Clemens


More information about the buildroot mailing list