Re: [PATCH 0/6] Extend fdt_overlay_apply() to allow merge of overlay blobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Mar 19, 2018 at 02:58:28PM +0100, Maxime Ripard wrote:
> On Mon, Mar 19, 2018 at 11:20:19AM +0530, Srivatsa Vaddagiri wrote:
> > * Maxime Ripard <maxime.ripard@xxxxxxxxxxx> [2018-03-18 19:09:16]:
> > 
> > > > In addition to compiling DT code outside core kernel tree, we also want to merge
> > > > the blobs back to respective blobs found in kernel build tree (soc.dtb or
> > > > boardX.dtbo), as otherwise relying on bootloader to do all the overlay impacts
> > > > boot-time.
> > > > 
> > > > This brings up the need to merge two overlay blobs (fingerprint-overlay.dtbo +
> > > > boardX.dtbo), which currently doesn't seem to be supported and which this patch
> > > > series aims to support.
> > > 
> > > If I understood you right, you want in your "feature" overlay to
> > > depend on nodes that are only defined in your board overlay?
> > 
> > Actually the feature overlay can depend on nodes that are both in soc dtb and
> > board overlay. To explain this further, feature overlay can be split into two
> > portions:
> > 
> > feature-soc.dts -> this part represents feature DT code that is common across
> > all board configuration using given SOC. This will attempt to changde nodes
> > found only in soc.dts
> > 
> > feature-boardX.dts -> this part represents feature DT code that is specific to a
> > given board . It can attempt to change nodes in both boardX.dts as well as
> > soc.dts
> > 
> > We could compile both feature-soc.dts and feauture-boardX.dts as
> > feature-soc.dtbo/feature-boardX.dtbo respectively and overlay them one after
> > other at runtime (in bootloader), but that introduces impact to boot-time. This
> > is the reason why we want to merge offline at compile time.
> > 
> > feature-soc.dtbo needs to merge with soc.dtb (found in kernel obj tree)
> > feature-boardX.dtbo needs to merge with boardX.dtbo (found in kernel obj tree)
> 
> Right, but then, you just depend on something that is already depend
> on something in the base tree (whether the base tree is just a single
> tree or the aggregation of a base tree and previously applied
> overlays).
> 
> > > If so, why not simply merge the __symbols__ node when we apply an
> > > overlay with the base tree, and just call fdt_apply_overlay as many
> > > times as needed?
> > 
> > Not sure if I follow you here. Please see my comment on not wanting
> > to merge feature DTBOs at runtime in bootloader.
> 
> fdtoverlay also allow you to build a single blob at build time.

Um.. it does?  AFAICT it's just a simple wrapper around the
fdt_overlay_apply() function and won't merge overlays.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux