From patchwork Tue Apr 22 19:00:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 61723 X-Patchwork-Delegate: steve@sakoman.com 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 C437DC369D1 for ; Tue, 22 Apr 2025 19:01:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.48363.1745348460053082060 for ; Tue, 22 Apr 2025 12:01:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0C989152B; Tue, 22 Apr 2025 12:00:55 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C8BAF3F5A1; Tue, 22 Apr 2025 12:00:58 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: mikko.rapeli@linaro.org, bill.mills@linaro.org Subject: [PATCH RFC walnascar 1/3] systemd: enable getty generator by default Date: Tue, 22 Apr 2025 20:00:51 +0100 Message-ID: <20250422190053.3244331-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 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 ; Tue, 22 Apr 2025 19:01:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/215242 Until recently, even when the getty generator was disabled in the systemd recipe it was actually still active. This was because the old behaviour was to delete the serial-getty template unit if the generator was disabled, but the systemd-serialgetty package shipped then shipped the same files so the generator continued to run. This was a bug in the original commit[1] so this behaviour has been present since 2016. My recent fixes[2] changed this: if the getty generator was disabled then the generator itself is deleted. This makes the actual behaviour match the intention, but the consequence was to demonstrate that some modern platforms were relying on this unexpected behaviour: specifically the genericarm64 BSP which intends to support a number of virtual and physical boards with a number of serial console ports that are not really suitable to be hardcoded into SERIAL_CONSOLES: - ttyS0 - ttyAMA0 (AMBA PL011 uart) - ttyS2 (BeagleBone Play, S0 and S1 are internal) - hvc0 (KVM) - ttyPS1 (AMD KV260) - And most likely more Restore the existing behaviour by explicitly enabling the serial getty generator: this means that systemd will automatically bring up a getty on the first serial console it finds. In the future we should extend some level of dynamic console-finding to sysvinit-based systems by searching for a console device in inittab, but for now this reverts the unintentional regression. [1] oe-core 2a8d0df47c9 ("systemd: make systemd-serialgetty optional") [2] oe-core 2beb3170af6 ("systemd: if getty generator is disabled remove the generator, not the units") Signed-off-by: Ross Burton --- meta/recipes-core/systemd/systemd_257.4.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/systemd/systemd_257.4.bb b/meta/recipes-core/systemd/systemd_257.4.bb index 64fb8fe69ac..f90308f0db0 100644 --- a/meta/recipes-core/systemd/systemd_257.4.bb +++ b/meta/recipes-core/systemd/systemd_257.4.bb @@ -92,6 +92,7 @@ PACKAGECONFIG ??= " \ quotacheck \ randomseed \ resolved \ + serial-getty-generator \ set-time-epoch \ sysusers \ timedated \ From patchwork Tue Apr 22 19:00:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 61722 X-Patchwork-Delegate: steve@sakoman.com 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 C219DC369C2 for ; Tue, 22 Apr 2025 19:01:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.48364.1745348460713867983 for ; Tue, 22 Apr 2025 12:01:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E76A51595; Tue, 22 Apr 2025 12:00:55 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AF2333F5A1; Tue, 22 Apr 2025 12:00:59 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: mikko.rapeli@linaro.org, bill.mills@linaro.org Subject: [PATCH RFC walnascar 2/3] systemd: always depend on the explicit serial console units Date: Tue, 22 Apr 2025 20:00:52 +0100 Message-ID: <20250422190053.3244331-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250422190053.3244331-1-ross.burton@arm.com> References: <20250422190053.3244331-1-ross.burton@arm.com> 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 ; Tue, 22 Apr 2025 19:01:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/215243 The systemd-serialgetty recipe generates explicit units for consoles that are defined in SERIAL_CONSOLES, and if that variable is not defined then just produces an empty package. Even when systemd has been configured to use the getty generator, if there are explicit consoles defined then we should respect them. Don't conditionalise the dependency on systemd-serialgetty so that we always pull in the explicit consoles. Signed-off-by: Ross Burton --- meta/recipes-core/systemd/systemd_257.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/systemd/systemd_257.4.bb b/meta/recipes-core/systemd/systemd_257.4.bb index f90308f0db0..5865c017e89 100644 --- a/meta/recipes-core/systemd/systemd_257.4.bb +++ b/meta/recipes-core/systemd/systemd_257.4.bb @@ -754,7 +754,7 @@ FILES:${PN} = " ${base_bindir}/* \ FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap" -RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS:${PN} += "systemd-serialgetty" RDEPENDS:${PN} += "volatile-binds" RRECOMMENDS:${PN} += "${PN}-extra-utils \ From patchwork Tue Apr 22 19:00:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 61724 X-Patchwork-Delegate: steve@sakoman.com 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 C5DE3C369D8 for ; Tue, 22 Apr 2025 19:01:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.48381.1745348461543482012 for ; Tue, 22 Apr 2025 12:01:01 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D49F71F02; Tue, 22 Apr 2025 12:00:56 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 957333F5A1; Tue, 22 Apr 2025 12:01:00 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: mikko.rapeli@linaro.org, bill.mills@linaro.org Subject: [PATCH RFC walnascar 3/3] genericarm64: add ttyPS1 for KV260 Date: Tue, 22 Apr 2025 20:00:53 +0100 Message-ID: <20250422190053.3244331-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250422190053.3244331-1-ross.burton@arm.com> References: <20250422190053.3244331-1-ross.burton@arm.com> 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 ; Tue, 22 Apr 2025 19:01:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/215244 The AMD KV260 has a serial console on ttyPS1, so until we can dynamically detect the console under sysvinit we can add it to SERIAL_CONSOLES so this platform has a working console when not running systemd. Signed-off-by: Ross Burton --- meta-yocto-bsp/conf/machine/genericarm64.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-yocto-bsp/conf/machine/genericarm64.conf b/meta-yocto-bsp/conf/machine/genericarm64.conf index f5000402e51..eb79475e9a9 100644 --- a/meta-yocto-bsp/conf/machine/genericarm64.conf +++ b/meta-yocto-bsp/conf/machine/genericarm64.conf @@ -28,7 +28,7 @@ WKS_FILE ?= "genericarm64.wks.in" EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" # Try to bring up a selection of physical or virtual serial consoles -SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0 115200;ttyS0 115200;ttyS1 115200;ttyS2" +SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0 115200;ttyS0 115200;ttyS1 115200;ttyS2 115200;ttyPS1" # Allow u-boot to be built for use with qemu-system-aarch64. # This u-boot is _not_ suitable for use with real hardware, and the expectation