Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Trevor Woerner" <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 2/3] psplash: work on first boot (sysvinit)
Date: Wed, 23 Dec 2020 18:34:18 -0500	[thread overview]
Message-ID: <20201223233418.21060-1-twoerner@gmail.com> (raw)

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.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 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

diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 44f0007daf..bb57d25c76 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -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"
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index 1c956a3a56..61946e56eb 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -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
-- 
2.30.0.rc0


                 reply	other threads:[~2020-12-23 23:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201223233418.21060-1-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox