[PATCH 4/4] efi: Avoid using dm_scan_other()

Tom Rini trini at konsulko.com
Sun Nov 12 20:46:42 CET 2023


On Sun, Nov 12, 2023 at 08:19:57PM +0100, Heinrich Schuchardt wrote:
> 
> 
> Am 12. November 2023 19:03:57 MEZ schrieb Tom Rini <trini at konsulko.com>:
> >On Sun, Nov 12, 2023 at 08:58:05AM -0700, Simon Glass wrote:
> >> This function is defined by bootstd so using it precludes using that
> >> feature. Use the board_early_init_r() feature instead.
> >> 
> >> Signed-off-by: Simon Glass <sjg at chromium.org>
> >> ---
> >> 
> >>  configs/efi-x86_app64_defconfig | 1 +
> >>  lib/efi/efi_app.c               | 5 ++---
> >>  2 files changed, 3 insertions(+), 3 deletions(-)
> >> 
> >> diff --git a/configs/efi-x86_app64_defconfig b/configs/efi-x86_app64_defconfig
> >> index d6b6c3d82995..e6a62b30dd09 100644
> >> --- a/configs/efi-x86_app64_defconfig
> >> +++ b/configs/efi-x86_app64_defconfig
> >> @@ -17,6 +17,7 @@ CONFIG_USE_BOOTCOMMAND=y
> >>  CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
> >>  CONFIG_SYS_CONSOLE_INFO_QUIET=y
> >>  CONFIG_DISPLAY_BOARDINFO_LATE=y
> >> +CONFIG_BOARD_EARLY_INIT_R=y
> >>  CONFIG_HUSH_PARSER=y
> >>  CONFIG_SYS_PBSIZE=532
> >>  CONFIG_CMD_BOOTZ=y
> >> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
> >> index c5eb816655ea..1bced775a4d0 100644
> >> --- a/lib/efi/efi_app.c
> >> +++ b/lib/efi/efi_app.c
> >> @@ -302,15 +302,14 @@ static int setup_block(void)
> >>  }
> >>  
> >>  /**
> >> - * dm_scan_other() - Scan for UEFI devices that should be available to U-Boot
> >> + * board_early_init_r() - Scan for UEFI devices that should be available
> >>   *
> >>   * This sets up block devices within U-Boot for those found in UEFI. With this,
> >>   * U-Boot can access those devices
> >>   *
> >> - * @pre_reloc_only: true to only bind pre-relocation devices (ignored)
> >>   * Returns: 0 on success, -ve on error
> >>   */
> >> -int dm_scan_other(bool pre_reloc_only)
> >> +int board_early_init_r(void)
> >>  {
> >>  	if (gd->flags & GD_FLG_RELOC) {
> >>  		int ret;
> >
> >Should this file really be board/efi/efi-x86_app/something.c ? We don't
> 
> The EFI app should not be x86 specific.

Yes, I suspect a follow-up would be to do whatever is needed to target a
given architecture with the U-Boot as EFI application board.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231112/6d05b539/attachment.sig>


More information about the U-Boot mailing list