From 8231c50d4edf4ef10d5f5c43430362830e389271 Mon Sep 17 00:00:00 2001 From: Valentin David Date: Fri, 2 Sep 2022 15:07:32 +0200 Subject: [PATCH] Start plymouth sooner and reload when gadget is available --- debian/rules | 84 ++++++++++--------- .../core-override.conf | 4 +- .../plymouth-reload.service | 11 +++ .../plymouth-reload.service | 1 + 4 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 factory/usr/lib/systemd/system/plymouth-start.service.d/plymouth-reload.service create mode 120000 factory/usr/lib/systemd/system/sysinit.target.wants/plymouth-reload.service diff --git a/debian/rules b/debian/rules index 8e454b7a..25d59c72 100755 --- a/debian/rules +++ b/debian/rules @@ -6,47 +6,49 @@ include /usr/share/dpkg/default.mk %: dh $@ -INSTALL_FILES_FROM_HOST= \ - /bin/kmod \ - /bin/mount \ - /sbin/sulogin \ - /bin/tar \ - /lib/$(DEB_HOST_MULTIARCH)/libgcc_s.so.1 \ - /lib/$(DEB_HOST_MULTIARCH)/libnss_compat.so.* \ - /lib/$(DEB_HOST_MULTIARCH)/libnss_files.so.* \ - /lib/systemd/system/dbus.service \ - /lib/systemd/system/dbus.socket \ - /lib/systemd/system/plymouth-start.service \ - /lib/systemd/system/plymouth-switch-root.service \ - /lib/systemd/systemd-bootchart \ - /sbin/cryptsetup \ - /sbin/dmsetup \ - /sbin/e2fsck \ - /sbin/fsck /bin/umount \ - /sbin/fsck.vfat \ - /sbin/fsck.vfat \ - /sbin/mkfs.ext4 \ - /sbin/mkfs.vfat \ - /sbin/sfdisk \ - /usr/bin/dbus-daemon \ - /usr/bin/mountpoint \ - /usr/bin/partx \ - /usr/bin/plymouth \ - /usr/bin/unsquashfs \ - /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/label-ft.so \ - /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/renderers/*.so \ - /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/script.so \ - /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/two-step.so \ - /usr/sbin/depmod \ - /usr/sbin/insmod \ - /usr/sbin/lsmod \ - /usr/sbin/modinfo \ - /usr/sbin/modprobe \ - /usr/sbin/plymouthd \ - /usr/sbin/rmmod \ - /usr/share/dbus-1/system.conf \ - /usr/share/libdrm/amdgpu.ids \ - /usr/share/plymouth/themes/bgrt/* \ +INSTALL_FILES_FROM_HOST= \ + /bin/kmod \ + /bin/mount \ + /sbin/sulogin \ + /bin/tar \ + /lib/$(DEB_HOST_MULTIARCH)/libgcc_s.so.1 \ + /lib/$(DEB_HOST_MULTIARCH)/libnss_compat.so.* \ + /lib/$(DEB_HOST_MULTIARCH)/libnss_files.so.* \ + /lib/systemd/system/dbus.service \ + /lib/systemd/system/dbus.socket \ + /lib/systemd/system/plymouth-start.service \ + /lib/systemd/system/plymouth-switch-root.service \ + /lib/systemd/system/systemd-ask-password-plymouth.path \ + /lib/systemd/system/systemd-ask-password-plymouth.service \ + /lib/systemd/systemd-bootchart \ + /sbin/cryptsetup \ + /sbin/dmsetup \ + /sbin/e2fsck \ + /sbin/fsck /bin/umount \ + /sbin/fsck.vfat \ + /sbin/fsck.vfat \ + /sbin/mkfs.ext4 \ + /sbin/mkfs.vfat \ + /sbin/sfdisk \ + /usr/bin/dbus-daemon \ + /usr/bin/mountpoint \ + /usr/bin/partx \ + /usr/bin/plymouth \ + /usr/bin/unsquashfs \ + /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/label-ft.so \ + /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/renderers/*.so \ + /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/script.so \ + /usr/lib/$(DEB_HOST_MULTIARCH)/plymouth/two-step.so \ + /usr/sbin/depmod \ + /usr/sbin/insmod \ + /usr/sbin/lsmod \ + /usr/sbin/modinfo \ + /usr/sbin/modprobe \ + /usr/sbin/plymouthd \ + /usr/sbin/rmmod \ + /usr/share/dbus-1/system.conf \ + /usr/share/libdrm/amdgpu.ids \ + /usr/share/plymouth/themes/bgrt/* \ /usr/share/plymouth/themes/spinner/* override_dh_auto_install: diff --git a/factory/usr/lib/systemd/system/plymouth-start.service.d/core-override.conf b/factory/usr/lib/systemd/system/plymouth-start.service.d/core-override.conf index ee69405c..fbc2939d 100644 --- a/factory/usr/lib/systemd/system/plymouth-start.service.d/core-override.conf +++ b/factory/usr/lib/systemd/system/plymouth-start.service.d/core-override.conf @@ -1,6 +1,4 @@ -[Unit] -After=snap-initramfs-mounts.service - [Service] ExecStart= ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session --ignore-serial-consoles +ExecReload=-/usr/sbin/plymouth reload diff --git a/factory/usr/lib/systemd/system/plymouth-start.service.d/plymouth-reload.service b/factory/usr/lib/systemd/system/plymouth-start.service.d/plymouth-reload.service new file mode 100644 index 00000000..e54bb982 --- /dev/null +++ b/factory/usr/lib/systemd/system/plymouth-start.service.d/plymouth-reload.service @@ -0,0 +1,11 @@ +[Unit] +Description=Reload Plymouth theme +DefaultDependencies=no +ConditionPathExists=/run/plymouth/pid +ConditionPathExists=/run/mnt/gadget/splash/plymouth/themes +After=snap-initramfs-mounts.service +Before=plymouth-switch-root.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/systemctl reload plymouth-start.service diff --git a/factory/usr/lib/systemd/system/sysinit.target.wants/plymouth-reload.service b/factory/usr/lib/systemd/system/sysinit.target.wants/plymouth-reload.service new file mode 120000 index 00000000..000b8e5e --- /dev/null +++ b/factory/usr/lib/systemd/system/sysinit.target.wants/plymouth-reload.service @@ -0,0 +1 @@ +../plymouth-reload.service \ No newline at end of file