From: Fabian Pflug <f.pflug@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Fabian Pflug <f.pflug@pengutronix.de>
Subject: [PATCH 2/3] startup: autoboot: disable on deactivated console
Date: Tue, 28 Oct 2025 13:18:19 +0100 [thread overview]
Message-ID: <20251028121820.1242298-2-f.pflug@pengutronix.de> (raw)
In-Reply-To: <20251028121820.1242298-1-f.pflug@pengutronix.de>
If the console input is deactivated either globally or through a
security policy, then it does not make sense to wait for user input, but
instead boot the system directly.
Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
common/startup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/common/startup.c b/common/startup.c
index 3bc2609006..ea5436afa6 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -188,9 +188,11 @@ enum autoboot_state do_autoboot_countdown(void)
if (autoboot_state != AUTOBOOT_UNKNOWN)
return autoboot_state;
- if (!console_get_first_active() &&
- global_autoboot_state != AUTOBOOT_ABORT &&
- global_autoboot_state != AUTOBOOT_HALT) {
+ if ((!console_get_first_active() &&
+ global_autoboot_state != AUTOBOOT_ABORT &&
+ global_autoboot_state != AUTOBOOT_HALT) ||
+ !IS_ALLOWED(SCONFIG_CONSOLE_INPUT) ||
+ IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT)) {
printf("\nNon-interactive console, booting system\n");
return autoboot_state = AUTOBOOT_BOOT;
}
--
2.47.3
next prev parent reply other threads:[~2025-10-28 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 12:18 [PATCH 1/3] startup: check for console before showing menu Fabian Pflug
2025-10-28 12:18 ` Fabian Pflug [this message]
2025-10-28 12:49 ` [PATCH 2/3] startup: autoboot: disable on deactivated console Ahmad Fatoum
2025-10-28 12:18 ` [PATCH 3/3] startup: mount ps only on policy FS_EXTERNAL Fabian Pflug
2025-10-28 12:56 ` Ahmad Fatoum
2025-10-28 13:48 ` Fabian Pflug
2025-10-28 12:39 ` [PATCH 1/3] startup: check for console before showing menu Ahmad Fatoum
2025-10-28 13:43 ` Fabian Pflug
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=20251028121820.1242298-2-f.pflug@pengutronix.de \
--to=f.pflug@pengutronix.de \
--cc=barebox@lists.infradead.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