Skip to contentSkip to conversation

psplash: work on first boot (sysvinit)

PATCH New Trevor Woerner 1 participant 1 message Dec 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 psplash: work on first boot (sysvinit)

The psplash program has a mechanism for showing progress/updates. This is done via a pipe. On images that are R/O or images that are assembled via wic, the pipe is being setup in a location that is R/O on first boot, therefore the pipe can not be created. If the psplash program is not able to create the pipe, the app will not run. This situation is "fixed" on non-R/O images when the first bootup is complete. Therefore the psplash program is able to run for the first shutdown, and all subsequent bootups and shutdowns as well, but not on the very first boot.

If the directory in which the psplash pipe is to be created already exists in the filesystem and that location is not R/O on first boot, then the psplash program can run on first boot (and subsequent boots and shutdowns).

NOTE: this is only an issue with sysvinit and most non-qemu machines. A systemd image, and images run on qemu machines, are able to run psplash on the first and subsequent boots.

---
 meta/recipes-core/psplash/psplash_git.bb | 3 +++
 meta/recipes-core/sysvinit/sysvinit/rc   | 1 +
 2 files changed, 4 insertions(+)

changes between v1 and v2:
- move .psplash directory back to /mnt

meta/recipes-core/psplash/psplash_git.bb +3 -0
index 44f0007daf..bb57d25c76 100644
@@ -102,6 +102,7 @@ do_install_append() {
 	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
 		install -d ${D}${sysconfdir}/init.d/
 		install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
+		install -d ${D}/mnt/.psplash
 	fi
 
 	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
@@ -122,3 +123,5 @@ SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'pspl
 
 INITSCRIPT_NAME = "psplash.sh"
 INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
+
+FILES_${PN} += "/mnt/.psplash"
meta/recipes-core/sysvinit/sysvinit/rc +1 -0
index 1c956a3a56..61946e56eb 100755
@@ -177,5 +177,6 @@ if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; th
     if type psplash-write >/dev/null 2>&1; then
         psplash-write "QUIT" || true
         umount -l $PSPLASH_FIFO_DIR
+        rmdir $PSPLASH_FIFO_DIR
     fi
 fi
Signature · 1 line
2.30.0.rc0