From 63d41ceee47da8f5c1f38a6f4048c1a0ed81eaae Mon Sep 17 00:00:00 2001 From: Elias Bakken Date: Sun, 9 Aug 2026 21:25:41 +0200 Subject: [PATCH] Fix #69: install Plymouth ourselves instead of relying on Armbian's flag Root cause: recore.csc's extension_finish_config__enable_plymouth() hook (which set PLYMOUTH=yes) was commented out and never actually ran - not a BUILD_MINIMAL conflict as first suspected, just dead code that silently did nothing. Rather than re-enable Armbian's own PLYMOUTH/armbian-plymouth-theme mechanism, install plymouth ourselves via a new install_components script, the same way Rebuild already installs Klipper/Moonraker/ weston/etc - avoids depending on Armbian's internal variable semantics, which is exactly what broke this in the first place. - New install_components/plymouth.sh: installs plymouth + plymouth-themes, wires Recore's watermark into the spinner theme's logo (moved from the dead armbian/watermark.png path, which rebuild.sh was copying into a package we never actually build), and re-centers it (the theme's default WatermarkVerticalAlignment of .96 puts it right at the bottom of the screen). - Wired into fluidd/mainsail/octoprint (not barebone - no display). - weston.service now has After=plymouth-quit-wait.service. Found while testing: without it, weston can race Plymouth's DRM handoff and come up with a broken/black display even though the process itself reports healthy - a restart recovers it, but shouldn't be needed. Only affects octoprint (toggle.sh); fluidd/mainsail use KlipperScreen over X11, which was confirmed clean on the same test. Validated end-to-end on real hardware on both fluidd and octoprint builds: splash shows, watermark centered, and (with the matching Reflash rotate-screen PLYMOUTH place change) correctly rotated. Co-Authored-By: Claude Sonnet 5 --- .gitignore | 5 ++++- armbian/customize-image-fluidd.sh | 2 ++ armbian/customize-image-mainsail.sh | 2 ++ armbian/customize-image-octoprint.sh | 2 ++ armbian/recore.csc | 5 ----- rebuild.sh | 2 -- .../overlay/install_components/plymouth.sh | 14 ++++++++++++++ userpatches/overlay/install_components/toggle.sh | 1 + .../overlay/plymouth}/watermark.png | Bin 9 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 userpatches/overlay/install_components/plymouth.sh rename {armbian => userpatches/overlay/plymouth}/watermark.png (100%) diff --git a/.gitignore b/.gitignore index 26ee879..2bf89cd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ build-barebone build-mainsail build-fluidd build-octoprint -images \ No newline at end of file +images + +# Personal first-boot customization scripts - not meant to be shared/committed. +user_scripts/ \ No newline at end of file diff --git a/armbian/customize-image-fluidd.sh b/armbian/customize-image-fluidd.sh index b2edf97..7f0b53a 100644 --- a/armbian/customize-image-fluidd.sh +++ b/armbian/customize-image-fluidd.sh @@ -27,6 +27,7 @@ source /tmp/overlay/install_components/moonraker.sh source /tmp/overlay/install_components/nginx.sh source /tmp/overlay/install_components/fluidd.sh source /tmp/overlay/install_components/klipperscreen.sh +source /tmp/overlay/install_components/plymouth.sh source /tmp/overlay/install_components/recore_binaries.sh source /tmp/overlay/install_components/ustreamer.sh source /tmp/overlay/install_components/autohotspot.sh @@ -45,6 +46,7 @@ install_moonraker "fluidd" install_nginx "fluidd" install_fluidd install_klipperscreen +install_plymouth install_ustreamer install_bins install_autohotspot diff --git a/armbian/customize-image-mainsail.sh b/armbian/customize-image-mainsail.sh index 3afcadf..4763796 100644 --- a/armbian/customize-image-mainsail.sh +++ b/armbian/customize-image-mainsail.sh @@ -27,6 +27,7 @@ source /tmp/overlay/install_components/moonraker.sh source /tmp/overlay/install_components/nginx.sh source /tmp/overlay/install_components/mainsail.sh source /tmp/overlay/install_components/klipperscreen.sh +source /tmp/overlay/install_components/plymouth.sh source /tmp/overlay/install_components/recore_binaries.sh source /tmp/overlay/install_components/ustreamer.sh source /tmp/overlay/install_components/autohotspot.sh @@ -44,6 +45,7 @@ install_moonraker "mainsail" install_nginx "mainsail" install_mainsail install_klipperscreen +install_plymouth install_ustreamer install_bins install_autohotspot diff --git a/armbian/customize-image-octoprint.sh b/armbian/customize-image-octoprint.sh index 0f27a52..f9358a5 100644 --- a/armbian/customize-image-octoprint.sh +++ b/armbian/customize-image-octoprint.sh @@ -24,6 +24,7 @@ HOMEDIR="/home/${USER}" source /tmp/overlay/install_components/klipper.sh source /tmp/overlay/install_components/octoprint.sh source /tmp/overlay/install_components/toggle.sh +source /tmp/overlay/install_components/plymouth.sh source /tmp/overlay/install_components/recore_binaries.sh source /tmp/overlay/install_components/autohotspot.sh source /tmp/overlay/install_components/auto_disable_ssh.sh @@ -42,6 +43,7 @@ install_klipper install_octoprint install_weston install_toggle +install_plymouth install_ustreamer install_bins install_autohotspot diff --git a/armbian/recore.csc b/armbian/recore.csc index 6de0f1b..6ace206 100644 --- a/armbian/recore.csc +++ b/armbian/recore.csc @@ -32,8 +32,3 @@ function format_partitions__make_boot_ro() { sed -i -E 's:/boot ext4 defaults,commit=[0-9]+,errors=remount-ro:/boot ext4 ro,defaults:' $SDCARD/etc/fstab } -#function extension_finish_config__enable_plymouth() { -# echo "🍰Enable Plymouth on minimal build" -# PLYMOUTH=yes -#} - diff --git a/rebuild.sh b/rebuild.sh index ed7c6aa..9e2126f 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -64,8 +64,6 @@ cp armbian/customize-image-"${VERSION}".sh "${BUILD_DIR}"/userpatches/customize- cp armbian/recore.csc "${BUILD_DIR}"/config/boards rm -f "${BUILD_DIR}/patch/u-boot/u-boot-sunxi/allwinner-boot-splash.patch" -cp armbian/watermark.png "${BUILD_DIR}"/packages/plymouth-theme-armbian/watermark.png - mkdir -p "${BUILD_DIR}"/userpatches/overlay/rebuild/ echo "${NAME}" >"${BUILD_DIR}"/userpatches/overlay/rebuild/rebuild-version echo "${TAG}" >"${BUILD_DIR}"/userpatches/overlay/rebuild/rebuild-tag diff --git a/userpatches/overlay/install_components/plymouth.sh b/userpatches/overlay/install_components/plymouth.sh new file mode 100644 index 0000000..e1a09ee --- /dev/null +++ b/userpatches/overlay/install_components/plymouth.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +install_plymouth() { + echo "🍰 install Plymouth" + apt install -y plymouth plymouth-themes + + # Use Recore's own watermark as the spinner theme's logo. The + # theme's default WatermarkVerticalAlignment (.96) puts it right + # near the bottom of the screen - center it instead. + cp /tmp/overlay/plymouth/watermark.png /usr/share/plymouth/themes/spinner/watermark.png + sed -i 's/^WatermarkVerticalAlignment=.*/WatermarkVerticalAlignment=.5/' /usr/share/plymouth/themes/spinner/spinner.plymouth + + plymouth-set-default-theme -R spinner +} diff --git a/userpatches/overlay/install_components/toggle.sh b/userpatches/overlay/install_components/toggle.sh index 7c26153..aa75404 100644 --- a/userpatches/overlay/install_components/toggle.sh +++ b/userpatches/overlay/install_components/toggle.sh @@ -23,6 +23,7 @@ EOF cat > /etc/systemd/system/weston.service <