On Fri, 29 Oct 2021 at 17:03, AKASHI Takahiro <takahiro.aka...@linaro.org> wrote: > > On Fri, Oct 29, 2021 at 04:42:45PM +0300, Ilias Apalodimas wrote: > > Hi Tom, > > > > On Fri, 29 Oct 2021 at 15:39, Tom Rini <tr...@konsulko.com> wrote: > > > > > > On Fri, Oct 29, 2021 at 08:45:06AM +0300, Ilias Apalodimas wrote: > > > > On Wed, Oct 27, 2021 at 12:34:40PM -0600, Simon Glass wrote: > > > > > Hi Ilias, > > > > > > > > > > On Wed, 27 Oct 2021 at 08:48, Ilias Apalodimas > > > > > <ilias.apalodi...@linaro.org> wrote: > > > > > > > > > > > > Hi Simon, > > > > > > > > > > > > On Wed, Oct 27, 2021 at 08:09:04AM -0600, Simon Glass wrote: > > > > > > > Hi Ilias, > > > > > > > > > > > > > > On Wed, 27 Oct 2021 at 02:36, Ilias Apalodimas > > > > > > > <ilias.apalodi...@linaro.org> wrote: > > > > > > > > > > > > > > > > Hi Simon, > > > > > > > > > > > > > > > > On Sun, 24 Oct 2021 at 02:27, Simon Glass <s...@chromium.org> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > Add a bootmeth driver which handles EFI boot, using > > > > > > > > > EFI_LOADER. > > > > > > > > > > > > > > > > > > In effect, this provides the same functionality as the > > > > > > > > > 'bootefi' command > > > > > > > > > and shares the same code. But the interface into it is via a > > > > > > > > > bootmeth, > > > > > > > > > so it does not require any special scripts, etc. > > > > > > > > > > > > > > > > > > For now this requires the 'bootefi' command be enabled. > > > > > > > > > Future work may > > > > > > > > > tidy this up so that it can be used without CONFIG_CMDLINE > > > > > > > > > being enabled. > > > > > > > > > > > > > > > > I'll leave this up to Heinrich, but personally I wouldn't > > > > > > > > include this > > > > > > > > patch at all. EFI has it's bootmgr which can handle booting > > > > > > > > just fine. > > > > > > > > I don't see why we should duplicate the functionality. The new > > > > > > > > boot > > > > > > > > method can just have an entry called 'EFI' and then let the > > > > > > > > existing > > > > > > > > EFI code to decide. > > > > > > > > > > > > > > This is needed so that EFI boot is actually invoked. If bootmgr > > > > > > > starts > > > > > > > being used then it can still be invoked from standard boot. The > > > > > > > point > > > > > > > is that there is a standard way of booting that supports EFI and > > > > > > > other > > > > > > > things. > > > > > > > > > > > > This patch tries to reason about the default naming EFI imposes on > > > > > > it's > > > > > > boot files. distro_efi_read_bootflow() will try to find files > > > > > > following the > > > > > > EFI naming convention (e.g bootaarch64.efi, bootarm.efi etc). If > > > > > > those are > > > > > > found it will try to boot them right? That's not the right thing > > > > > > to do though. > > > > > > On the EFI spec these files are tried if no Boot#### variables are > > > > > > found. > > > > > > So we can get rid of this entirely, add a dummy entry on the > > > > > > bootflow that > > > > > > says 'boot the efi manager' (which is what the next patch does). > > > > > > > > > > > > The efibootmgr then will check Boot#### variables and if none are > > > > > > found, > > > > > > it's going to fallback into loading bootaarch64.efi, bootarm.efi etc > > > > > > essentially offering identical functionality. > > > > > > > > > > Yes that's fine, and when EFI's boot manager is in use I have a driver > > > > > for that too, as you can see in the other patch. We may need to adjust > > > > > the order, by the sound of it, if it needs to run before EFI things. > > > > > But that is easy enough. > > > > > > > > That's the point though. I don't want to have 2 different ways of > > > > booting EFI > > > > as I don't see any benefit. Do you? > > > > > > Unless we're saying that "bootefi bootmgr" is ready to be used always > > > and without further pre-req support (which I don't think is quite the > > > case, since we don't have persistent EFI vars, so can't set Boot### > > > persistently or via userspace) _something_ is likely needed to either > > > set those, or scan a configurable list of where, to find the EFI > > > payload. > > > > The efibootmgr will try to boot bootaa64.efi, bootarm.efi etc if > > Boot### variables are not found. > > To be clear, the current efibootmgr (or "bootefi bootmgr" command) > doesn't have this feature. Instead, distro_bootcmd mimics it in some way. > # I have an experimental patch to efibootmgr for the support, though.
Ah thanks Akashi! I thought we had that already. In any case it makes much more sense adding that to efibootmgr, instead of inventing yet another way to do that, doesn't it? > > Nevertheless, > > > The Boot#### themselves are > > obviously configurable from U-Boot(at boot time). Since this method > > doesn't allow Linux to edit the boot options either,> > > Yeah. Please remember that, even on normal PCs, specifying an order of > boot devices (for "removable media" with the default path) is done > through UEFI UI. > > -Takahiro Akashi > > > is it something > > we need? Since distros usually name their SHIM as bootaa64.efi, I am > > afraid we are adding code that we will rarely (if at all) ever use. > > > > Regards > > > > > > /Ilias > > > > > > -- > > > Tom Regards /Ilias