[U-Boot] [PATCH v2 15/21] efi_loader: add bootmgr

Simon Glass
2017-09-12T12:30:31Z

On 10 September 2017 at 05:21, Rob Clark <robdclark@gmail.com> wrote:
> Similar to a "real" UEFI implementation, the bootmgr looks at the
> BootOrder and BootXXXX variables to try to find an EFI payload to load
> and boot. This is added as a sub-command of bootefi.
>
> The idea is that the distro bootcmd would first try loading a payload
> via the bootmgr, and then if that fails (ie. first boot or corrupted
> EFI variables) it would fallback to loading bootaa64.efi. (Which
> would then load fallback.efi which would look for \EFI\*\boot.csv and
> populate BootOrder and BootXXXX based on what it found.)
>
> Signed-off-by: Rob Clark <robdclark@gmail.com>
> ---
> cmd/bootefi.c | 48 ++++++++++-
> include/config_distro_bootcmd.h | 5 ++
> include/efi_api.h | 4 +
> include/efi_loader.h | 6 ++
> lib/efi_loader/Makefile | 2 +-
> lib/efi_loader/efi_bootmgr.c | 169 ++++++++++++++++++++++++++++++++++++++
> lib/efi_loader/efi_boottime.c | 6 +-
> lib/efi_loader/efi_image_loader.c | 1 +
> 8 files changed, 235 insertions(+), 6 deletions(-)
> create mode 100644 lib/efi_loader/efi_bootmgr.c

Please can you add function comments to your static functions?