public inbox for poky@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Ross Burton <Ross.Burton@arm.com>
Cc: poky@lists.yoctoproject.org
Subject: Re: [PATCH] systemd-serialgetty: disable on genericarm64
Date: Tue, 8 Jul 2025 15:21:30 +0300	[thread overview]
Message-ID: <aG0NSheRvFVq9ZGP@nuoska> (raw)
In-Reply-To: <20250424111932.294612-1-mikko.rapeli@linaro.org>

Hi Ross,

I think this patch may have slipped through while waiting for your
tty refactoring and other patches. Could this be applied now?

The issue still exists and boot time to systemd "running" state
is delayed because if these timeouts.

Cheers,

-Mikko

On Thu, Apr 24, 2025 at 02:19:32PM +0300, Mikko Rapeli wrote:
> Upstream systemd setup with udev starts agetty on detected
> tty's so there is no need to use the build time SERIAL_CONSOLES
> variable.
> 
> Trying to start agetty on non-existing tty's from SERIAL_CONSOLES
> more than doubles the boot time to systemd "running" or "degraded"
> state. Boot time before this change (core-image-base with systemd-analyze,
> qemu, aarch64 build host):
> 
> root@genericarm64:~# systemd-analyze
> Startup finished in 2.409s (firmware) + 5.116s (loader) + 10.274s (kernel) + 1min 33.887s (userspace) = 1min 51.687s
> multi-user.target reached after 1min 33.876s in userspace.
> root@genericarm64:~# journalctl -b -a|grep tty|tail -15
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS1.device: Job dev-ttyS1.device/start timed out.
> Apr 24 08:51:01 genericarm64 systemd[1]: Timed out waiting for device /dev/ttyS1.
> Apr 24 08:51:01 genericarm64 systemd[1]: Dependency failed for Serial Getty on ttyS1.
> Apr 24 08:51:01 genericarm64 systemd[1]: serial-getty@ttyS1.service: Job serial-getty@ttyS1.service/start failed with result 'dependency'.
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS1.device: Job dev-ttyS1.device/start failed with result 'timeout'.
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS2.device: Job dev-ttyS2.device/start timed out.
> Apr 24 08:51:01 genericarm64 systemd[1]: Timed out waiting for device /dev/ttyS2.
> Apr 24 08:51:01 genericarm64 systemd[1]: Dependency failed for Serial Getty on ttyS2.
> Apr 24 08:51:01 genericarm64 systemd[1]: serial-getty@ttyS2.service: Job serial-getty@ttyS2.service/start failed with result 'dependency'.
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS2.device: Job dev-ttyS2.device/start failed with result 'timeout'.
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS0.device: Job dev-ttyS0.device/start timed out.
> Apr 24 08:51:01 genericarm64 systemd[1]: Timed out waiting for device /dev/ttyS0.
> Apr 24 08:51:01 genericarm64 systemd[1]: Dependency failed for Serial Getty on ttyS0.
> Apr 24 08:51:01 genericarm64 systemd[1]: serial-getty@ttyS0.service: Job serial-getty@ttyS0.service/start failed with result 'dependency'.
> Apr 24 08:51:01 genericarm64 systemd[1]: dev-ttyS0.device: Job dev-ttyS0.device/start failed with result 'timeout'.
> 
> Boot time with this change:
> 
> root@genericarm64:~# systemd-analyze
> Startup finished in 2.411s (firmware) + 5.109s (loader) + 10.208s (kernel) + 24.868s (userspace) = 42.598s
> multi-user.target reached after 24.848s in userspace.
> root@genericarm64:~# journalctl -b -a |grep tty|tail -15
> Apr 03 20:34:34 genericarm64 kernel: printk: legacy console [ttyAMA0] enabled
> Apr 03 20:34:34 genericarm64 kernel: 9040000.pl011: ttyAMA1 at MMIO 0x9040000 (irq = 14, base_baud = 0) is a PL011 rev1
> Apr 03 20:34:35 genericarm64 systemd[1]: Created slice Slice /system/getty.
> Apr 03 20:34:35 genericarm64 systemd[1]: Created slice Slice /system/serial-getty.
> Apr 03 20:34:35 genericarm64 systemd[1]: Expecting device /dev/ttyAMA0...
> Apr 03 20:34:44 genericarm64 systemd[1]: Found device /dev/ttyAMA0.
> Apr 03 20:34:51 genericarm64 kernel[349]: printk: legacy console [tty0] enabled
> Apr 03 20:34:51 genericarm64 kernel[349]: 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1
> Apr 03 20:34:51 genericarm64 kernel[349]: printk: legacy console [ttyAMA0] enabled
> Apr 03 20:34:51 genericarm64 kernel[349]: 9040000.pl011: ttyAMA1 at MMIO 0x9040000 (irq = 14, base_baud = 0) is a PL011 rev1
> Apr 03 20:34:52 genericarm64 systemd[1]: Started Getty on tty1.
> Apr 03 20:34:52 genericarm64 kernel[349]: systemd[1]: Created slice Slice /system/getty.
> Apr 03 20:34:52 genericarm64 kernel[349]: systemd[1]: Created slice Slice /system/serial-getty.
> Apr 03 20:34:52 genericarm64 kernel[349]: systemd[1]: Expecting device /dev/ttyAMA0...
> Apr 03 20:34:52 genericarm64 systemd[1]: Started Serial Getty on ttyAMA0.
> 
> Changing the SERIAL_CONSOLES variable with systemd init
> ("systemd" in DISTRO_FEATURES for example)
> is not possible so changing systemd-serialgetty directly.
> systemd-serialgetty is now always installed with systemd.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  .../recipes-core/systemd/systemd-serialgetty.bbappend         | 4 ++++
>  1 file changed, 4 insertions(+)
>  create mode 100644 meta-yocto-bsp/recipes-core/systemd/systemd-serialgetty.bbappend
> 
> diff --git a/meta-yocto-bsp/recipes-core/systemd/systemd-serialgetty.bbappend b/meta-yocto-bsp/recipes-core/systemd/systemd-serialgetty.bbappend
> new file mode 100644
> index 0000000000..9fd43259db
> --- /dev/null
> +++ b/meta-yocto-bsp/recipes-core/systemd/systemd-serialgetty.bbappend
> @@ -0,0 +1,4 @@
> +do_install:prepend:genericarm64() {
> +    # use systemd defaults to reduce boot delay from non-existing tty's
> +    exit 0
> +}
> -- 
> 2.43.0
> 


      reply	other threads:[~2025-07-08 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 11:19 [PATCH] systemd-serialgetty: disable on genericarm64 Mikko Rapeli
2025-07-08 12:21 ` Mikko Rapeli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aG0NSheRvFVq9ZGP@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=Ross.Burton@arm.com \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox