[PATCH] cmd: ufetch: use 3-bit colour ANSI codes
Alexey Minnekhanov
alexeymin at postmarketos.org
Tue Feb 4 05:58:02 CET 2025
On 2/3/25 7:42 PM, Sam Day wrote:
> Currently, the 8-bit escapes are being used, which aren't supported by
> vidconsole_escape_char. Since the current usage maps directly to the
> 3-bit equivalents anyway, let's use those instead.
>
> With this change, the fetch output looks as fetching in the vidconsole
> as it does over serial!
>
> Signed-off-by: Sam Day <me at samcday.com>
> ---
> cmd/ufetch.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cmd/ufetch.c b/cmd/ufetch.c
> index ed5a856c7abbe08949b81e0b2f634edd8b390be5..46bd16824e613104a0c7f5b53ef274ffb8209c17 100644
> --- a/cmd/ufetch.c
> +++ b/cmd/ufetch.c
> @@ -24,8 +24,8 @@
> DECLARE_GLOBAL_DATA_PTR;
>
> #define LINE_WIDTH 40
> -#define BLUE "\033[38;5;4m"
> -#define YELLOW "\033[38;5;11m"
> +#define BLUE "\033[34m"
> +#define YELLOW "\033[33m"
> #define BOLD "\033[1m"
> #define RESET "\033[0m"
> static const char * const logo_lines[] = {
>
> ---
> base-commit: 2b1c8d3b2da46ce0f7108f279f04bc66f1d8d09a
> change-id: 20250203-ufetch-vidconsole-colours-0e6a9ebe2475
>
> Best regards,
I can see colors on my framebuffer now, thanks!
Tested-by: Alexey Minnekhanov <alexeymin at postmarketos.org>
More information about the U-Boot
mailing list