Pmbootstrap: replace postmarketos-splash with plymouth

Created on 31 Jan 2018  路  4Comments  路  Source: postmarketOS/pmbootstrap

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/

question

Most helpful comment

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):

  • cairo
  • evdev-libs
  • glib
  • libpng
  • pango

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.

All 4 comments

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):

  • cairo
  • evdev-libs
  • glib
  • libpng
  • pango

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartijnBraam picture MartijnBraam  路  6Comments

zhuowei picture zhuowei  路  4Comments

craftyguy picture craftyguy  路  6Comments

zenety picture zenety  路  5Comments

fynngodau picture fynngodau  路  3Comments