Hi Mike,

On Fri, Jan 20, 2012 at 11:00 AM, Mike Frysinger <vap...@gentoo.org> wrote:
> On Tuesday 10 January 2012 19:45:50 Simon Glass wrote:
>> In order to pass command line arguments to sandbox we need to be able
>> to act on them. So take control back at the end of board_init_r() from
>> where we can call the main loop or do something else.
>
> does this need to be done this early ?  parsing args can easily be done inside
> main() (as i showed in my patch that added command line support).

My thought here is that I would like the command line to influence
U-Boot right from the start, before board init. If we don't know our
parameters until then, then we might do something we shouldn't. For
one thing, if the arguments are --help then we are wasting our time.

One little niggle is that it isn't really possible at present to call
printf() too early. I have left it along for now, and just come back
later and print usage, but it *might* be necessary at some point to
implement os_printf() or similar to allow messages from Sandbox.

>
> in terms of processing the state, i think we can just make this into an init
> func that runs before we let board_init_r tail into main_loop

Well the requirement may be that we don't even want to run main_loop -
see the next patch.

> -mike

Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to