Re: putchar in boot1.c adds extra blank lines on Xilinx ZYNQ board with U-boot 2020.04
Date: Sun, 29 May 2022 15:03:56 UTC
On Sun, May 29, 2022, 7:56 AM Christopher Bowman <crb@chrisbowman.com>
wrote:
> Looking at /usr/src/stand/efi/boot1/boot1.c
>
> The bottom of the file has:
> void
> putchar(int c)
> {
> CHAR16 buf[2];
>
> if (c == '\n') {
> buf[0] = '\r';
> buf[1] = 0;
> ST->ConOut->OutputString(ST->ConOut, buf);
> }
> buf[0] = c;
> buf[1] = 0;
> ST->ConOut->OutputString(ST->ConOut, buf);
> }
>
> On my platform this results in an extra blank line after each new line.
>
> I’m running on a Xilinx ZYNQ board with U-boot 2020.04.
>
> Does this blank line show on other platforms too? If so is this the
> desired functionality? Perhaps it’s needed for serial consoles to work
> right?
> I’m running locally with the if statement completely removed and that
> fixes the extraneous blank lines I see.
>
No other platform does that... in fact, no carriage return would mess up
other platforms. It's needed everywhere for all kinds of consoles.
Warner
Warner
> Regards,
> Christopher
>