public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] FDT intentions in u-boot
Date: Wed, 17 Oct 2007 13:35:21 -0400	[thread overview]
Message-ID: <471647D9.60205@ge.com> (raw)
In-Reply-To: <1192639053.7848.36.camel@gentoo-jocke.transmode.se>

Joakim Tjernlund wrote:
> On Wed, 2007-10-17 at 11:02 -0400, Jerry Van Baren wrote:
>> Zach Sadecki wrote:
>>> I have some confusion about FDT and what the intentions are for its
>>> support and usage in u-boot.
>>>
>>> From what I understand so far, u-boot only supports modifying a FDT
>>> already loaded into memory.  Isn't this kind of an odd usage of a device
>>> tree?  I thought a unique tree should be created for each hardware
>>> implementation (a.k.a. system board) and therefore you shouldn't be
>>> modifying it.  If changes are made a new device tree should be created.
>> You can only _modify_ a blob when it is in RAM.  You can store a blob in 
>> ROM (flash) and copy it to RAM for modification.
>>
>> If you don't need to modify the blob in order to boot linux, there is no 
>> need (that I'm aware of) for loading/copying it to RAM.  *However* it is 
>> unlikely that you (u-boot/linux) will be able to use an unmodified blob. 
>>   For instance, the "chosen" node is (or should be?) generated by the 
>> boot loader (u-boot) to let the kernel know about certain choices that 
>> were made by the boot loader and/or the user.
> 
> OT, but I have always wondered how the chosen node is supposed to be
> used. 

I'm not an expert, I only play on on mail lists.  My understanding is 
that the chosen node indicates to the OS what choices the user (or boot 
loader) made between possible configurations...

> Would it be possible to specify which devices in the device tree
> that should be used by the OS?

...so the answer should be "yes" but that is making the assumption that 
the OS knows enough to look in the chosen node to figure out which 
devices it should use.  *That* part is probably a bad assumption (at the 
moment).

> Supposed I got two boards that are identical, except one of them
> does not have ethernet i/f. Would it be possible use the same device
> tree for both boards, but tell OS that the ethernet i/f isn't present
> on one of the boards?

I believe the theoretical answer is "yes" but the practical answer is 
"no" for doing this via the "chosen" node.

It is simpler and safer to use libfdt to simply delete the unpopulated 
node from the tree.

> I getting a bunch of boards thats are very similiar from the OS point of
> view and I would like to just have one mega devtree and remove some
> devices at runtime or change som properties.
> 
>  Jocke

Hopefully your boards have some method of self-determining what is 
populated or not.  Alternatively, you can use the ability to load 
board-specific FDT blobs to accomplish this.

Wolfgang Grandegger and Delev Zundel actually created a "universal" 
u-boot that was configured *itself* via a FDT blob (OK, it wasn't 
universal, but it sounds so good).  If your board isn't self-aware of 
its configuration, that would be an interesting path to go down.

gvb

  reply	other threads:[~2007-10-17 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17  7:12 [U-Boot-Users] [PATCH 1/2] add ft_cpu_setup(..) on mpc8260 Sergej Stepanov
2007-10-17  7:47 ` Wolfgang Denk
2007-10-17 14:34 ` [U-Boot-Users] FDT intentions in u-boot Zach Sadecki
2007-10-17 15:02   ` Jerry Van Baren
2007-10-17 16:37     ` Joakim Tjernlund
2007-10-17 17:35       ` Jerry Van Baren [this message]
2007-10-18 13:54     ` Zach Sadecki
2007-10-18 19:29       ` Jerry Van Baren
2007-10-18 22:08         ` Haavard Skinnemoen
2007-10-18 22:43           ` Jerry Van Baren
2007-10-23 19:34 ` [U-Boot-Users] [PATCH 1/2] add ft_cpu_setup(..) on mpc8260 Scott Wood
2007-10-24  7:28   ` Sergej Stepanov

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=471647D9.60205@ge.com \
    --to=gerald.vanbaren@ge.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