[U-Boot] [PATCH 1/2] console: Support board-specific early console

Simon Glass sjg at chromium.org
Tue Mar 24 00:38:45 CET 2015


Hi,

On 20 March 2015 at 10:55, Wolfgang Denk <wd at denx.de> wrote:
> Dear Thierry,
>
> In message <1426851034-29393-1-git-send-email-thierry.reding at gmail.com> you wrote:
>>
>> This is mostly useful for debugging the early boot process. Often boards
>> can provide some low-level code that outputs a character on some debug
>> port prior to passing the early setup code. Allow boards to implement an
>> early_putc() function that will be used to redirect printf() and friends
>> to this debug port until the proper console becomes ready.
>
> Hm... it is one of the basic design principles of U-Boot to provide
> debug output on the console as soon as possible.  It should be the
> primary purpose of low level initialization to enable console output,
> before anything else.
>
> Now you say, you have output even before that - this aears to be a
> contradiction to me.  If you can output characters, then use this as
> your console.  I feel we should not need any special configuration
> options to do what we should do anyway.
>
> Or am I missing somthing?

I agree we need to set things up so that the console can work as early
as possible. With boards that support driver model, until that is
running we have no serial, so I think we are talking about the time
between entering U-Boot and console_init_f(). This has always been a
bit of an issue.

I wonder if we can use the debug UART stuff (as Tom mentioned) but
enhance it to support printf()? We could plumb the console into that
perhaps? This is a little like CONFIG_PRE_CONSOLE_BUFFER.

It would be nice if it were seamless.

Regards,
Simon


More information about the U-Boot mailing list