[PATCH v2 5/6] cmd: bootmenu: add parameter -e for UEFI boot options

Tom Rini trini at konsulko.com
Tue Jan 14 02:27:25 CET 2025


On Mon, Jan 13, 2025 at 05:15:08PM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Mon, 13 Jan 2025 at 13:35, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Mon, Jan 13, 2025 at 01:09:16PM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Mon, 13 Jan 2025 at 12:24, Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > On Mon, Jan 13, 2025 at 12:01:45PM -0700, Simon Glass wrote:
> > > > > Hi,
> > > > >
> > > > > On Sun, 12 Jan 2025 at 18:51, Tom Rini <trini at konsulko.com> wrote:
> > > > > >
> > > > > > On Sun, Jan 12, 2025 at 08:08:13PM +0100, Heinrich Schuchardt wrote:
> > > > > > > Tom Rini <trini at konsulko.com> schrieb am Fr., 10. Jan. 2025, 23:46:
> > > > > > >
> > > > > > > > On Wed, Nov 27, 2024 at 08:06:30AM +0100, Heinrich Schuchardt wrote:
> > > > > > > >
> > > > > > > > > The bootmenu command can display
> > > > > > > > >
> > > > > > > > > * menu entries defined by environment variables
> > > > > > > > > * menu entries defined by UEFI boot options
> > > > > > > > >
> > > > > > > > > Not in all cases showing the UEFI boot options is desired.
> > > > > > > > > Provide a new parameter '-e' to select the display of UEFI boot options.
> > > > > > > > >
> > > > > > > > > Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> > > > > > > > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> > > > > > > >
> > > > > > > > Very strangely, this leads to the EFI selftest "Executing 'random number
> > > > > > > > generator'" test failing on Pi 4, where was was passing previously (and
> > > > > > > > Pi 4 has an RNG, unlike Pi 3), and this is
> > > > > > >
> > > > > > > Do you have a link to the log?
> > > > > >
> > > > > > Here's the failing part:
> > > > > > Setting up 'random number generator'
> > > > > > ESC[0;37;40mESC[1;32;40mSetting up 'random number generator' succeeded
> > > > > > ESC[0;37;40mESC[1;34;40m
> > > > > > Executing 'random number generator'
> > > > > > ESC[0;37;40mESC[1;31;40mlib/efi_selftest/efi_selftest_rng.c(52):
> > > > > > ERROR: ESC[0;37;40mESC[1;31;40mRandom number generator protocol not
> > > > > > available
> > > > > > ESC[0;37;40mESC[1;31;40mlib/efi_selftest/efi_selftest.c(114):
> > > > > > ERROR: ESC[0;37;40mESC[1;31;40mExecuting 'random number generator'
> > > > > > failed
> > > > > > ESC[0;37;40mESC[1;34;40m
> > > > >
> > > > > This might help make the log more intelligible.
> > > > >
> > > > > https://patchwork.ozlabs.org/project/uboot/patch/20240811145209.4191404-37-sjg@chromium.org/
> > > >
> > > > Shrug, it's the age old problem of sending raw stdout to a file. It
> > > > looks fine on console as it happens, I was just grabbing from an
> > > > existing log.
> > >
> > > Oh well. I would probably suggest only writing this junk to log files
> > > if we actually need it in there (i.e. something is programmatically
> > > checking), but it seems like this is a different situation from the
> > > one my patch fixes.
> >
> > I mean, yes? The problem here is that the random number generator test
> > now fails, when it didn't before. As far as I know (and I think the rest
> > of us understood?) your problem was that the ANSI sequences exist.
> 
> Yes, I want them to be controlled, so we can have them when needed
> (e.g. for user benefit, getting the terminal size) but not when not
> needed (CI output, log files, testing that ANSI works, etc.)

Yes, and Heinrich said for the test he wrote he finds having color
sequences to them (and not just the color sequence tests) helpful. That
is literally the only place we have them when not strictly needed AFAIK.
So using one of the countless "strip ansi color sequences from my log"
tool seems the best option here, when bothered by them.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250113/d0907092/attachment.sig>


More information about the U-Boot mailing list