From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Ideas on U-Boot configuration with FDT
Date: Fri, 18 May 2007 11:29:39 -0400 [thread overview]
Message-ID: <464DC663.90707@smiths-aerospace.com> (raw)
In-Reply-To: <464DB7C1.4050509@freescale.com>
Timur Tabi wrote:
> Wolfgang Grandegger wrote:
>
>> - In the early boot phase, before relocation, the FDT is checked and an
>> error message printed in case it's not found or invalid:
>>
>> CPU: MPC5200 v1.0, Core v1.1 at 396 MHz
>> Bus 132 MHz, IPB 66 MHz, PCI 33 MHz
>> FDT: FDT_ERR_BADMAGIC (or OK, or version number?)
>>
>> At this level also the compatibility of the FDT tree could be checked
>> using fdt_boardcheck().
>
> I think fdt_checkboard() (or boardcheck) should be run from inside the
> fdt_open_into() command. This takes advantage of the existing mechanism
> of fdt_open_into() to return an error. It also allows for a device tree
> to be opened after U-Boot has booted.
NO. fdt_open_into() is part of libfdt, which is a _generic_ fdt
library. fdt_check_board() would be board specific and any call-out to
it from the generic libfdt would be a mistake because it would make
libfdt u-boot specific.
If we implement a fdt_checkboard(), I agree with Wolfgang that it would
be called early in the board-specific start up code.
If we implement a fdt_checkboard(), I would create a new subcommand for
it. While it could be added to the "fdt addr" command to verify the
user pointed to a valid fdt, I would strongly resist that. "UNIX was
not designed to stop its users from doing stupid things, as that would
also stop them from doing clever things." ? Doug Gwyn
<http://en.wikipedia.org/wiki/Unix_philosophy#Quotes>
The above quote is another reason for my shouting "NO" above.
>> - After relocation, the blob is copied into memory via fdt_open_into()
>> to a defined place and "fdt" is updated accordingly.
>
> So we'll need to have CFG_FDT_ADDR_FLASH and CFG_FDT_ADDR_RAM.
>
>> Not sure, what
>> location in RAM to use, but it should fit into the existing scheme.
>> Any recommendations?
>>
>> - When U-Boot is up, "fdt" points to a valid FDT, e.g. "fdt addr" is not
>> necessary.
>
> I think this feature needs to be optional. That is, if CFG_FDT_ADDR_xxx
> are defined, then we can enable this feature. Otherwise, fdt_addr will
> still be necessary. Remember, we'll still need to support architectures
> that don't have device trees.
"fdt addr" (no underscore) is the subcommand that allows the user to
change the fdt address (implementation: it sets the C variable "fdt").
I would be reluctant to remove the "addr" subcommand because the
user/scripts may want to change which fdt is used. Given Wolfgang's
thoughts/proposals above, it will not be used very often, but it would
still be useful for developers.
"fdt addr" would also be more useful if "fdt addr" printed out the
current value of the variable "fdt" (I don't believe it is implemented
this way currently).
Best regards,
gvb
next prev parent reply other threads:[~2007-05-18 15:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 9:09 [U-Boot-Users] Ideas on U-Boot configuration with FDT Wolfgang Grandegger
2007-05-18 14:27 ` Timur Tabi
2007-05-18 14:44 ` Wolfgang Grandegger
2007-05-18 14:48 ` Timur Tabi
2007-05-18 15:01 ` Wolfgang Grandegger
2007-05-18 15:01 ` Timur Tabi
2007-05-18 15:20 ` Wolfgang Grandegger
2007-05-18 15:19 ` Timur Tabi
2007-05-18 19:04 ` Wolfgang Denk
2007-05-18 15:29 ` Jerry Van Baren [this message]
2007-05-18 15:35 ` Timur Tabi
2007-05-18 16:05 ` Jerry Van Baren
2007-05-18 16:12 ` Timur Tabi
2007-05-18 16:30 ` Jerry Van Baren
2007-05-20 8:36 ` Wolfgang Grandegger
2007-05-20 9:33 ` Wolfgang Denk
2007-05-20 12:39 ` Jerry Van Baren
2007-05-20 13:05 ` Wolfgang Grandegger
2007-05-21 15:19 ` Timur Tabi
2007-05-21 16:58 ` Wolfgang Grandegger
2007-05-21 17:02 ` Timur Tabi
2007-05-21 17:18 ` Jerry Van Baren
2007-05-21 18:31 ` Timur Tabi
2007-05-21 19:38 ` Wolfgang Denk
2007-05-21 17:26 ` Wolfgang Grandegger
2007-05-21 19:34 ` Wolfgang Denk
2007-05-21 19:39 ` Timur Tabi
2007-05-21 15:23 ` Timur Tabi
2007-05-21 17:08 ` Wolfgang Grandegger
2007-05-18 19:16 ` Wolfgang Denk
2007-05-18 19:26 ` Jon Loeliger
2007-05-18 19:11 ` Wolfgang Denk
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=464DC663.90707@smiths-aerospace.com \
--to=gerald.vanbaren@smiths-aerospace.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