From 8bad47eba3a56204a5b5d2a433b499398bda2173 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 23 Mar 2023 14:52:10 -0700 Subject: [PATCH] psplash: Make psplash wait for the framebuffer to be ready Especially with systemd its seen that psplash-start service starts before /dev/fb0 is created by kernel which results in [FAILED] Failed to start Start psplash boot splash screen. this is quite frequent race now with kernel 6.1 Add device dependency on sys-devices-platform-gpu-graphics-fb0.device via a unit file drop-in Signed-off-by: Khem Raj Signed-off-by: Leon Anavi --- recipes-core/psplash/files/framebuf.conf | 4 ++++ recipes-core/psplash/psplash_%.bbappend | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 recipes-core/psplash/files/framebuf.conf diff --git a/recipes-core/psplash/files/framebuf.conf b/recipes-core/psplash/files/framebuf.conf new file mode 100644 index 0000000..44e1ded --- /dev/null +++ b/recipes-core/psplash/files/framebuf.conf @@ -0,0 +1,4 @@ +[Unit] +Requires=sys-devices-platform-gpu-graphics-fb0.device +After=sys-devices-platform-gpu-graphics-fb0.device + diff --git a/recipes-core/psplash/psplash_%.bbappend b/recipes-core/psplash/psplash_%.bbappend index bf99b2b..57cade8 100644 --- a/recipes-core/psplash/psplash_%.bbappend +++ b/recipes-core/psplash/psplash_%.bbappend @@ -1,2 +1,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SPLASH_IMAGES:rpi = "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" + +SRC_URI:append:rpi = " file://framebuf.conf" + +do_install:append:rpi() { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -Dm 0644 ${WORKDIR}/framebuf.conf ${D}${systemd_system_unitdir}/psplash-start.service.d/framebuf.conf + fi +} + +FILES:${PN}:append:rpi = " ${systemd_system_unitdir}/psplash-start.service.d"