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

Clemens Gruber clemens.gruber at pqgruber.com
Fri Feb 15 15:04:17 UTC 2019


Hi Thomas,

On Sun, Feb 03, 2019 at 08:49:50PM +0100, Thomas Petazzoni wrote:
> Hello Clemens, Kostya,
> 
> On Mon, 24 Dec 2018 17:59:31 +0100
> Clemens Gruber <clemens.gruber at pqgruber.com> wrote:
> 
> > 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.
> 
> I thought a bit about this. U-Boot in fact has tons of environment
> variables to tweak stuff. Instead of adding explicit options for each
> of them, perhaps we should simply add an option that allows to pass
> arbitrary environment variables to the U-Boot build. Something long the
> lines of:
> 
> config BR2_TARGET_UBOOT_CUSTOM_ENVVARS
> 	string "additional environment variables"
> 	help
> 	  ...
> 
> UBOOT_MAKE_OPTS += $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_ENVVARS))
> 
> Not only this would allow to support more than EXT_DTB and DEVICE_TREE,
> but other variables. In addition, what worries me about EXT_DTB and
> DEVICE_TREE as individual options is that the semantic is hard to
> explain. Both are device trees, but they don't serve the same purpose.
> 
> Thoughts ?

Sounds good to me! And it's future-proof.

Thanks,
Clemens


More information about the buildroot mailing list