public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Curt Brune <curt@cumulusnetworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Selecting from multiple device trees at runtime
Date: Mon, 07 Jan 2013 11:44:07 -0800	[thread overview]
Message-ID: <50EB2587.9020905@cumulusnetworks.com> (raw)
In-Reply-To: <50EB15C6.3080101@wwwdotorg.org>



On 01/07/2013 10:36 AM, Stephen Warren wrote:
> On 01/07/2013 11:01 AM, Curt Brune wrote:
>> Hello,
>>
>> I am following up on this thread:
>> "Merging device trees at runtime for module-based systems"
>> http://lists.denx.de/pipermail/u-boot/2012-November/139618.html
>>
>> I do not have a modular based system, so I do not need the full
>> flexibility of merging DT fragments at runtime.  However, I am very
>> interested in being able to select a full DT from a list of DT's at
>> runtime.  I believe this is a degenerate case of the more general N x M
>> modular case.
>>
>> The background:  I have a number of different platforms running u-boot.
>>   They all use the same Linux kernel and initramfs, but different DT.
>>
>> What I would love is to have a single multi-file uImage I could use on
>> all my platforms.  The idea is to introduce a new image type that is a
>> list of device tree blobs.
>>
>> The uImage would contain a list of dtb's and u-boot would select the
>> correct one at runtime.  u-boot could iterate through the list
>> inspecting the "model" property of the  root node.
>
> For this scenario, why not just put each DTB file into the file-system
> under a separate name, and use U-Boot's board variable to select the
> correct one at run-time, e.g.:
>
> ext2load ${devtype} ${devnum}:${rootpart} ${kernel_addr_r} /boot/zImage
> ext2load ${devtype} ${devnum}:${rootpart} ${fdt_addr_r} \
> 	/boot/${soc}-${board}.dtb
> bootz ${kernel_addr_r} - ${fdt_addr_r}
>

That is a good idea, except for one small wrinkle I forgot to include in 
the use case -- the platforms I am using arrive from the vendors with 
u-boot installed and nothing else.  All I can count on is a u-boot in 
the NOR flash and an uninitialized mass storage device.

The uImage with all the dtb's I'm thinking of is an installer that would 
provision the mass storage device and bootstrap our software.  After 
that step I could use your idea for subsequent boots.

I would like all my vendors to adopt a u-boot feature whereby I can use 
a single installer uImage without defining how the mass storage device 
should be partitioned.

Cheers,
Curt

  reply	other threads:[~2013-01-07 19:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 18:01 [U-Boot] Selecting from multiple device trees at runtime Curt Brune
2013-01-07 18:36 ` Stephen Warren
2013-01-07 19:44   ` Curt Brune [this message]
2013-01-07 20:12 ` Wolfgang Denk
2013-01-07 22:21   ` Curt Brune
2013-01-08  3:16     ` Simon Glass
2013-01-08 16:42       ` Stephen Warren
2013-01-08 16:51         ` Simon Glass
2013-01-08 17:37           ` Stephen Warren
2013-01-08 17:58             ` Simon Glass
2013-01-08 22:37               ` Stephen Warren
2013-01-08 22:47                 ` Simon Glass
2013-01-09  1:40                 ` Curt Brune

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50EB2587.9020905@cumulusnetworks.com \
    --to=curt@cumulusnetworks.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox