nixers
OpenBSD and NetBSD kernel fonts and colors. - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Operating Systems & Administration (https://nixers.net/Forum-Operating-Systems-Administration)
+--- Forum: BSD (https://nixers.net/Forum-BSD)
+--- Thread: OpenBSD and NetBSD kernel fonts and colors. (/Thread-OpenBSD-and-NetBSD-kernel-fonts-and-colors)


OpenBSD and NetBSD kernel fonts and colors. - yrmt - 30-06-2013

What you'll be able to do:

- Change the kernel background/foreground color.
- Change the font

On NetBSD:
``—— ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1/source/sets/``
``—— get sysrc.txz``
``—— tar xf sysrc.txz /``

On OpenBSD:
``—— ftp ftp://ftp.belnet.be/pub/OpenBSD/5.3/``
``—— get sys.txz``
``—— tar xf sys.txz /``

- Then edit the config:

``—— cd /usr/src/sys/arch/i386/conf/``
``—— cp GENERIC MYKERNEL``


#Kernel Font:

- You can use [this](https://github.com/polachok/bdf2wscons) to convert bdf fonts to wscons fonts.
- You should now have a .h font. Put it in /usr/src/sys/dev/wsfont/.
- or get a few premade fonts [from my github](https://github.com/yrmt/ModdedFonts), I'm using my mod of terminus14 which I find really readable.
- Edit /usr/src/sys/dev/wsfont/wsfont.c

Code:
#ifdef FONT_<NAME><YOURxSIZE>
#define HAVE_FONT 1
#include "path/to/include"
#endif
/* Our list of built-in fonts */
static struct font *list, builtin_fonts[] = {
#ifdef FONT_<NAME><YOURxSIZE>
    { NULL, NULL, &<NAME><SIZE>, 0, 1, WSFONT_STATIC | WSFONT_BUILTIN  },
#endif

Add this line to your kernel config, for example:
``options FONT_TERMINUS6x11``
#Kernel Color:

- Change to the color you want in the kernel config:

``options WS_KERNEL_FG=WSCOL_GREEN``
``options WS_KERNEL_BG=WSCOL_BLACK``

- For example, I use:

``options WS_KERNEL_FG=WSCOL_RED``
``options WS_KERNEL_BG=WSCOL_BLACK``

# Compile!
``—— config MYKERNEL``
``—— cd ../compile/MYKERNEL``

On OpenBSD:

``—— make clean;make``
``—— make install``

On NetBSD:

``—— make depend;make``
``—— cp /netbsd /netbsd.old``
``—— cp netbsd /``

On NetBSD you can also use genfb to have a higher resolution; in /boot.cfg, add:
`` menu=Boot NetBSD:vesa 1280x800;boot netbsd``
Only on amd64, macppc and i386 architectures.


RE: OpenBSD and NetBSD kernel fonts and colors. - venam - 30-06-2013

Another useful thread!
We need more of these threads that are particularly interesting and that aim at subjects hard to find on the internet.


RE: OpenBSD and NetBSD kernel fonts and colors. - yrmt - 30-06-2013

Thank you, and yeah I'll keep on making threads with little tips like this one.


RE: OpenBSD and NetBSD kernel fonts and colors. - dcoppa - 05-07-2013

This (alternative wsfont fonts in console) is possible because OpenBSD (-current, to be shipped with 5.4) now supports KMS and framebuffer consoles on Intel GPUs, thanks to the *awesome* work of jsg@.


RE: OpenBSD and NetBSD kernel fonts and colors. - yrmt - 06-07-2013

(05-07-2013, 06:14 AM)dcoppa Wrote: This (alternative wsfont fonts in console) is possible because OpenBSD (-current, to be shipped with 5.4) now supports KMS and framebuffer consoles on Intel GPUs, thanks to the *awesome* work of jsg@.

Yeah! I mostly use genfb though.


RE: OpenBSD and NetBSD kernel fonts and colors. - yrmt - 15-09-2013

I added my Terminus12 and my Gohufont mod wscons fonts for OpenBSD and NetBSD!

Grab them [here](https://github.com/yrmt/ModdedFonts)!


RE: OpenBSD and NetBSD kernel fonts and colors. - zygotb - 15-09-2013

Someday I'll give this a try... Thanks for sharing!


RE: OpenBSD and NetBSD kernel fonts and colors. - yrmt - 15-09-2013

I'm making a version for FreeBSD so you'll be able to try it later!


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 04-03-2014

Hey yrmt thanks for that colour change wallthrough , i have forgot how i done that ... i remember i change it a few years ago , and forgot, but thanks for the reminder i will have to bookmark this page and change kernel text colours to black background and orange text.

now i have a tiny question here .. yrmt how can i compile compton on openbsd 5.5 ?


RE: OpenBSD and NetBSD kernel fonts and colors. - Mafia - 04-03-2014

(04-03-2014, 08:14 PM)cyberpunkz Wrote: Hey yrmt thanks for that colour change wallthrough , i have forgot how i done that ... i remember i change it a few years ago , and forgot, but thanks for the reminder i will have to bookmark this page and change kernel text colours to black background and orange text.

now i have a tiny question here .. yrmt how can i compile compton on openbsd 5.5 ?

Compton doesn't like OpenBSD.
That's all i'll say.


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 04-03-2014

yeah i know , i'm toying around with the source, but gah i'm not having a good time here dude.

the thing is xcompmgr would be good if it gave me shadow openbsd, and i can get shadow with other OSes using xcompmgr , i use the simular command , and no shadow gets place under the window.

gah i guess i have to live without composite :(

i wish someone can get compton to work on OpenBSD 5.5 that would be sweet!

thanks for the help anyway

Cheer!


RE: OpenBSD and NetBSD kernel fonts and colors. - Saos - 05-03-2014

(04-03-2014, 09:44 PM)cyberpunkz Wrote: yeah i know , i'm toying around with the source, but gah i'm not having a good time here dude.

the thing is xcompmgr would be good if it gave me shadow openbsd, and i can get shadow with other OSes using xcompmgr , i use the simular command , and no shadow gets place under the window.

gah i guess i have to live without composite :(

i wish someone can get compton to work on OpenBSD 5.5 that would be sweet!

thanks for the help anyway

Cheer!

I actually had a similar issue recently, but on FreeBSD. Maybe it was just me, but xcompmgr just wouldn't set drop shadows no matter what I did.
Compton, of course, did it in a single command.


RE: OpenBSD and NetBSD kernel fonts and colors. - Mafia - 05-03-2014

Yes xcompmgr does the same for me, but long ago I learned to live without composite. Threw it out the window when I first started using OpenBSD around 5.0.


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 05-03-2014

back on topic.


I don't see any sys.tar.gz for Current.

Just in 5.4

I suppose I should just wait for the 5.5 release to come out in may, and pimp up the kernel console text / colours.

:P


RE: OpenBSD and NetBSD kernel fonts and colors. - yrmt - 05-03-2014

Clone the cvs repo and compile from there.


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 05-03-2014

(05-03-2014, 11:33 AM)yrmt Wrote: Clone the cvs repo and compile from there.

aahh, thanks for the tip.

Cheers!


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 05-03-2014

nice topic, but i notice u have option"S" and its just option, and you may want to direct new user to where the kernel src is. /usr/src/sys/arch/amd64 or whatever arch/conf/
mv GENERIC to-whatever-you-want
vi NEWKERNELNAME
add the colours and if so fonts

and the rest is good.

anyhow thanks for the guide @ yrmt


RE: OpenBSD and NetBSD kernel fonts and colors. - cyberpunkz - 06-03-2014

heres a little video on howto compile the kernel source and to change the kernel text colours.

https://www.youtube.com/watch?v=3QipjwuhAFU&feature=c4-overview&list=UU9hsv9rkeV6t8MVobbngUeA

cheers!