[PATCH 3/3] efi_loader: setting boot device

Simon Glass sjg at chromium.org
Tue Jan 19 19:06:25 CET 2021


Hi Heinrich,

On Tue, 12 Jan 2021 at 12:58, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Up to now the bootefi command used the last file loaded to determine the
> boot partition. This has led to errors when the fdt had been loaded from
> another partition after the EFI binary.
>
> Before setting the boot device from a loaded file check if it is a PE-COFF
> image or a FIT image.
>
> For a PE-COFF image remember address and size, boot device and path.
>
> For a FIT image remember boot device and path.
>
> If the PE-COFF image is overwritten by loading another file, forget it.
>
> Do not allow to start an image via bootefi which is not the last loaded
> PE-COFF image.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  cmd/bootefi.c        | 136 ++++++++++++++++++++++++++-----------------
>  doc/uefi/uefi.rst    |  11 ++--
>  fs/fs.c              |   3 +-
>  include/efi_loader.h |   6 +-
>  net/tftp.c           |   9 ++-
>  5 files changed, 98 insertions(+), 67 deletions(-)
>

Does this need an update to the tests?

Regards,
Simon


More information about the U-Boot mailing list