openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* multiple device trees
@ 2020-01-14  1:56 Brad Bishop
  2020-01-14 10:39 ` Konstantin Klubnichkin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brad Bishop @ 2020-01-14  1:56 UTC (permalink / raw)
  To: OpenBMC Maillist, James Feist

Does anyone have any experience supporting multiple system configurations in a monolithic flash image with multiple device trees?  Did you consider this and do something else instead?

thanks!

-brad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14  1:56 multiple device trees Brad Bishop
@ 2020-01-14 10:39 ` Konstantin Klubnichkin
  2020-01-14 10:52   ` Brad Bishop
  2020-01-14 19:06 ` James Feist
  2020-09-30 19:41 ` Alexander Amelkin
  2 siblings, 1 reply; 7+ messages in thread
From: Konstantin Klubnichkin @ 2020-01-14 10:39 UTC (permalink / raw)
  To: OpenBMC Maillist

[-- Attachment #1: Type: text/html, Size: 792 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14 10:39 ` Konstantin Klubnichkin
@ 2020-01-14 10:52   ` Brad Bishop
  2020-01-14 12:20     ` Konstantin Klubnichkin
  2020-01-14 18:25     ` Vijay Khemka
  0 siblings, 2 replies; 7+ messages in thread
From: Brad Bishop @ 2020-01-14 10:52 UTC (permalink / raw)
  To: Konstantin Klubnichkin; +Cc: OpenBMC Maillist



> On Jan 14, 2020, at 5:39 AM, Konstantin Klubnichkin <kitsok@yandex-team.ru> wrote:
> 
>  
> Hello, Brad!
>  
> I'm doing this using overlay DTS.
> I have a startup script that detects board type by GPIO pins and loads corresponding overlay.

Thanks for the reply Konstantin.  Does that mean you have the overlay patch applied to your kernel tree?

An alternative design that I am considering is having two complete device trees in a fit image, and u-boot reads the gpios to pick the correct dtb for linux.  Did you consider a design like that and if so, was there anything specific that sent you in the direction of overlays?

thx - brad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14 10:52   ` Brad Bishop
@ 2020-01-14 12:20     ` Konstantin Klubnichkin
  2020-01-14 18:25     ` Vijay Khemka
  1 sibling, 0 replies; 7+ messages in thread
From: Konstantin Klubnichkin @ 2020-01-14 12:20 UTC (permalink / raw)
  To: Brad Bishop; +Cc: OpenBMC Maillist

[-- Attachment #1: Type: text/html, Size: 1771 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14 10:52   ` Brad Bishop
  2020-01-14 12:20     ` Konstantin Klubnichkin
@ 2020-01-14 18:25     ` Vijay Khemka
  1 sibling, 0 replies; 7+ messages in thread
From: Vijay Khemka @ 2020-01-14 18:25 UTC (permalink / raw)
  To: Brad Bishop, Konstantin Klubnichkin; +Cc: OpenBMC Maillist



On 1/14/20, 2:53 AM, "openbmc on behalf of Brad Bishop" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of bradleyb@fuzziesquirrel.com> wrote:

    
    
    > On Jan 14, 2020, at 5:39 AM, Konstantin Klubnichkin <kitsok@yandex-team.ru> wrote:
    > 
    >  
    > Hello, Brad!
    >  
    > I'm doing this using overlay DTS.
    > I have a startup script that detects board type by GPIO pins and loads corresponding overlay.
    
    Thanks for the reply Konstantin.  Does that mean you have the overlay patch applied to your kernel tree?
    
    An alternative design that I am considering is having two complete device trees in a fit image, and u-boot reads the gpios to pick the correct dtb for linux.  Did you consider a design like that and if so, was there anything specific that sent you in the direction of overlays?

This sounds like a great design, I was also thinking in this same direction. It will avoid kernel changes for overlays.
    
    thx - brad


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14  1:56 multiple device trees Brad Bishop
  2020-01-14 10:39 ` Konstantin Klubnichkin
@ 2020-01-14 19:06 ` James Feist
  2020-09-30 19:41 ` Alexander Amelkin
  2 siblings, 0 replies; 7+ messages in thread
From: James Feist @ 2020-01-14 19:06 UTC (permalink / raw)
  To: Brad Bishop, OpenBMC Maillist

On 1/13/20 5:56 PM, Brad Bishop wrote:
> Does anyone have any experience supporting multiple system configurations in a monolithic flash image with multiple device trees?  Did you consider this and do something else instead?

We haven't thought about implementation yet, but someone on our team did 
some research into multiple dtb. In your conf file yocto lets you set 
multiple device trees:

KERNEL_DEVICETREE = "${KMACHINE}-one.dtb \
                      ${KMACHINE}-two.dtb"


Then you can pick which one to boot into in u-boot:

bootm 20080000#conf@two.dtb

At some point we were going to put some more research into this method, 
but we haven't yet.



> 
> thanks!
> 
> -brad
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: multiple device trees
  2020-01-14  1:56 multiple device trees Brad Bishop
  2020-01-14 10:39 ` Konstantin Klubnichkin
  2020-01-14 19:06 ` James Feist
@ 2020-09-30 19:41 ` Alexander Amelkin
  2 siblings, 0 replies; 7+ messages in thread
From: Alexander Amelkin @ 2020-09-30 19:41 UTC (permalink / raw)
  To: openbmc

Sorry for necroposting, but this is what we need now.

I did this previously with a non-OpenBMC system. What I did there was:

1. Make u-boot read an i2c-based FRU EEPROM, extract the 'Board Part 
Number' field and put it into a variable

2. Have the DTS files match the part numbers

3. Make u-boot `bootcmd` select the DTS based on the defined machine name

It would be nice to have such a feature built into OpenBMC for all 
platforms.

Alexander.

14.01.2020 04:56, Brad Bishop пишет:
> Does anyone have any experience supporting multiple system configurations in a monolithic flash image with multiple device trees?  Did you consider this and do something else instead?
>
> thanks!
>
> -brad

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-30 19:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  1:56 multiple device trees Brad Bishop
2020-01-14 10:39 ` Konstantin Klubnichkin
2020-01-14 10:52   ` Brad Bishop
2020-01-14 12:20     ` Konstantin Klubnichkin
2020-01-14 18:25     ` Vijay Khemka
2020-01-14 19:06 ` James Feist
2020-09-30 19:41 ` Alexander Amelkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).