[PATCH v5 3/8] efi_loader: bootstd: Drop bootmgr for sunxi

Ilias Apalodimas ilias.apalodimas at linaro.org
Sat Nov 23 17:56:05 CET 2024


Hi Andre,

[...]

> > >So while I agree that disabling efi_bootmgr sounds like a hack, it
> > >solves the problem quite elegantly: We keep the (current) boot order,
> > >which prioritises scripts over EFI, but still retain EFI. If people
> > >want EFI first, they can change the order in the environment (I think?).
> > >
> > >Without that patch there is quite a regression for users, because
> > >suddenly any bootaa64.efi files *somewhere* would be booted first, and
> > >there is no way to turn that off.
> > >
> > >This has bitten me actually: for development I put a custom boot.scr on
> > >an SD card which loads a kernel+DTB via TFTP from my box. And I want
> > >that to be first, despite there being a proper EFI setup on the eMMC or
> > >USB drive.
> > >
> > >So I hope that clears that up. I am not a big fan of that patch, but I
> > >would like sunxi to be converted, and Simon seemed to be eager to do
> > >this as well, so in the interest of not blocking this, I am fine with
> > >that.
> >
> > Disabling EFI will break booting for users that rely on it (like me).
>
> So are you using the UEFI BootOrder variables? How do you set them?
> Manually on the U-Boot shell, or via some Linux tool manipulating the
> U-Boot environment file? IIUC those are the only two methods that work
> for sunxi, since the UEFI variable runtime services are not implemented.

I haven't followed the rest of the thread but EFI runtime does work
since commit 00da8d65a3ba.
Yes for now you have to manually dd the file on updates, but this is
supposed to be solved by [0]

>
> In reality I am using UEFI booting as well, but entirely rely on
> bootaa64.efi, hence bootmeth_efi is totally sufficient for me.
>
> > Yes, the introduction of boot standard changed the boot order and specifically deprioritizing scripts is unexpected.
> >
> > The priority sequence used to be
> >
> > scripts
> > extlinux
> > efi
> > pxe
> >
> > bootmeth_efimgr always running before scripts be fixed.
>
> I agree, but with bootmeth_efimgr marked as global this is not gonna work
> easily, at least that's my understanding.
>
> > bootmeth_efi should be removed from the code base as redundant.
>
> I wonder if a solution is to split this up: bootmeth_efimgr is only
> looking at variables - then "glob" would be correct. Then people
> can place bootmeth_efi at the position they want, either before the
> scripts (allowing USB boot) or after. I think this would also solve the
> case where bootaa64.efi is both on an eMMC and an SD card, as it would
> pick the boot media first.
>
> A lot of sunxi use cases are embedded, and people mostly don't
> want to boot from USB on for instance their TV box, just because the
> stick with the movies and some bootaa64.efi was still in the slot when
> they turned the box on. Even more so for truly embedded devices. And
> that's also the default setting for PCs, I think, where USB booting
> would need to be explicitly enabled in the BIOS.
>
> Cheers,
> Andre

[0] https://github.com/rhboot/efivar/pull/267

Cheers
/Ilias


More information about the U-Boot mailing list