Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Trevor Woerner" <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [master-next][PATCH 3/3] psplash sysvinit: add knob for verbose progress
Date: Thu, 24 Dec 2020 02:43:54 -0500	[thread overview]
Message-ID: <20201224074354.18751-3-twoerner@gmail.com> (raw)
In-Reply-To: <20201224074354.18751-1-twoerner@gmail.com>

Currently, under sysvinit, the psplash screen shows a graphic, a progress
bar, and a textual message just above the progress bar showing the user which
module is currently running during both bootup and shutdown. This way they can
see, roughly, how much time each module takes to run.

Add a knob, default off, so the user can choose whether or not to display the
textual message indicating the currently-running module.

This knob is added as a PACKAGECONFIG to sysvinit:
	verbose-psplash

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta/recipes-core/sysvinit/sysvinit/rc          | 4 +++-
 meta/recipes-core/sysvinit/sysvinit/rcS-default | 2 ++
 meta/recipes-core/sysvinit/sysvinit_2.97.bb     | 5 ++++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index c4a2f50f88..53a5ce31d2 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -160,7 +160,9 @@ startup() {
 			#
 			[ -f $previous_start ] && [ ! -f $stop ] && continue
 		fi
-		psplash-write "MSG $(basename $i .sh | cut -c 4-)" || true
+		if [ x"${PSPLASH_VERBOSITY}" = x"yes" ]; then
+			psplash-write "MSG $(basename $i .sh | cut -c 4-)" || true
+		fi
 		case "$runlevel" in
 			0|6)
 				startup $i stop
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default
index e4e5782de5..d3a0f32d2a 100644
--- a/meta/recipes-core/sysvinit/sysvinit/rcS-default
+++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default
@@ -32,3 +32,5 @@ ROOTFS_READ_ONLY=no
 INIT_SYSTEM=sysvinit
 # set psplash fifo directory
 PSPLASH_FIFO_DIR=/mnt
+# set the psplash verbosity (sysvinit)
+PSPLASH_VERBOSITY=#PSPLASH_V#
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.97.bb b/meta/recipes-core/sysvinit/sysvinit_2.97.bb
index 98916f7f19..562b20327e 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.97.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.97.bb
@@ -25,6 +25,8 @@ SRC_URI[sha256sum] = "2d5996857519bfd8634d2e1debabb3238fb38440f65fbfdc46420ee8bd
 
 S = "${WORKDIR}/sysvinit-${PV}"
 
+PACKAGECONFIG[verbose-psplash] = ",,"
+
 inherit update-alternatives features_check
 DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt"
 do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot"
@@ -91,7 +93,8 @@ do_install () {
 		install -d ${D}${sysconfdir}/rc$level.d
 	done
 
-	install -m 0644    ${WORKDIR}/rcS-default	${D}${sysconfdir}/default/rcS
+	sed -e 's:#PSPLASH_V#:${@bb.utils.contains("PACKAGECONFIG","verbose-psplash","yes","no", d)}:g' ${WORKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS
+	chmod 0644 ${D}${sysconfdir}/default/rcS
 	install -m 0755    ${WORKDIR}/rc		${D}${sysconfdir}/init.d
 	install -m 0755    ${WORKDIR}/rcS		${D}${sysconfdir}/init.d
 	install -m 0755    ${WORKDIR}/bootlogd.init     ${D}${sysconfdir}/init.d/bootlogd
-- 
2.30.0.rc0


  parent reply	other threads:[~2020-12-24  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24  7:43 [master-next][PATCH 1/3] insane.bbclass: allow fifos Trevor Woerner
2020-12-24  7:43 ` [master-next][PATCH 2/3] psplash: add fifo to initial image (sysvinit) Trevor Woerner
2021-01-04 14:38   ` [OE-core] " Ross Burton
2020-12-24  7:43 ` Trevor Woerner [this message]
2020-12-24  8:34 ` [OE-core] [master-next][PATCH 1/3] insane.bbclass: allow fifos Richard Purdie

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=20201224074354.18751-3-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