[PATCH 2/3] startup: autoboot: disable on deactivated console
Fabian Pflug
f.pflug at pengutronix.de
Tue Oct 28 05:18:19 PDT 2025
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 at 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
More information about the barebox
mailing list