Files
chandra/docs/boot-splash.md
T
nandi 7501fc3ad9
CI / test (push) Failing after 50s
Boot splash: cycle the moon through its phases
- Replace the static moon with a 64-frame lunar phase spritesheet, generated by boot/plymouth/render-phases.py and advanced about every 0.3 s (~5 s per cycle)
- Add a glow sprite behind the moon whose opacity follows the illuminated fraction
- render.sh renders the glow SVG and the phase sheet (needs python3 with numpy and Pillow)
- install-plymouth.py removes theme files that are no longer in the source theme, and checks for the new PNGs
- Drop moon.svg and moon.png in favour of glow.svg, glow.png and moon-phases.png
2026-11-29 02:39:26 -08:00

45 lines
2.3 KiB
Markdown

# Boot splash (OnePlus 6T)
The handset boots with [Plymouth](https://www.freedesktop.org/wiki/Software/Plymouth/) showing the
Chandra moon cycling through its phases over a progress bar, from the initramfs until greetd starts
the session. The same theme, without the bar, covers reboot and power off.
- [`boot/plymouth/chandra/`](../boot/plymouth/chandra) is the theme (Plymouth's `script` plugin). Its
PNGs come from the SVGs and lunar-phase generator beside it: `boot/plymouth/render.sh` (calls
`rsvg-convert` and `boot/plymouth/render-phases.py`).
- [`boot/install-plymouth.py`](../boot/install-plymouth.py) installs it on a Kupfer phone.
Plymouth estimates progress from the previous boot (`/var/lib/plymouth/boot-duration`). Without one,
on the first boot, it assumes 60 s, so the bar ends early; from then on it fits.
## Install
Copy `boot/` to the phone and run the installer as root there, then reboot:
```sh
scp -r boot nandi@172.16.42.1:/tmp/chandra-boot
ssh -t nandi@172.16.42.1 sudo python3 /tmp/chandra-boot/install-plymouth.py
```
`--package FILE` takes a downloaded Plymouth package, for a phone without internet. The installer adds
the `plymouth` initramfs hook after `udev` (a drop-in in `/etc/kupfer/mkinitcpio.conf.d`), adds
`quiet splash ...` to `deviceinfo_kernel_cmdline` in `/etc/kupfer/deviceinfo`, builds and checks an
initramfs, and only then runs `update-bootimg` and compares the boot partition with what it wrote.
An update of `device-sdm845-oneplus-fajita` can replace `deviceinfo` and drop the splash options: run
the installer again.
## Undo
The first install saves the boot partition and the files it changes in
`/var/lib/chandra/boot-backup`. `install-plymouth.py --rollback` puts them back. If the phone doesn't
boot, flash the saved image with `fastboot flash boot_a`; USB networking (`172.16.42.1`) comes up
early enough to get in over SSH when only the display is wrong.
`plymouth.enable=0` on the kernel command line turns the splash off.
## The session must be enabled
Nothing else starts Chandra on the phone, so greetd has to be **enabled**, not just started:
`systemctl enable greetd`. With `getty@tty1` disabled and greetd only started, the next boot finishes
normally but leaves the last kernel messages on the screen, which looks like a hang.