To see a splash screen as you open Gentoo, you
need something called the 'frame buffer'...this is basically a driver
which has the ability to display video from the text-only console.
This's usually generic and not accelerated, i.e. does not take up the
unique features of the graphic chip, although we do have a bit of
acceleration or device dependent framebuffers.
Framebuffers are involved in making of the console
(or Ttys), since Fbs also have a resolution and you can even set the
resolution, consoles too have a resolution which can be set by
passing kernel parameters. The parameters dependents on the FB
driver.
Different framebuffer -- Vesa, Userspace-vesa
(generic Fbs), radeonfb, radeondrmfb, inteldrmfb etc....
So first you need to compile your kernel with
support of some FBs.
If you're using KMS, you don't need to mark any
framebuffer, KMS provides it's own framebuffer. Once the DRM modules
load, a FB is provided. If you have compiled the kernel with other
Fbs, it'll replace the FB with it's own. This KMS FB is hardware
specific and fast. You cant use both KMS FB and other FBs -- only 1
will work.
The mandatory sections to be selected in kernel
are -
CONFIG_FB (in Device drivers>graphs support).
In that, select -
CONFIG_FIRMWARE_EDID
(Support for frame buffer devices>Enable firmware EDID)
you can select which frame buffer support you will
compile in -
*** Frame buffer hardware drivers ***
(not required if you're a KMS user)
If you wanna use vesafb, mark it.
In “Console display driver support” which is
in Graphs support -
Support for the Framebuffer Console Decorations
(CONFIG_FB_CON_DECOR) -- this option wont be available until you
apply the fbcondecor patch or install gentoo-sources. Get it from -
Apart from these, select
VGA text console (CONFIG_VGA_CONSOLE)
CONFIG_VGA_CONSOLE (Framebuffer Console support)
Map the console to the primary display
(CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY)
Disable “Enable Tile Blitting Support”
(CONFIG_FB_TILEBLITTING)
Which is in Support for frame buffer devices.
Compile and install the kernel.
Now emerge splashutils with fbcondecor,
png and truetype USE flags enabled.
Splashutils
is a cross distro method to implement splash screen, but it requires
an init script but only if you want userspace splash, thus this needs
to be made for every fundamental distro.
Splashutils
requires some kind of framebuffer to be present to work -- any will
work, it has the ability to start from the initrd.
Splashutils
themes are set in 2 options, one verbose where you will get some
sorta decoration with the output messages (a decorated console), and
the other silent...windows and Ubuntu style.
Splashutils
can start from 2 modes -- one initrd, where it start right from the
beginning and the other from userspace, i.e. it start after init has
started. Thus an initrd is completely optional but you don't get
early bootsplash.
This
packages give you 2 main applications -
splash_geninitramfs
and splash_manager
There
are various themes available in portage -
media-gfx/splash-themes-gentoo,
media-gfx/splash-themes-livecd and media-gfx/bootsplash-themes
All
themes will be placed in /etc/splash...with their names same as the
folders in this directory. Each theme supports different resolutions,
most common being 1024x768.
You
have to append the following lines in the kernel parameters to
configure the FB you intend to use and also define which mode will
the splash screen work on, silent or verbose. Apart from this, you
also have to define what theme to use (optional for userspace
splashscreen).
video=
splash=,theme: console=tty1
Out
of this, only splash= option is necessary even if you're using the
splashscreen that starts after init. Otherwise if the splash start
from init, everything is necessary.
Depending
on what FB drivers you use, you will have to modify the video=
option, I.e apart from specifying the video driver, you have to
specific options for the FB driver. From here you can set the
resolution of the FB console too.
With
vesafb, you have to specify the resolution with various options.
These are the defaults and safe -
video=vesafb:mtrr:3,ywrap
vga=
The
options for vga are (numbers of 3 digits) -
|
320
×
200
|
640
×
400
|
640
×
480
|
800
×
500
|
800
×
600
|
896
×
672
|
1,024
×
640
|
1,024
×
768
|
1,152
×
720
|
1,280
×
1,024
|
1,400
×
1,050
|
1,440
×
900
|
1,600
×
1,200
|
1,900
×
1,200
|
16 colors
|
|
|
|
|
770
|
|
|
772
|
|
774
|
|
|
|
|
256 colors
|
|
768
|
769
|
879
|
771
|
815
|
874
|
773
|
869
|
775
|
835
|
864
|
796
|
893
|
15-bit (5:5:5)
|
781
|
801
|
784
|
880
|
787
|
816
|
875
|
790
|
870
|
793
|
|
865
|
797
|
|
16-bit (5:6:5)
|
782
|
802
|
785
|
881
|
788
|
817
|
876
|
791
|
871
|
794
|
837
|
866
|
798
|
|
24-bit (8:8:8)
|
783
|
803
|
786
|
882
|
789
|
818
|
877
|
792
|
872
|
795
|
838
|
867
|
799
|
|
32-bit (8:8:8)1
|
|
804
|
809
|
883
|
814
|
819
|
878
|
824
|
873
|
829
|
|
868
|
834
|
|
As
copied over from wiki.
If the number is wrong, the kernel will
notify.
e.g.
-
video=vesafb:mtrr:3,ywrap
vga=795 splash=silent,theme:Cynapses console=tty1
With
KMS FB, you have to specify only the resolution with option refresh
rate as such -
Where
-24 is the refresh rate.
or
simply video=1280x1024
The
console= option should be set to tty1 (when using initrd based
splash) otherwise you will not be able to see the splash.
To
preview a theme -
splash_manager
--theme=one of the themes in /etc/splash --cmd=set --tty=.
Notice,
for the theme to work, the console should be at the right resolution.
This
program (splash_manager) revolves around a command -- the command is
the task that need to be done, either display, set, demo etc....
themes. To specify the command, do it with the --cmd=
option.
The
command 'list' displays all the splashes available with resolutions.
'set' displays the decoration of the console and 'demo' will give a
demo of the boot screen.
After
you have decided what theme you'll use, you have to generate the
initial ram image; if you're using initrd based splash, this's not
required.
splash_geninitramfs
--res --generate .
The
--verbose option is useful for debugging.
Each
theme supports different resolutions. The resolutions are in the
directory /etc/splash/. You can also check it out
using the --cmd=list command of splash_manager (as stated before).
If
you want to copy the theme to an existing image -
splash_geninitramfs
--res 1600x1800 --copy
If
you already have a theme in the initial ram image archive, you might
just like to append the new theme -
splash_geninitramfs
--res 1600x1800 --append
Now
you can see the reason behind the theme: kernel
parameter, this specifies what splash to use during boot of the
multiple available in the kernel.
Also
notice, for initrd based splash to work, all the correct kernel
modules which're required to make the framebuffer should be built
into the kernel or should be there in the initramfs. Also the
resolution should be perfect from start.
Userspace
splash -
For
userspace splash you have to start the service fbcondecor, for
automatic startups, add it to the boot or sysinit runlevel. You don't
need to do this for init based splash... neither you have to
configure the service configurations.
The
configuration of this service is done from the conf.d directory and
the fbcondecor file. Read the comments in it to configure. The splash
style (verbose or silent) is read from the kernel's parameters.
Apart
from this, you have to see the file /etc/conf.d/splash for further
configuration and the theme you wanna load. It's configuration is
mandatory.