Re: [PATCH 16/17] Documentation: Add documentation for device tree overlays

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

 



On Wed, Jun 23, 2021 at 12:37:23PM -0700, Trent Piepho wrote:
> On Tue, Jun 22, 2021 at 11:14 PM Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote:
> >
> > Hi,
> >
> > some bikeshedding incoming.
> 
> Well, while we're out here at the shed...
> 
> > Convention seems to be that attributes of the same thing are preceded by a `.', e.g.:
> >
> > global.of.overlay.dir
> > global.of.overlay.compatible
> > global.of.overlay.filepattern
> 
> This looks a lot more Barebox-like to me.
> 
> > (I think the `.' between of and overlay is not a bad idea, as we may decide to have e.g.
> >  global.of.compatible in future)
> 
> Are these only used when bootm is run? Aren't most magivars that work
> this way in the namespace "global.bootm"?
> 
> > > +``global.of_overlay_compatible``
> > > +  This is a space separated list of compatibles. Only overlays matching one of
> > > +  these compatibles will be applied. When this list is empty then all overlays
> > > +  will be applied. Overlays that don't have a compatible are considered being
> > > +  always compatible.
> >
> > Makes sense.
> 
> I've always thought the way Barebox's global.linux.bootargs.*
> variables worked was nice.  It avoids different things that add
> arguments for different reasons from interacting with each other
> trying to write to a single variable.
> 
> There's a similar process with overlays.  Some overlays are based on
> the board variant.  Then an add-on board might bring in an overlay.
> Then another overlay from a second add-on board that is unrelated to
> the 1st.  Then an overlay to configure something at boot time, like
> add an LED trigger at boot.  It's so much easier to just set or unset
> a single variable, than to need to worry about appending or removing
> or modifying a string inside a space separated list.

I see what you mean. I talked to Ahmad and I have now implemented a
filter mechanism for overlays which can be extended when a board has
the need to do so. I think the result is quite flexible and already
quite complex. I am not against using global.linux.bootargs.* style
multi variables for the filepatterns, but maybe we can leave that out
for now until somebody has a concrete need for this.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux