[U-Boot] [PATCH v4 8/8] sandbox: Add basic command line parsing

Mike Frysinger vapier at gentoo.org
Mon Feb 27 05:08:31 CET 2012


On Sunday 26 February 2012 21:50:32 Simon Glass wrote:
> Given your efforts on the cmdline parsing I'm beginning to think we
> should perhaps add os_printf() and os_printf_stderr() and provide an
> explicit interface. It might only be useful prior to main(), then
> again I'm not so sure.

i've been pondering this.  on one hand, we want to parse flags as soon as 
possible, but on the other, we want to be able to not have to worry about what 
state the system is in when parsing things.  maybe we specially mark the few 
flags that we need very early on and parse those, and then parse the rest once 
the system is mostly functional ?  i can really only think of one or two flags 
that we *might* need very early -- namely, ones that'd select a config or fdt.  
on the other hand, are there things that we'd want to change that'd affect 
everything from console_init_f() and earlier ?

wrt os_printf/etc..., the only way we could do that is if we dlopen-ed glibc 
and called the symbol directly.  u-boot provides printf() so we can't have an 
os_printf() in os.c call printf() in glibc simply because we included stdio.h 
from glibc.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120226/08fca64c/attachment.pgp>


More information about the U-Boot mailing list