[U-Boot] [RFC v3 00/10] efi_loader: rework bootefi/bootmgr
AKASHI Takahiro
takahiro.akashi at linaro.org
Tue Apr 16 04:24:18 UTC 2019
There are several reasons that I want to rework/refactor bootefi command
as well as bootmgr:
* Some previous commits on bootefi.c have made the code complicated
and a bit hard to understand.
* do_bootefi_exec() would better be implemented using load_image() along
with start_image() to be aligned with UEFI interfaces.
* Contrary to the other part, efi_selftest part of the code is unusual
in terms of loading/execution path in do_bootefi().
* When we will support "secure boot" in the future, EFI Boot Manager
is expected to be invoked as a standalone command without any arguments
to mitigate security surfaces.
In this patch set,
Patch#1 to #8 are preparatory patches for patch#9.
Patch#9 is a core part of reworking.
Patch#10 is for standalone boot manager.
# Please note that some patches, say patch#3 and #4, can be combined into one
# but I intentionally keep them separated to clarify my intentions of changes.
Issues:
* The semantics of efi_dp_from_name() should be changed.
(See FIXME in patch#9.)
-Takahiro Akashi
Changes in RFC v3 (Apr 16, 2019)
* rebased on v2019.04
* delete already-merged patches
* add patch#2 for exporting root node
* use correct/more appropriate return code (CMD_RET_xxx) (patch#3,5,7)
* remove a message at starting an image in bootefi command, instead
adding a debug message in efi_start_image()
* use root node as a dummy parent handle when calling efi_start_image()
* remove efi_unload_image() in bootefi command
Changes in RFC v2 (Mar 27, 2019)
* rebased on v2019.04-rc4
* use load_image API in do_bootmgr_load()
* merge efi_install_fdt() and efi_process_fdt()
* add EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL to image (patch#1)
* lots of minor changes
AKASHI Takahiro (10):
efi_loader: device_path: handle special case of loading
efi_loader: export root node handle
cmd: bootefi: carve out fdt handling from do_bootefi()
cmd: bootefi: merge efi_install_fdt() and efi_process_fdt()
cmd: bootefi: carve out efi_selftest code from do_bootefi()
cmd: bootefi: move do_bootefi_bootmgr_exec() forward
cmd: bootefi: carve out bootmgr code from do_bootefi()
cmd: bootefi: carve out do_boot_efi() from do_bootefi()
efi_loader: rework bootmgr/bootefi using load_image API
cmd: add efibootmgr command
cmd/Kconfig | 8 +
cmd/bootefi.c | 515 ++++++++++++++++++++-----------
include/efi_loader.h | 7 +-
lib/efi_loader/efi_bootmgr.c | 43 +--
lib/efi_loader/efi_boottime.c | 2 +
lib/efi_loader/efi_device_path.c | 8 +
lib/efi_loader/efi_root_node.c | 13 +-
7 files changed, 381 insertions(+), 215 deletions(-)
--
2.20.1
More information about the U-Boot
mailing list