You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.7 KiB

  1. Plymouth isn't really designed to be built from source and get installed by end users. For it to work correctly, it needs integration with the distribution. Because it starts so early, it needs to be packed into the distribution's initial ram disk, and the distribution needs to poke plymouth to tell it how boot is progressing.
  2. Unfortunately, there isn't great documentation for distributors. In the mean time, this email exchange might be useful:
  3. Hi,
  4. > I recently found a video showing Fedora booting with plymouth and I
  5. > liked it. So I wanted to use plymouth with my favorite distri (gentoo).
  6. > I know I'm enduser and the info text on says plymouth
  7. > is not meant to be installed by end users but I want to give it a try.
  8. > I have KMS running and am using my own initramfs anyway (encrypted root
  9. > disk) so how hard can it be? Can anybody please give me some straight
  10. > forward hints on how to use plymouth? (The INSTALL file is empty and
  11. > the README file is boring)
  12. So the basic idea is you need to:
  13. 1) build plymouth into the system. On fedora we use these conffigure flags:
  14. .%configure --enable-tracing --disable-tests --without-boot-entry \
  15. --without-default-plugin \
  16. --with-logo=%{_datadir}/pixmaps/system-logo-white.png \
  17. --with-background-start-color-stop=0x0073B3 \
  18. --with-background-end-color-stop=0x00457E \
  19. --with-background-color=0x3391cd \
  20. --with-system-root-install \
  21. --with-rhgb-compat-link
  22. %configure is a macro that expands to:
  23. ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  24. (and some other stuff)
  25. %{_datadir} is just /usr/share
  26. You probably won't need --with-rhgb-compat-link since that's only
  27. there for compatibility with Fedora's old infrastructure.
  28. --with-system-root-install makes plymouthd and plymouth install
  29. themselves into / instead of /usr. This is important so that the
  30. plymouth client can work in cases where the root fs is mounted, but
  31. /usr isn't yet.
  32. Somehow you need to hook into your distros mkinitrd mechanism. I
  33. mean you need to copy the plymouth binaries, plugins, and data files
  34. into the initrd everytime you rebuild your initrd. See
  35. plymouth-populate-initrd for how we do it on fedora (mkinitrd calls
  36. plymouth-populate-initrd). I would like to upstream hooks for other
  37. distros mkinitrd systems, so the out of the box experience is easier.
  38. Inside the initrd, you need to start plymouthd early. The earlier the
  39. better, but not before /sys, /proc/, and /dev/pts are mounted, and
  40. not before /dev/tty[01] and /dev/fb0 are created.
  41. At some point during the initrd you need to load the kms driver.
  42. After it's loaded the graphics mode should get set up and /dev/fb0
  43. will be functional. That's when you call plymouth --show-splash to
  44. show the splash screen.
  45. To decrypt your root, run
  46. plymouth ask-for-password --command="/sbin/cryptsetup luksOpen -T ..."
  47. where the --command is whatever makes sense for you.
  48. Right after you mount the root file system (but before you switch to it), run
  49. plymouth --newroot=/wherevertherootismounted
  50. This tells plymouth it can load some files off the real filesystem
  51. (like fonts, and stuff we don't want to stick in the initrd).
  52. while boot you need to run plymouth --update=some-milestone-id
  53. periodically to update the progress bar.
  54. When / is mounted read-write you need to run
  55. plymouth --sysinit
  56. Finally, when plymouth is done, you need to run plymouth --quit
  57. I have to run to catch a bus but i think that's the basics.
  58. > I'm even willing to give something back and convert your hints
  59. > into an easy step by step howto.
  60. That'd be great!
  61. --Ray