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.

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.

Thanks,
Stephane
________________________________________
From: U-Boot [u-boot-boun...@lists.denx.de] on behalf of Hannes Schmelzer 
[han...@schmelzer.or.at]
Sent: Tuesday, December 01, 2015 12:41 PM
To: Anatolij Gustschin; sayotte.t...@gmail.com
Cc: u-boot@lists.denx.de; tr...@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

On 2015-11-19 21:54, Anatolij Gustschin wrote:
> On Tue,  3 Nov 2015 11:14:49 -0500
> sayotte.t...@gmail.com wrote:
>
>> From: Stephane Ayotte <sayo...@tycoint.com>
>>
>> This patch adds an option to skip the registration of LCD stdio ouput for
>> boards that want to show different text on LCD than on serial output (or
>> the active stdout selected by the environment variable).
>>
>> Signed-off-by: Stephane Ayotte <sayo...@tycoint.com>
>> ---
>>
>> This implementation is similar to what has been added to cfb_console.c by
>> Stefan Roese <s...@denx.de> per commit 6cc7ba9e on 05/15/2009
>>
>> I am sending this patch using <sayotte.t...@gmail.com>
>> as our regular smtp server <sayo...@tycoint.com> causes patch issues.
>>
>>   common/lcd.c | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
> applied to u-boot-video/master, thanks!
>
> Anatolij
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.denx.de_mailman_listinfo_u-2Dboot&d=CwICAg&c=0YGvTs3tT-VMy8_v51yLDw&r=hKJIzptToavgYbbj9AV421mE6NXayrpl14-njwOHYSQ&m=DfAFsiSn9H0bgqbWZfUz1Iy4i-sN_4cLdZO3S4ZZwv0&s=evCiUq3rZQa24tuFptK6hotCqAjw7TISa5RrShNqBxw&e=
>
>

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.denx.de_mailman_listinfo_u-2Dboot&d=CwICAg&c=0YGvTs3tT-VMy8_v51yLDw&r=hKJIzptToavgYbbj9AV421mE6NXayrpl14-njwOHYSQ&m=DfAFsiSn9H0bgqbWZfUz1Iy4i-sN_4cLdZO3S4ZZwv0&s=evCiUq3rZQa24tuFptK6hotCqAjw7TISa5RrShNqBxw&e=

________________________________

This e-mail contains privileged and confidential information intended for the 
use of the addressees named above. If you are not the intended recipient of 
this e-mail, you are hereby notified that you must not disseminate, copy or 
take any action in respect of any information contained in it. If you have 
received this e-mail in error, please notify the sender immediately by e-mail 
and immediately destroy this e-mail and its attachments.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to