diff --git a/common/Kconfig b/common/Kconfig index 1a005b1722..4a76d02ad5 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -250,10 +250,12 @@ config CONSOLE_RECORD_IN_SIZE The buffer is allocated immediately after the malloc() region is ready. -config CONSOLE_DISABLE_CTRLC +config CONSOLE_DISABLE_CLI bool "disable ctrlc" + depends on BOOTDELAY = 0 + default y if AVB_VBMETA_PUBLIC_KEY_VALIDATE || FIT_SIGNATURE help - This disable ctrl+c when CONFIG_BOOTDELAY is 0. + This disable CLI interactive in verified-boot. config DISABLE_CONSOLE bool "disable console in & out" diff --git a/common/autoboot.c b/common/autoboot.c index d30d4e6701..760f44cf34 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -220,7 +220,7 @@ static int __abortboot(int bootdelay) #endif #ifdef CONFIG_ARCH_ROCKCHIP - if (ctrlc()) { /* we press ctrl+c ? */ + if (!IS_ENABLED(CONFIG_CONSOLE_DISABLE_CLI) && ctrlc()) { /* we press ctrl+c ? */ #else /* * Check if key already pressed diff --git a/common/cli.c b/common/cli.c index 57874d8797..a96db7e3e1 100644 --- a/common/cli.c +++ b/common/cli.c @@ -212,6 +212,7 @@ err: } #endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#ifndef CONFIG_CONSOLE_DISABLE_CLI void cli_loop(void) { #ifdef CONFIG_HUSH_PARSER @@ -224,6 +225,9 @@ void cli_loop(void) printf("## U-Boot command line is disabled. Please enable CONFIG_CMDLINE\n"); #endif /*CONFIG_HUSH_PARSER*/ } +#else +void cli_loop(void) { } +#endif void cli_init(void) { diff --git a/common/console.c b/common/console.c index 3e96261ad7..f399024397 100644 --- a/common/console.c +++ b/common/console.c @@ -655,11 +655,6 @@ static int ctrlc_disabled = 0; /* see disable_ctrl() */ static int ctrlc_was_pressed = 0; int ctrlc(void) { -#if defined(CONFIG_CONSOLE_DISABLE_CTRLC) && \ - defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY <= 0) - return 0; -#endif - #ifndef CONFIG_SANDBOX if (!ctrlc_disabled && gd->have_console) { if (tstc()) { diff --git a/lib/avb/libavb_user/Kconfig b/lib/avb/libavb_user/Kconfig index 6a5a307d4a..33dff1bc79 100755 --- a/lib/avb/libavb_user/Kconfig +++ b/lib/avb/libavb_user/Kconfig @@ -9,7 +9,6 @@ config AVB_LIBAVB_USER config AVB_VBMETA_PUBLIC_KEY_VALIDATE bool "Support vbmeta public key validate" depends on AVB_LIBAVB_USER - select CONSOLE_DISABLE_CTRLC help support vbmeta public key validate, system bootflow would be uninterruptale when it is enabled: