[PATCH 1/1] cli: always show cursor

Pali Rohár pali at kernel.org
Sun Nov 20 20:12:14 CET 2022


On Saturday 22 October 2022 11:20:58 Heinrich Schuchardt wrote:
> We may enter the command line interface in a state where on the remote
> console the cursor is not shown. Send an escape sequence to enable it.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  common/main.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/common/main.c b/common/main.c
> index 682f3359ea..4e7e7b17d6 100644
> --- a/common/main.c
> +++ b/common/main.c
> @@ -7,6 +7,7 @@
>  /* #define	DEBUG	*/
>  
>  #include <common.h>
> +#include <ansi.h>
>  #include <autoboot.h>
>  #include <bootstage.h>
>  #include <cli.h>
> @@ -66,6 +67,9 @@ void main_loop(void)
>  
>  	autoboot_command(s);
>  
> +	if (!CONFIG_IS_ENABLED(DM_VIDEO) || CONFIG_IS_ENABLED(VIDEO_ANSI))
> +		printf(ANSI_CURSOR_SHOW "\n");

I think that this does not work anymore. Support for "h"/"l" ansi escape
sequences to show and hide cursor was removed from U-Boot together with
cfg_console.c driver done by Simon for v2022.07 version.

Now I verified that cursor is really permanently turned off (meaning
unsupported) on Nokia N900 even when CONFIG_VIDEO_ANSI is enabled.

So prior adding ANSI_CURSOR_SHOW on new places, I would suggest to first
revert and implement functions for showing and hiding cursor.

> +
>  	cli_loop();
>  	panic("No CLI available");
>  }
> -- 
> 2.37.2
> 


More information about the U-Boot mailing list