[PATCH v2 33/39] efi: Use the same filename for all sandbox builds

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Aug 8 12:18:19 CEST 2024


Hi Simon,

On Tue, 6 Aug 2024 at 15:59, Simon Glass <sjg at chromium.org> wrote:
>
> Sandbox is not a real architecture, but within U-Boot it is real enough.
> We should not need to pretend it is x86 or ARM anywhere in the code.
>
> Also we want to be able to locate the sandbox app using a single
> filename, 'bootsbox.efi', to avoid needing tests to produce different
> files on each host architecture.
>
> Drop the confusing use of host architecture and just let sandbox be
> sandbox.
>
> Fixes: 3a0654ecd0d ("efi_loader: correctly identify binary name")
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  include/efi_default_filename.h | 25 ++-----------------------
>  1 file changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h
> index 77932984b55..6806c0daa88 100644
> --- a/include/efi_default_filename.h
> +++ b/include/efi_default_filename.h
> @@ -5,7 +5,6 @@
>   * file name is defined in this include.
>   *
>   * Copyright (c) 2022, Heinrich Schuchardt <xypron.glpk at gmx.de>
> - * Copyright (c) 2022, Linaro Limited

Any reasons why you removed this?

Thanks
/Ilias
>   */
>
>  #ifndef _EFI_DEFAULT_FILENAME_H
> @@ -16,26 +15,8 @@
>  #undef BOOTEFI_NAME
>
>  #ifdef CONFIG_SANDBOX
> -
> -#if HOST_ARCH == HOST_ARCH_X86_64
> -#define BOOTEFI_NAME "BOOTX64.EFI"
> -#elif HOST_ARCH == HOST_ARCH_X86
> -#define BOOTEFI_NAME "BOOTIA32.EFI"
> -#elif HOST_ARCH == HOST_ARCH_AARCH64
> -#define BOOTEFI_NAME "BOOTAA64.EFI"
> -#elif HOST_ARCH == HOST_ARCH_ARM
> -#define BOOTEFI_NAME "BOOTARM.EFI"
> -#elif HOST_ARCH == HOST_ARCH_RISCV32
> -#define BOOTEFI_NAME "BOOTRISCV32.EFI"
> -#elif HOST_ARCH == HOST_ARCH_RISCV64
> -#define BOOTEFI_NAME "BOOTRISCV64.EFI"
> -#else
> -#error Unsupported UEFI architecture
> -#endif
> -
> -#else
> -
> -#if defined(CONFIG_ARM64)
> +#define BOOTEFI_NAME "BOOTSBOX.EFI"
> +#elif defined(CONFIG_ARM64)
>  #define BOOTEFI_NAME "BOOTAA64.EFI"
>  #elif defined(CONFIG_ARM)
>  #define BOOTEFI_NAME "BOOTARM.EFI"
> @@ -52,5 +33,3 @@
>  #endif
>
>  #endif
> -
> -#endif
> --
> 2.34.1
>


More information about the U-Boot mailing list