[U-Boot] [PATCH] LCD: Add an option to skip registration as an stdio output

Hannes Schmelzer hannes at schmelzer.or.at
Wed Dec 2 06:29:52 CET 2015


On 12/01/2015 10:31 PM, Ayotte, Stephane wrote:

Hi Stephane,
> Thanks for the info, Hannes. I agree with you that I could have met my requirements (of showing  "applicative" output to the LCD and "technical/debug" output to the serial port) with CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE. To be totally honest, I had not seen this config and was attracted to how the video device did it.
>
> For the sake of argumentation only, I will raise the question whether CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE breaks NETCONSOLE. If I understand correctly, this config will force the console to use only the serial device. I could imagine use cases for netconsole and LCD.
>
> I'm asking the question, really, as this is just from my reading of the code. I haven't tested with netconsole.
I also read the code again and my understanding is.
First the environment is asked for stdin, stdout, stderr devices - 
afterwards overwrite_console is asked how about searching for some other 
devices.
If overwrite_console returns != 0 the devs inputdev,outputdev,errdev are 
left uninitialized / values from environment (see line 802...805 in 
common/console.c).

A few lines afterwards the fallback takes care about if NULL and assigns 
"serial" to them.

So there is no indication for me breaking netconsole.
Further i'm also using netconsole on my B&R boards, its working fine.
> My feeling is that there should be a more generic way of saying whether a device should register to stdio or not. My preference would go to an API over individual configs for each device. Neither of the two solutions are ideal nor completely implemented as this time.
>
> Anatolij, based on Hannes info, if you want to backtrack on this, I'm open both ways.
I would suggest to have not too much ways for one goal. Maybe it would 
be enough work a bit on documentation how to quiet console on LCD.
> Thanks,
> Stephane
best regards,
Hannes
> ________________________________________
> From: U-Boot [u-boot-bounces at lists.denx.de] on behalf of Hannes Schmelzer [hannes at schmelzer.or.at]
> Sent: Tuesday, December 01, 2015 12:41 PM
> To: Anatolij Gustschin; sayotte.tyco at gmail.com
> Cc: u-boot at lists.denx.de; trini at konsulko.com
> Subject: Re: [U-Boot] [PATCH] LCD: Add an option to skip registration as an stdio output
>
> hi,
>
> sorry i was absent a few days from u-boot (writing vxWorks drivers :-() ...
>
> but, do we really need this ?
>
> i had same problem on my b&r boards, were we printout something on lcd
> but console should remain on stdout/stdin.
>
> what about:
>
> int overwrite_console(void)
> {
>       return 1;
> }
>
> and activate
> #define CONFIG_SYS_CONSOLE_IS_IN_ENV
> #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
>
> should do the same i think.
>
> best regards,
> Hannes
>



More information about the U-Boot mailing list