[PATCH] efi_loader: Allow disabling ANSI console queries via env variable

Michal Simek michal.simek at amd.com
Fri Mar 13 13:57:58 CET 2026



On 3/13/26 13:54, Ilias Apalodimas wrote:
> Hi Michal
> 
> On Tue, 10 Mar 2026 at 15:50, Michal Simek <michal.simek at amd.com> wrote:
>>
>> Commit 4cb724364030 ("efi_loader: Disable ANSI output for tests")
>> introduced efi_console_set_ansi() to suppress ANSI escape sequences
>> during unit tests. Extend this mechanism to be runtime-configurable via
>> the 'no_ansi' U-Boot environment variable.
>>
>> When 'no_ansi' is set to 'yes', efi_console_set_ansi(false) is called
>> at the start of efi_setup_console_size(). This prevents
>> query_console_serial() from sending ANSI escape sequences to the
>> terminal, using default 25x80 dimensions instead. This is useful for
>> platforms where the serial console cannot handle ANSI queries.
> 
> I am fine with the patch, but the no_ansi is a bit misleading reading the code.
> It really means don't use ANSI queries to detect the console.  So
> before creating an ABI to the cmd line should we really call it
> "no_ansi" or perhaps "no_detect" and in the future clean up the
> variable names as well?

I don't really mind about variable name. Suggestions welcome.

Thanks,
Michal


More information about the U-Boot mailing list