sil2100//vx developer log

Welcome to my personal web page


Plymouth bits

Quite recently I had the need and 'pleasure' of playing around with the Plymouth bootsplash. For those that don't know, Plymouth is an application which runs very early during the boot process and displays either textual or graphical boot animation, hiding the actual boot process in the background. There isn't much documentation available on the configuration and installation process - usually this is done by system distributors, not users themselves. As noted on the homepage, Plymouth isn't really designed to be built from source by end users. You can find some basic howto's around the internet, but today I would like to concentrate on the few bits that are harder to find.

2011-12-29 16:27

For Plymouth to work correctly, it needs to be included in the initial ramdisk of the kernel (initrd/initramfs) - since we want the bootsplash to appear even before the actual filesystem is available. After building/cross-compiling Plymouth to the platform of interest, all that is left is installing it to the initial filesystem.

The source package for Plymouth has an INSTALL file with some basic information on how to configure, build Plymouth, prepare the initramfs and how to proceed in the init scripts with running plymouth during the boot process.

In Ubuntu based systems, the plymouth and initramfs-tools packages provide some interesting tools for this in the /usr/share/initramfs-tools directory. The hooks/plymouth script can be used for installing the necessary plymouth files into the selected initramfs directory from the currently working system (this can be done, for instance, by a DESTDIR="/initramfs" hooks/plymouth call). This hook copies all libraries for both the text and graphical themes that are currently selected in the system. The script is also an useful hint as to which files are needed.
On the other hand, the scripts/ subdirectory includes some Plymouth initialization scripts used by the Ubuntu initramfs. Look into the scripts/init-top/plymouth, scripts/init-bottom/plymouth and scripts/panic/plymouth files for more information.

After preparing the initramfs, there are a few things that are useful to know (thanks Steve Langasek for clearing up things for me!):

The last thing is important when for some reasons we cannot fit all these libraries in our initramfs. For instance, the ubuntu-logo theme available in the Ubuntu repositories - besides the actual graphical theme, also many many X and font libraries are installed. All of which weight additional megabytes. These are required by the plugin, which is responsible for displaying text messages during the boot phase. It is used when an error appears and the user needs to be notified or prompted for interaction. If such features are not required, the, fonts and its dependencies (most of which are installed in /usr/lib and /usr/share in the initramfs directory) can be omitted. All that is required are the core graphics libraries and renderers.
For instance, in the case of ubuntu-logo, the required files would be: ubuntu-logo/*,, renderers/*, ubuntu-logo.png and the like.

I think I'll play around with creating custom themes for Plymouth in my free time, since it seems quite easy. For now, I still have some work to do in other projects. I seem to be so busy lately - and this flu certainly isn't helping either. There might be one a short Haiku related post coming up in the nearest days. Hope you'll enjoy it!