[U-Boot-Users] [PATCH] of dump command

Wolfgang Denk wd at denx.de
Mon Oct 30 23:22:51 CET 2006


Dear Grant,

thanks a lot for your thorough comments.

In message <528646bc0610300943j5752c2c7i9b66864ec678a86e at mail.gmail.com> you wrote:
> 
> These should probably be split up into separate patches.  One for the
> vsprintf 'll' support; one for the new command and one for the
> MPC8260ADS config changes.

Agreed. Eventually these are separate commits in Jerry's repo anyway.
Jerry?

> This is not a lot of code; and it's pretty useful stuff; maybe just
> make it automatically built when CONFIG_OF_FLAT_TREE is defined?
> (Rather than adding a new CONFIG_COMMANDS macro at the moment)

Agreed.

> If a new CFG_CMD_ macro set is needed; I wouldn't do it now.  There is
> still 1 bit left.  :)  If it needs to be changed, it might make sense
> to audit the full list and see if there is anything that should be
> removed.
> 
> Wolfgang needs to weigh in on this one.

I think we need a major cleanup of the config system, so I would like
to touch as few things in this area as possible. Here, I  agree  with
Grant  that  this  should  be  just  compiled  in when OFT support is
enabled. Probably everybody will want this.

> > +U_BOOT_CMD(
> > +       of,     3,      0,      do_of,
> > +       "of      - Open Firmware utility commands\n",
> > +       "of <addr>        - Dump the address as an OF tree\n"
> > +       "of <addr> <prop> - Dump the given property\n"
> > +);
> 
> I think 'of' is a bit terse.  Maybe "ofinfo", "ofdump", or "ftinfo"?

Additionally, I think that "of" [= Open Firmware] is wrong. It should
be "oft" [Open Firmware Tree] at least. The command  should  IMHO  be
named "oftdump", but "ftdump" [FT = Flat Tree] would be ok, too.

> > + * Used by ft_dump_blob() and ft_get_prop() to build up property names
> > + */
> > +static char path[256], prop[256];
> 
> Is moving these out of ft_get_prop truly necessary?  (I haven't dug
> into the full context, but seeing this makes me scared)

Me too :-)

> There's still one more bit left in CFG_CMD_ALL; just use it!  :)
> 
> Or eliminate CFG_CMD_OF entirely.

That's what I'd suggest.


Thanks again, to both of you.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>  Is there a way to determine Yesterday's date using Unix utilities?
         echo "what is yesterday's date?" | /bin/mail root
         -- Randal L. Schwartz in <ukbuh2y982.fsf at julie.teleport.com>




More information about the U-Boot mailing list