From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Gruber Date: Mon, 24 Dec 2018 17:59:31 +0100 Subject: [Buildroot] [PATCH] boot/uboot: add support for custom DT name In-Reply-To: <20181224144759.283fe055@windsurf.home> References: <20181224131904.20891-1-kostap@marvell.com> <20181224144759.283fe055@windsurf.home> Message-ID: <20181224165931.GA25431@archibald.tuxnet> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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 > > > > 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 > > 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