From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Sun, 3 Feb 2019 20:49:50 +0100 Subject: [Buildroot] [PATCH] boot/uboot: add support for custom DT name In-Reply-To: <20181224165931.GA25431@archibald.tuxnet> References: <20181224131904.20891-1-kostap@marvell.com> <20181224144759.283fe055@windsurf.home> <20181224165931.GA25431@archibald.tuxnet> Message-ID: <20190203204950.1b9da757@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello Clemens, Kostya, On Mon, 24 Dec 2018 17:59:31 +0100 Clemens Gruber 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 ? Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com