[U-Boot] Inconsistency between $filesize and commands which accept numeric params

Tom Rini trini at ti.com
Tue Nov 4 21:58:00 CET 2014


On Tue, Nov 04, 2014 at 09:53:02PM +0100, Wolfgang Denk wrote:
> Dear Ian,
> 
> In message <1415116135.11486.51.camel at hellion.org.uk> you wrote:
> >
> > > > /*
> > > >  * Parse the user's input, partially heuristic.  Valid formats:
> > > >  * <0x00112233 4 05>	- an array of cells.  Numbers follow standard
> > > >  *			C conventions.
> > > >  * [00 11 22 .. nn] - byte stream
> > > >  * "string"	- If the the value doesn't start with "<" or "[", it is
> > > >  *			treated as a string.  Note that the quotes are
> > > >  *			stripped by the parser before we get the string.
> > > > 
> > > > which is inconsistent with the "U-Boot uses hex input base by default"
> > > > mantra.
> > > 
> > > Because this is FDT centric and not U-Boot centric, yes?
> > 
> > I guess?
> 
> Well, we probably should not use this FDT centric decoding function
> directly on arguments passed from the U-Boot command line.

No, look again at what we're doing.  We're not calling a U-Boot function
to do U-Boot things.  We're calling a U-Boot function to set a DT
property.  U-Boot needs to obey DT conventions here.

I can see an argument that we could try and make the heuristics smarter
to add '0x' to obvious hex strings, but that'll just cause crazier
errors when 0x1000 is passed in and seen as 1000 decimal.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141104/d3e4cbd6/attachment.pgp>


More information about the U-Boot mailing list