From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/systemd: fix "Timed out waiting for device /dev/console."
Date: Sun, 3 Mar 2019 12:54:13 +0100 [thread overview]
Message-ID: <20190303115413.GG2721@scaer> (raw)
In-Reply-To: <20190303113052.9120-1-xruppen@gmail.com>
Xavier, All,
On 2019-03-03 12:30 +0100, Xavier Ruppen spake thusly:
> Buildroot built with systemd fails to open a login prompt on the
> serial port when /dev/console is specified as BR2_TARGET_GENERIC_GETTY_PORT
> (which is its default value):
>
> systemd[1]: dev-console.device: Job dev-console.device/start timed out.
> systemd[1]: Timed out waiting for device /dev/console.
> systemd[1]: Dependency failed for Serial Getty on console.
> systemd[1]: serial-getty at console.service: Job serial-getty at console.service/start failed with result 'dependency'.
> systemd[1]: dev-console.device: Job dev-console.device/start failed with result 'timeout'.
> systemd[1]: Reached target Login Prompts.
> systemd[1]: Reached target Multi-User System.
>
> According to this issue on Github [1], serial-getty at .service should
> not be instantiated on /dev/console, console-getty at .service should
> be used instead. This stems from the fact that there should be no
> dependency on /dev/console.
>
> [1] https://github.com/systemd/systemd/issues/10914
>
> Signed-off-by: Xavier Ruppen <xruppen@gmail.com>
> ---
> package/systemd/systemd.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 7a46a50ed3..f378203e8d 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -397,11 +397,15 @@ endef
>
> ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
> # systemd needs getty.service for VTs and serial-getty.service for serial ttys
> +# note that console-getty.service should be used on /dev/console as it should not have dependencies
> # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
> define SYSTEMD_INSTALL_SERVICE_TTY
> if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
> then \
> SERVICE="getty"; \
> + elif echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'console'; \
> + then \
> + SERVICE="console-getty"; \
Actually, I think we should check for 'console' first, and since this is
a literal, we do not need grep, just a test for equality:
if [ $(BR2_TARGET_GENERIC_GETTY_PORT) = /dev/console ]; \
then \
SERVICE="console-getty"; \
elif echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
then \
[...]
fi
Otherwise, I'm OK with this change.
Regards,
Yann E. MORIN.
> else \
> SERVICE="serial-getty"; \
> fi; \
> --
> 2.21.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-03-03 11:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-03 11:30 [Buildroot] [PATCH 1/1] package/systemd: fix "Timed out waiting for device /dev/console." Xavier Ruppen
2019-03-03 11:54 ` Yann E. MORIN [this message]
2019-03-03 20:26 ` Peter Korsgaard
2019-03-03 20:48 ` Yann E. MORIN
2019-03-03 21:21 ` Peter Korsgaard
2019-03-03 21:37 ` Yann E. MORIN
2019-03-03 21:55 ` Xavier Ruppen
2019-03-03 20:04 ` [Buildroot] [PATCH v2 " Xavier Ruppen
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=20190303115413.GG2721@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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