Boot splash with the InfoFlow logo instead of the Raspberry Pi one
Own plymouth theme (logo centred on white), quiet kernel command line without boot text, Raspberry logos or cursor, and no firmware rainbow square. The initramfs is only rebuilt when the theme changes; uninstall.sh restores the previous theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19595aaf39
commit
4d061f5211
5 files changed
+60
-3
No files matched your search
+34
-3
@@ -95,7 +95,7 @@ pkg_available() { apt-cache policy "$1" 2>/dev/null | grep -q 'Candidate: [0-9]'
|
||||
"$CHROMIUM" xserver-xorg-core xserver-xorg-input-libinput xserver-xorg-legacy x11-xserver-utils xauth
|
||||
fonts-dejavu-core fonts-noto-color-emoji
|
||||
python3 python3-flask python3-argon2 python3-websocket gunicorn
|
||||
network-manager avahi-daemon iw rfkill iproute2 openssl logrotate sudo kbd
|
||||
network-manager avahi-daemon iw rfkill iproute2 openssl logrotate sudo kbd plymouth
|
||||
)
|
||||
for opt in systemd-zram-generator libraspberrypi-bin raspi-utils-core; do
|
||||
if pkg_available "$opt"; then PKGS+=("$opt"); fi
|
||||
@@ -235,14 +235,45 @@ if [[ -f /usr/share/systemd/tmp.mount && ! -e /etc/systemd/system/tmp.mount ]] &
|
||||
systemctl enable tmp.mount 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# No console blanking (the kiosk runs on vt7, but keep the console awake too).
|
||||
# Kernel command line: no console blanking (the kiosk runs on vt7, but keep the console
|
||||
# awake too), and a quiet boot behind the splash: no boot text, Raspberry logos or cursor.
|
||||
add_cmdline() { # add "key" or "key=value" unless the key is already present
|
||||
local key="${2%%=*}"
|
||||
grep -qE "(^| )${key//./\\.}(=[^ ]*)?( |\$)" "$1" || sed -i "1 s/\$/ $2/" "$1"
|
||||
}
|
||||
for cmdline in /boot/firmware/cmdline.txt /boot/cmdline.txt; do
|
||||
if [[ -f $cmdline ]]; then
|
||||
grep -q 'consoleblank=' "$cmdline" || sed -i '1 s/$/ consoleblank=0/' "$cmdline"
|
||||
for opt in consoleblank=0 quiet splash plymouth.ignore-serial-consoles logo.nologo vt.global_cursor_default=0; do
|
||||
add_cmdline "$cmdline" "$opt"
|
||||
done
|
||||
config_txt="$(dirname "$cmdline")/config.txt"
|
||||
# No rainbow square from the firmware. [all] in case the file ends in a model section.
|
||||
if [[ -f $config_txt ]] && ! grep -q '^disable_splash=' "$config_txt"; then
|
||||
printf '\n[all]\ndisable_splash=1\n' >> "$config_txt"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Boot splash: logo on white (config/plymouth). Rebuilding the initramfs takes a while
|
||||
# on a Pi 3, so only when the theme changed.
|
||||
SPLASH_DIR=/usr/share/plymouth/themes/voxip-kiosk
|
||||
install -d -m 0755 "$SPLASH_DIR"
|
||||
install -m 0644 "$SRC"/config/plymouth/voxip-kiosk/* "$SPLASH_DIR/"
|
||||
if [[ ! -f /var/lib/voxip-kiosk/previous-plymouth-theme ]]; then
|
||||
plymouth-set-default-theme > /var/lib/voxip-kiosk/previous-plymouth-theme 2>/dev/null || true
|
||||
fi
|
||||
SPLASH_SUM="$(cat "$SPLASH_DIR"/* | sha256sum | cut -d' ' -f1)"
|
||||
if [[ "$(plymouth-set-default-theme 2>/dev/null)" != voxip-kiosk || "$(cat /var/lib/voxip-kiosk/splash.sha256 2>/dev/null)" != "$SPLASH_SUM" ]]; then
|
||||
say "Opstartscherm instellen (initramfs bijwerken, dit duurt even)"
|
||||
plymouth-set-default-theme voxip-kiosk
|
||||
if update-initramfs -u -k all >/dev/null 2>&1; then
|
||||
echo "$SPLASH_SUM" > /var/lib/voxip-kiosk/splash.sha256
|
||||
else
|
||||
warn "initramfs bijwerken mislukt; het opstartscherm verschijnt mogelijk pas later tijdens het opstarten."
|
||||
fi
|
||||
fi
|
||||
|
||||
# A desktop display manager would fight over vt7 and display :0 (Pi OS Desktop images).
|
||||
# uninstall.sh re-enables the ones recorded here.
|
||||
for dm in lightdm.service gdm3.service sddm.service; do
|
||||
|
||||
Reference in new issue
Block a user