Serial console of 12.0-ALPHA3 fiddles with the terminal colors

Dr. Rolf Jansen rj at obsigna.com
Wed Sep 19 12:17:27 UTC 2018


> Am 27.08.2018 um 21:56 schrieb Kyle Evans <kevans at freebsd.org>:
> 
> On Mon, Aug 27, 2018 at 7:34 PM Dr. Rolf Jansen <rj at obsigna.com> wrote:
>> 
>>> Am 27.08.2018 um 20:22 schrieb Kyle Evans <kevans at freebsd.org>:
>>> 
>>> On Mon, Aug 27, 2018 at 6:09 PM Dr. Rolf Jansen <rj at obsigna.com> wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> I updated my BeagleBone Black to 12.0-ALPHA3, and now, when booting, the serial console behaves differently (I use cu from a Mac Terminal via a FDTI/USB adapter).
>>>> 
>>>> When it comes to "Loading kernel...", the terminal color is inverted, instead of maintaining the usual black on white, all over the sudden everything is displayed in white on black. And more seriously, the logging before loading the kernel, is deleted, which means I cannot see the diagnostics of the u-boot loader.
>>>> 
>>>> Is there any setting, to prevent the serial console manipulates color and content of a terminal session?
>>>> 
>>> 
>>> Hi,
>>> 
>>> You want loader_color in your loader.conf(5), which should (hopefully)
>>> disable all color while still being usable. We force the color scheme
>>> to white on black if colors are displayed because we can't necessarily
>>> sample or Q/A our color choice on all possible configurations.
>>> 
>>> I'll double check on the screen clearing... I don't recall adding any
>>> extra clears except for password prompts and (re-)drawing the menu.
>>> 
>>> Thanks,
>>> 
>>> Kyle Evans
>> 
>> Thank you for the quick reply.
>> 
>> I added loader_color="NO" and this didn't change anything. The u-boot loader diagnostics is shown in black on white, then the FreeBSD boot loader takes over, and the first thing, which it does is deleting the u-boot loader diagnostics and then it switches the background to black and the following is all white on black.
> 
> Hmm... I'll take a look at this shortly. If colors are disabled, I
> think we should be leaving colors alone (full stop), to include the
> background reset. This must be a bug that I introduced. =(
> 
>> What again is the purpose of setting the color scheme in the serial console? I understand that something shall be set on the real screen, now in a terminal window? Think about the poor people who like it green on pink, and you change it to white on black, come on :-)
> 
> I blame imp at . =) In reality, though, I don't think we had a good
> reason for not allowing it by default and moving to a world where we
> just respect loader_color simplified quite a bit that was originally
> written to check if we're writing to a serial console.

Please excuse me responding late. I was on a tight schedule.

In the meantime, I updated the BBB to FreeBSD 12.0-ALPHA6 and the issue with the terminal color changing from black on white to white on black when the kernel starts loading has gone. I only need to set loader_color=NO in /boot/loader.conf, and that's absolutely OK for me.

However, the other issue, that the kernel loader flushes the diagnostic output of the U-Boot loader is not solved. Each time the kernel loads, exactly 24 lines are flushed in the serial console above of the initial notice "Loading kernel..."

So, in case we want to see the U-Boot diagnostics, we need to have a high speed cam by hand, like in the old days when capturing quickly flowing diagnostics on the tube terminals. OK, in the moment, I got no boot problems, but occasions may come.

Best regards

Rolf


More information about the freebsd-arm mailing list