From patchwork Thu Feb 6 14:44:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 56782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A56B2C02199 for ; Thu, 6 Feb 2025 14:44:35 +0000 (UTC) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mx.groups.io with SMTP id smtpd.web11.42924.1738853067673670298 for ; Thu, 06 Feb 2025 06:44:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=oEBbDEXP; spf=pass (domain: linaro.org, ip: 209.85.167.51, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-54024aa9febso1062205e87.1 for ; Thu, 06 Feb 2025 06:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738853066; x=1739457866; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v3k2E360cSwEGwtHk2vivgdYS88g5eIEgAPvtq9morc=; b=oEBbDEXPpFsKaxTgC/d7s11s4QylLAtDjvjeoGIRsnvNMbVXkDAsFYhzh3RFNODDbW 0FrNKEx6u7ZYh+aWgIcKI9wgIa2sw5FfObrzU53/iQrBbOufOT17XpJAcJmA1pZUYK9N SKyEl2ul/SuqmQypIQLKbOGF6cXqCqYHGjpjap3RciYpDXFCsngTNI2rbZNMTQGbBJHy hCZ5aDjvvoM9RIvnv3vie0j855BDeU8mwUFRyq8ROd4IdEaXmwoPlvp8Le7Fgat9hslK kyD3WQA9n/aN0FJn1FsBnrxF4aNV1AY9WYj6H7TypE/CB2eUOon8NrY5YuK7udLJ79Xh UYqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738853066; x=1739457866; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v3k2E360cSwEGwtHk2vivgdYS88g5eIEgAPvtq9morc=; b=QI/jh+BmoGGiGmkDQF6g3EM4h/ERTnkbytzbLeOfO+rg59uef7GvYG4EgNcJH5TJpu UVs5KJLWF3fyUtYYLIQb1HITeZz6oTU5rovWQsGvdj+bXb2EUuTepmZXaOJY8tRWYtHs fTI4Ieg/b2lQdd3yEcdRv/Tt40p+Aq1gVNDYkO1YZoJh4wYCAL7RfU+x8jNc+mJwnbQi pd9Th3qJLHfQgHrr/oGQDSi/Gg4mFgoDl+OPJm0CYPJVJru3p/Yzbbix0ck1W4TFQD0f mMYyPNnFlv1c281vEzrmtjyczL6UAJukLfsMwvOq8ta6Ky8R8B3syTzUw02Rqyd9fN/A tnEw== X-Gm-Message-State: AOJu0YwHhJZGROa0VgnP0yvd1vrcyqe4CFilcUuc7rCpPMu7bq/jH1T7 DC4Fv6JNbzMbRULHV+F1gLW+t4/en5ZrCI5xFv0yCpDkZrHem6I6QxNsI7NcMHQ= X-Gm-Gg: ASbGncs0RfQk9GRBXcHtEN9CleNElmGqWFznGVwVBvbWoGq8hAdFi97r80OJ8yw0eO+ CqI0jHAcwyHdwiXeb2PO9pgGrcv2BnlUMqqgNLi4EG2JwYTbRSWt2tLh1CbzedzuvsK2sYnlIAQ ca3bsl5a3UOUQ4YDyncOit8v1GQKu72+D6Ls+DWF9V0LePcJQOljTnqb5ZADtOzvBBs2nsKtnDZ ANFO1V0txRuwAZ+UlSzCoYGQn6DgCBq9T7LstO4firyKMNiW6eenLWEB9QaRwVO74fuN1Bl+yxU ANMYtO69mkrZQm8V82+tDQ62b7N/53aba1hTKxMATO3bJIK4i81XoVMpM8pd X-Google-Smtp-Source: AGHT+IERrxwf2DNCzpqbtls71TRCy0winpdXF5GRM2YVfyvUct8KHx/NOrq34AlHL6F/IdgA5o4t6A== X-Received: by 2002:a05:6512:2343:b0:544:124f:1721 with SMTP id 2adb3069b0e04-544124f1842mr614312e87.6.1738853065750; Thu, 06 Feb 2025 06:44:25 -0800 (PST) Received: from localhost.localdomain (78-27-76-97.bb.dnainternet.fi. [78.27.76.97]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-544106040b4sm147434e87.226.2025.02.06.06.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2025 06:44:24 -0800 (PST) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: poky@lists.yoctoproject.org, Mikko Rapeli Subject: [PATCH 2/2] psplash: start via udev if framebuffer device detected Date: Thu, 6 Feb 2025 16:44:06 +0200 Message-ID: <20250206144406.1328276-1-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 06 Feb 2025 14:44:35 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/poky/message/13523 psplash-start.service expected to find /dev/fb0 and failed if device was not found. This failure breaks systemd oeqa runtime test with "runqemu nographic". Starting psplash based on detected framebuffer device fixes systemd boot status and systemd oeqa runtime tests for qemu boots with and without graphics support. Note that psplash-systemd.service still depends on /dev/fb0 so startup with multiple framebuffer devices may not work correctly. I don't have devices with multiple framebuffer devices to test with. On qemu machine with graphics, psplash displays yocto logo correctly and boot progress bar as well. Once boot completes to systemd "running" state, the logo is replaced by login prompt. On qemu machine without graphics, boot completes without psplash or failures and login over serial console works normally. Tested with genericarm64 machine poky-altcfg distro and core-image-base image on qemu. AMD kv260 tested as well but graphics stack is not yet working there so boot is similar to qemu without graphics. Signed-off-by: Mikko Rapeli --- meta/recipes-core/psplash/files/fb.rules | 1 + .../{psplash-start.service => psplash-start@.service} | 5 ++--- meta/recipes-core/psplash/files/psplash-systemd.service | 8 +++----- meta/recipes-core/psplash/psplash_git.bb | 9 ++++++--- 4 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 meta/recipes-core/psplash/files/fb.rules rename meta/recipes-core/psplash/files/{psplash-start.service => psplash-start@.service} (84%) diff --git a/meta/recipes-core/psplash/files/fb.rules b/meta/recipes-core/psplash/files/fb.rules new file mode 100644 index 0000000000..accdb8386c --- /dev/null +++ b/meta/recipes-core/psplash/files/fb.rules @@ -0,0 +1 @@ +SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="psplash-start@%k.service psplash-systemd.service" diff --git a/meta/recipes-core/psplash/files/psplash-start.service b/meta/recipes-core/psplash/files/psplash-start@.service similarity index 84% rename from meta/recipes-core/psplash/files/psplash-start.service rename to meta/recipes-core/psplash/files/psplash-start@.service index bec9368427..1bc3642fc2 100644 --- a/meta/recipes-core/psplash/files/psplash-start.service +++ b/meta/recipes-core/psplash/files/psplash-start@.service @@ -3,11 +3,10 @@ Description=Start psplash boot splash screen DefaultDependencies=no RequiresMountsFor=/run ConditionFileIsExecutable=/usr/bin/psplash +After=dev-%i.device +Wants=dev-%i.device [Service] Type=notify ExecStart=/usr/bin/psplash RemainAfterExit=yes - -[Install] -WantedBy=sysinit.target diff --git a/meta/recipes-core/psplash/files/psplash-systemd.service b/meta/recipes-core/psplash/files/psplash-systemd.service index e93e3deb35..f9aaa2db3d 100644 --- a/meta/recipes-core/psplash/files/psplash-systemd.service +++ b/meta/recipes-core/psplash/files/psplash-systemd.service @@ -1,14 +1,12 @@ [Unit] Description=Start psplash-systemd progress communication helper DefaultDependencies=no -After=psplash-start.service -Requires=psplash-start.service +After=psplash-start@fb0.service +Requires=psplash-start@fb0.service RequiresMountsFor=/run ConditionFileIsExecutable=/usr/bin/psplash +ConditionFileExists=/run/psplash_fifo [Service] ExecStart=/usr/bin/psplash-systemd RemainAfterExit=yes - -[Install] -WantedBy=sysinit.target diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 30cf61a2cb..fce5995efe 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -11,8 +11,9 @@ PV = "0.1+git" SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \ file://psplash-init \ - file://psplash-start.service \ + file://psplash-start@.service \ file://psplash-systemd.service \ + file://fb.rules \ ${SPLASH_IMAGES}" UPSTREAM_CHECK_COMMITS = "1" @@ -112,8 +113,10 @@ do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} - install -m 644 ${UNPACKDIR}/psplash-start.service ${D}/${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/psplash-start@.service ${D}/${systemd_system_unitdir} install -m 644 ${UNPACKDIR}/psplash-systemd.service ${D}/${systemd_system_unitdir} + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${UNPACKDIR}/fb.rules ${D}${sysconfdir}/udev/rules.d/ fi install -d ${D}${bindir} @@ -124,7 +127,7 @@ do_install:append() { } SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" -SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'psplash-start.service psplash-systemd.service', '', d)}" +SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'psplash-start@.service psplash-systemd.service', '', d)}" INITSCRIPT_NAME = "psplash.sh" INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."