Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 2021 10:07:34 +0200
From:      Toomas Soome <tsoome@me.com>
To:        Rozhuk Ivan <rozhuk.im@gmail.com>
Cc:        freebsd-current@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: Terminal colours in current
Message-ID:  <948C1DBA-4CC3-492D-BC9E-5E6502772667@me.com>
In-Reply-To: <20210102082549.758bd189@rimwks.local>
References:  <20210102082549.758bd189@rimwks.local>

index | next in thread | previous in thread | raw e-mail



> On 2. Jan 2021, at 07:25, Rozhuk Ivan <rozhuk.im@gmail.com> wrote:
> 
> Hi!
> 
> I am tring current and found that kernel options:
> options		TERMINAL_NORM_ATTR	= (FG_GREEN|BG_BLACK) # def to SC_NORM_ATTR / 2 | 0x00
> options		TERMINAL_KERN_ATTR	= (FG_YELLOW|BG_BLACK) # def to SC_KERNEL_CONS_ATTR / 14 / 0x00
> does not work anymore.
> 
> Fast greping sources give me loader tunables:
> teken.fg_color="2"		#
> teken.bg_color="0"		#
> 
> but these optios does not allow set kernel messages colour.


At this time, both TERMINAL_NORM_ATTR and TERMINAL_KERN_ATTR are set based from teken.fg_color and teken.bg_color, to get  consistent console while transitioning from loader to kernel.


> 
> https://www.freebsd.org/cgi/man.cgi?query=vt&apropos=0&sektion=4&manpath=FreeBSD+13.0-current&arch=default&format=html
> say that TERMINAL_NORM_ATTR and TERMINAL_KERN_ATTR should work.
> Also it say that I should have:
>     kern.vt.color.<colornum>.rgb="<colorspec>"

This one is option to override RGB values for color identified by colornum. FreeBSD console is only supporting colors 0-7 there (see sys/terminal.h). However, this feature is only available for framebuffer console (not vga graphics or text).

>     kern.vt.fb.default_mode="<X>x<Y>"
>     kern.vt.fb.modes.<connector>="<X>x<Y>"

Those two affect KMS driver (if set).

> but I only get:
> kern.vty: vt
> kern.vt.splash_cpu_duration: 10
> kern.vt.splash_cpu_style: 2
> kern.vt.splash_ncpu: 0
> kern.vt.splash_cpu: 0
> kern.vt.kbd_panic: 0
> kern.vt.kbd_debug: 0
> kern.vt.kbd_reboot: 0
> kern.vt.kbd_poweroff: 0
> kern.vt.kbd_halt: 0
> kern.vt.suspendswitch: 0
> kern.vt.deadtimer: 15
> kern.vt.debug: 0
> kern.vt.enable_bell: 0
> kern.vt.enable_altgr: 1
> 
> 
> Do I miss something?
> 

In current, You should get console colors as set in loader. 

rgds,
toomas



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?948C1DBA-4CC3-492D-BC9E-5E6502772667>