From: Michael Walle Date: Tue, 29 Sep 2020 06:54:48 +0000 (+0200) Subject: distro_bootcmd: call EFI bootmgr even without having /EFI/boot X-Git-Tag: v2021.10~494^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3866909e35074ea6f50226d40487a180de1132f;p=platform%2Fkernel%2Fu-boot.git distro_bootcmd: call EFI bootmgr even without having /EFI/boot Currently, the EFI bootmgr is only called if there is a EFI binary inside the path for removable media is found, i.e. /EFI/boot/. This doesn't make sense. It is the duty of the bootmgr to find out the path and name of the EFI binary to boot. It should be called even if there is no /EFI/boot directory. Thus, call the bootmgr before we try to boot the EFI binary inside the removable media path. Also remove the ${fdtcontroladdr} parameter because the fallback is handled in cmd/bootefi.c and that already takes care of correct settings if the board has ACPI and thus no device tree at all. Signed-off-by: Michael Walle Reviewed-by: Heinrich Schuchardt --- diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index fc0935f..ff29ef5 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -123,12 +123,14 @@ #define BOOTENV_SHARED_EFI \ - "boot_efi_binary=" \ + "boot_efi_bootmgr=" \ "if fdt addr ${fdt_addr_r}; then " \ "bootefi bootmgr ${fdt_addr_r};" \ "else " \ - "bootefi bootmgr ${fdtcontroladdr};" \ - "fi;" \ + "bootefi bootmgr;" \ + "fi\0" \ + \ + "boot_efi_binary=" \ "load ${devtype} ${devnum}:${distro_bootpart} " \ "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ "if fdt addr ${fdt_addr_r}; then " \ @@ -152,6 +154,7 @@ "run load_efi_dtb; " \ "fi;" \ "done;" \ + "run boot_efi_bootmgr;" \ "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ "efi/boot/"BOOTEFI_NAME"; then " \ "echo Found EFI removable media binary " \