Date: Tue, 11 Sep 2018 12:02:29 +0200 From: Mateusz Piotrowski <0mp@freebsd.org> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Cc: emaste@freebsd.org, dumbbell@freebsd.org, cperciva@freebsd.org, royger@freebsd.org, nwhitehorn@freebsd.org, ed@freebsd.org, ray@dlink.ua, wblock@freebsd.org, r.fernandez-cueto@bally-wulff.de Subject: Let's improve splash screen support in vt(4) Message-ID: <CAD9iB3d2KUwY5wx01MDZXFHtC7tmTcPwjoRZgMTEvLhAZD1DkQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I'd like to improve splash screen support in vt(4) and I'm looking for your guidance and suggestions. Background ---------- As you may know, vt(4) does not support custom splash screens at the moment.[1][2][3] As splash screen could be turned on by specifying the -m flag to boot(8). It cannot be customized, however: the displayed image, its colors and size are set at compile time. Goals ----- - Support for BMP files so that they could be specified in loader.conf(5) (similarly to how it is done when using sc(4) and splash(4)). - Kernel tunables to control colors of the displayed image. Basically, I'd like to "unhardcode" colors used for vt(4) splash screens. Proposed implementation ----------------------- Unhardcoding colors seems to be an easy task: from what I understand it all boils down to adding a couple of sysctls. This way a user might choose which colors of the vt(4) color pallet should be used for the splash image. The more challenging part is getting raw data from a bitmap file in the vt(4) driver. I've done some research and I think that the easiest solution would be to use the existing splash(4) driver to extract data from a BMP file as drawing functions in vt(4) expect raw data. We could use splash(4) to load the file and put it into a C structure, which would then be accessible in vt(4) via a to-be-written interface. This approach does not feel super clean so this I decided to ask you if you've got any suggestions on how to improve this solution. Stretched goals -------------- At first I thought that adding support for 8-bit colors is not going to be a big problem. Then I found out that the vd_bitblt_bmp function expect exactly two colors (1 for foreground and 1 for background). I'll have to do more research if I want to support bitmaps with an 8-bit color depth. I'll be grateful for al suggestions, hints and pieces of advice. ---- The wiki page of this project is here: https://wiki.freebsd.org/MateuszPiotrowski/ImproveVtSplashScreenSupport Thanks & happy hacking, Mateusz [1]: https://wiki.freebsd.org/Newcons [2]: https://svnweb.freebsd.org/base/head/sys/dev/vt/vt_core.c?revision=338324&view=markup#l142 [3]: https://svnweb.freebsd.org/base/head/sys/dev/vt/vt_core.c?revision=338324&view=markup#l1373
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD9iB3d2KUwY5wx01MDZXFHtC7tmTcPwjoRZgMTEvLhAZD1DkQ>