diff options
author | Trevor Woerner <twoerner@gmail.com> | 2020-12-24 10:31:04 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-05 13:48:41 +0000 |
commit | 05091409dd90a93ce232206a02c050de760875b6 (patch) | |
tree | 52f745da7071bda812c2331a1662d174b6484532 /meta/recipes-core | |
parent | a12ba3994d0fa1e4237e40e9e3f06f0708a2ba07 (diff) | |
download | poky-05091409dd90a93ce232206a02c050de760875b6.tar.gz |
psplash: fix working on first boot (sysvinit)
The psplash program has a mechanism for showing updates graphically in the
form of a progress bar. The program is told when and how much to fill the
progress bar via text messages sent through a fifo. If the fifo doesn't exist
when the psplash program starts, it tries to create it. If the fifo doesn't
exist or can't be created, the psplash program will refuse to run.
In various circumstances when a system is booted for the very first time,
the filesystem is mounted, initially, read-only. As a result the psplash
program is not able to run. On systems where the root filesystem is not
meant to be read-only, it will eventually be mounted read-write. Therefore the
psplash program can run on shutdown, and all subsequent boots. Only the first
boot is affected.
If a fifo is created and included in the filesystem as part of the recipe,
then filesystems that are meant to be read-only will have psplash work, as
well as the cases where (on first boot) a read-write filesystem is initially
mounted read-only.
NOTE: this is only an issue with sysvinit, and non-qemu machines.
systemd-based systems don't suffer from this first-boot issue, and neither
do the qemu machines.
NOTE 2: when psplash is done, it removes the fifo. Therefore the fifo used
for communicating with psplash doesn't hang around unnecessarily in the
filesystem.
(From OE-Core rev: d20978f9bce3caf473f5b4f55d645dbeabc1642d)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/psplash/psplash_git.bb | 6 | ||||
-rwxr-xr-x | meta/recipes-core/sysvinit/sysvinit/rc | 1 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/rcS-default | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 44f0007daf..59e1e3f194 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb | |||
@@ -102,6 +102,10 @@ do_install_append() { | |||
102 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 102 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
103 | install -d ${D}${sysconfdir}/init.d/ | 103 | install -d ${D}${sysconfdir}/init.d/ |
104 | install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh | 104 | install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh |
105 | |||
106 | # make fifo for psplash | ||
107 | install -d ${D}/mnt | ||
108 | mkfifo ${D}/mnt/psplash_fifo | ||
105 | fi | 109 | fi |
106 | 110 | ||
107 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 111 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
@@ -122,3 +126,5 @@ SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'pspl | |||
122 | 126 | ||
123 | INITSCRIPT_NAME = "psplash.sh" | 127 | INITSCRIPT_NAME = "psplash.sh" |
124 | INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." | 128 | INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." |
129 | |||
130 | FILES_${PN} += "/mnt" | ||
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc index c9f6558115..8e76f987c1 100755 --- a/meta/recipes-core/sysvinit/sysvinit/rc +++ b/meta/recipes-core/sysvinit/sysvinit/rc | |||
@@ -175,6 +175,5 @@ startup() { | |||
175 | if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then | 175 | if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then |
176 | if type psplash-write >/dev/null 2>&1; then | 176 | if type psplash-write >/dev/null 2>&1; then |
177 | psplash-write "QUIT" || true | 177 | psplash-write "QUIT" || true |
178 | umount -l /mnt/.psplash | ||
179 | fi | 178 | fi |
180 | fi | 179 | fi |
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default index c576ff0678..76af22b359 100644 --- a/meta/recipes-core/sysvinit/sysvinit/rcS-default +++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default | |||
@@ -31,4 +31,4 @@ ROOTFS_READ_ONLY=no | |||
31 | # need to have specific behavior depending on init system | 31 | # need to have specific behavior depending on init system |
32 | INIT_SYSTEM=sysvinit | 32 | INIT_SYSTEM=sysvinit |
33 | # set the psplash fifo directory | 33 | # set the psplash fifo directory |
34 | PSPLASH_FIFO_DIR=/mnt/.psplash | 34 | PSPLASH_FIFO_DIR=/mnt |