[FreeBSD] Kernel fonts and colors. - BSD
Users browsing this thread: 3 Guest(s)
|
|||
These changes require you to recompile your kernel.
- Change the colors, add this to your kernel configuration. options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK) options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED) This will set a light red kernel foreground output and black background. If you want to emulate NetBSD colors, use a green foreground :P colors are from a raw palette in C. ( u_char palette[256 * 3]; (syscons.h) - Change the kernel font, add this in your kernel configuration: options SC_DFLT_FONT makeoptions SC_DFLT_FONT=iso15-thin I wanted to have a thin font for kernel messages. It failed the first time I ran it, saying I didn't have a font.h. We'll generate the font manually. I found the part talking about our font.h missing in the kernel source: (/usr/src/sys/conf/files.i386) -- change this: font.h optional sc_dflt_font \ compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'static u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'static u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # -- to this: font.h optional sc_dflt_font \ compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h" \ no-obj no-implicit-rule before-depend \ #clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # Now we must generate the font.h file with the instructions found above: uudecode < /usr/share/syscons/fonts/iso15-thin-8x16.fnt > ~/font.h then we convert this file to a c file: file2c 'static u_char dflt_font_16[16*256] = {' '};' < iso15-thin-8x16 > font.h then we can move the font.h file to /usr/src/sys/dev/syscons and compile the kernel. The font won't look as thin as normally because the framebuffer size during boot is fixed at 640x380 but it still looks much nicer. |
|||
Messages In This Thread |
[FreeBSD] Kernel fonts and colors. - by yrmt - 16-08-2012, 12:58 PM
RE: [FreeBSD] Kernel fonts and colors. - by CrossFold - 16-08-2012, 05:26 PM
RE: [FreeBSD] Kernel fonts and colors. - by yrmt - 16-08-2012, 05:48 PM
RE: [FreeBSD] Kernel fonts and colors. - by ducpfp - 01-09-2012, 05:26 AM
RE: [FreeBSD] Kernel fonts and colors. - by yrmt - 01-09-2012, 08:15 AM
RE: [FreeBSD] Kernel fonts and colors. - by ducpfp - 02-09-2012, 05:55 AM
RE: [FreeBSD] Kernel fonts and colors. - by yrmt - 02-09-2012, 07:42 AM
RE: [FreeBSD] Kernel fonts and colors. - by yrmt - 26-12-2012, 02:00 AM
|