Many Linux distributions use plymouth for bootsplash as it is written in C/C+ and integrates with the initramfs early on during the boot process.
homepage: https://www.freedesktop.org/wiki/Software/Plymouth/
Right now we use busybox' fbsplash to display the splash screens. All splash-screens are pre-generated images, so we don't need to do any font rendering. Since we need busybox in the initramfs anyway, that means we don't have any additional executable. We only need to add the pre-generated splash images to the initramfs, which are pretty small when compressed.
Plymouth seems to be quite heavy regarding dependencies (on the top right on that page):
So this would make the initramfs a lot bigger, which means that it couldn't be flashed to all devices anymore (we already had space problems and created initramfs-extra for that, where osk-sdl is in for example, but the splash screens need to be in the main initramfs so we can display an error on-screen when initramfs-extra fails to load).
Thanks for posting the idea!
If you don't have any follow up questions, it would be nice if you could close this issue.
I see, so would it be possible to just rewrite postmarketos-splash in bash/ash/sh, or even c?
If you want to go for size, then rewriting it in C would be the best method. Keep in mind that it supports a ini-like config file right now, which one can use to adjust the splash screen (see the images in #206).
While the python code is not the smallest and fastest, its advantages are that it is short and therefore easy to maintain. So if someone wants to work on that I would recommend to make sure that we don't lose the latter characteristics (e.g. by depending on a ready to use ini parser and font library instead of writing something from scratch).
EDIT: I don't think it can be done as shell script (Alpine doesn't have bash in the base installation, but busybox' ash) with the current feature set. Please correct me if that's wrong.
Well I will look into it and see what I can do.
Most helpful comment
Right now we use busybox'
fbsplashto display the splash screens. All splash-screens are pre-generated images, so we don't need to do any font rendering. Since we need busybox in the initramfs anyway, that means we don't have any additional executable. We only need to add the pre-generated splash images to the initramfs, which are pretty small when compressed.Plymouth seems to be quite heavy regarding dependencies (on the top right on that page):
So this would make the initramfs a lot bigger, which means that it couldn't be flashed to all devices anymore (we already had space problems and created
initramfs-extrafor that, whereosk-sdlis in for example, but the splash screens need to be in the maininitramfsso we can display an error on-screen wheninitramfs-extrafails to load).Thanks for posting the idea!
If you don't have any follow up questions, it would be nice if you could close this issue.