Message ID | 20250422190053.3244331-2-ross.burton@arm.com |
---|---|
State | Deferred |
Delegated to: | Steve Sakoman |
Headers | show |
Series | [RFC,walnascar,1/3] systemd: enable getty generator by default | expand |
Hi, On Tue, Apr 22, 2025 at 08:00:52PM +0100, Ross Burton wrote: > 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. So all boots of genericarm64 on all HW now wait for the configured SERIAL_CONSOLES timeouts. How should that be fixed? Unsetting SERIAL_CONSOLES in genericarm64 machine config? So systemd-serialgetty is allowed to be machine specific but not systemd itself? Cheers, -Mikko
Hi, On Wed, Apr 23, 2025 at 02:18:42PM +0300, Mikko Rapeli via lists.openembedded.org wrote: > On Tue, Apr 22, 2025 at 08:00:52PM +0100, Ross Burton wrote: > > 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. > > So all boots of genericarm64 on all HW now wait for the configured > SERIAL_CONSOLES timeouts. > > How should that be fixed? Unsetting SERIAL_CONSOLES in genericarm64 machine config? > So systemd-serialgetty is allowed to be machine specific but not systemd itself? To fix the "poky-altcfg" distro or "poky" with systemd boot slowdown on genericarm64, systemd-serialgetty should either be removed or see an empty SERIAL_CONSOLES set currently in the machine config. A genericarm64 machine specific bbappend could do this, or in genericarm64 machine config could have: SERIAL_CONSOLES:poky-altcfg ?= "" This sets for all which may break some other things so maybe it's better to do this only for systemd-serialgetty in machine config with: SERIAL_CONSOLES:poky-altcfg:pn-systemd-serialgetty ?= "" This would not work for plain "poky" distro if someone enabled systemd as init. For that, something like: SERIAL_CONSOLES:pn-systemd-serialgetty ?= " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ '', '115200;ttyAMA0 115200;hvc0 115200;ttyS0 115200;ttyS1 115200;ttyS2', d)} \ " These either make SERIAL_CONSOLES depend on "systemd" in DISTRO_FEATURES inside machine config, so I'm not sure if this is allowed or not. A genericarm64 machine specific bbappend to systemd-serialgetty to disable the package or clear out SERIAL_CONSOLES is "systemd" in DISTRO_FEATURES would be better then? systemd would remain machine agnostic but systemd-serialgetty would be machine specific since it takes SERIAL_CONSOLES as input anyway. I can't decide between these. :/ Cheers, -Mikko
On 23 Apr 2025, at 12:18, Mikko Rapeli <mikko.rapeli@linaro.org> wrote: > > Hi, > > On Tue, Apr 22, 2025 at 08:00:52PM +0100, Ross Burton wrote: >> 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. > > So all boots of genericarm64 on all HW now wait for the configured > SERIAL_CONSOLES timeouts. > > How should that be fixed? Unsetting SERIAL_CONSOLES in genericarm64 machine config? > So systemd-serialgetty is allowed to be machine specific but not systemd itself? Yes, systemd-serialgetty is explicitly machine-specific because it uses SERIAL_CONSOLES. When we have support for sysvinit to probe a serial console, we can just set SERIALCONSOLES=“” in the machine and rely on probing. Ross
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 \
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 <ross.burton@arm.com> --- meta/recipes-core/systemd/systemd_257.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)