psplash: add animation and last message from systemd 97/11197/2
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 14 Sep 2017 15:16:13 +0000 (17:16 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 11 Oct 2017 14:49:03 +0000 (14:49 +0000)
An animated splash screen is cool.

Change-Id: I39c2404513aa6edd287df8555d46fe09e79f4408
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11197
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh>
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl/recipes-core/psplash/files/psplash-anim [new file with mode: 0755]
meta-agl/recipes-core/psplash/files/psplash-start.service
meta-agl/recipes-core/psplash/psplash_git.bbappend

diff --git a/meta-agl/recipes-core/psplash/files/psplash-anim b/meta-agl/recipes-core/psplash/files/psplash-anim
new file mode 100755 (executable)
index 0000000..ac9bf67
--- /dev/null
@@ -0,0 +1,11 @@
+#/bin/bash
+
+psplash-default "$@" &
+sleep .2
+while :; do
+       for x in 0 1 2 3 4 5 6 7 8 9 10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 10 9 8 7 6 5 4 3 2 1; do
+               psplash-write "PROGRESS ${x}0" || exit 0
+               psplash-write "MSG $(journalctl -n1 -ocat)" || exit 0
+               sleep .1
+       done
+done
index 67619d3..d3b6940 100644 (file)
@@ -6,7 +6,7 @@ DefaultDependencies=no
 
 [Service]
 ExecStartPre=/bin/sh -c "if [ -e /sys/class/graphics/fbcon/cursor_blink ]; then echo 0 > /sys/class/graphics/fbcon/cursor_blink; fi"
-ExecStart=/usr/bin/psplash -n -a 90
+ExecStart=/bin/bash -c "/usr/bin/psplash-anim -n -a 90"
 
 [Install]
 WantedBy=sysinit.target
index c2c58c5..bdc196b 100644 (file)
@@ -3,6 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 SRC_URI += "file://psplash-colors.h \
             file://psplash-start.service \
             file://psplash-quit.service \
+            file://psplash-anim \
             "
 
 SPLASH_IMAGES="file://psplash-poky-img.h;outsuffix=default"
@@ -22,4 +23,5 @@ do_install_append () {
         install -d ${D}${systemd_unitdir}/system
         install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system
     fi
+    install -m 755 ${WORKDIR}/psplash-anim ${D}/${bindir}
 }