public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Ideas on U-Boot configuration with FDT
@ 2007-05-18  9:09 Wolfgang Grandegger
  2007-05-18 14:27 ` Timur Tabi
  0 siblings, 1 reply; 32+ messages in thread
From: Wolfgang Grandegger @ 2007-05-18  9:09 UTC (permalink / raw)
  To: u-boot

Hello,

here are my ideas on what is basically necessary to use FDT for U-Boot 
configuration. I tried to keep it simple:

- If CFG_FDT_ADDR is defined in the boards configuration file, the
   global variable "fdt", already used by the FDT command, will be set
   at compile time to that address:

     #ifdef CFG_FDT_ADDR
             struct fdt_header *fdt = CFG_FDT_ADDR;
     else
             struct fdt_header *fdt = NULL;
     #endif

- 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().

- After relocation, the blob is copied into memory via fdt_open_into()
   to a defined place and "fdt" is updated accordingly. 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 the basic mechanism should also work _without_ FDT commands
   (cmd_fdt.c, getting ride of quit some code).

- bootm should then automatically use the address of "fdt" to boot the
   kernel.

Some more comments. I realized rather heavy consistency checks on almost 
any public FDT function via fdt_check_header. I actually would prefer to 
have one extended check function at the beginning, which also ensures 
the compatibility with the board and reduce the other checks to just 
verify the magic number.

Other related issues? Do we also need to maintain a checksum of the 
blob? At least it's on Jerry's to-do list.

What do you think? I'm going to show a first patch soon.

Wolfgang.

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

end of thread, other threads:[~2007-05-21 19:39 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox