On 26.09.24 23:59, Simon Glass 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.

As I already wrote in
https://lore.kernel.org/u-boot/ae1cf1fa-766e-46a0-8ef9-2c2c7af73...@gmx.de/
this patch should not be merged.

bootsbx.efi does not exist in the UEFI specification.

Without this patch I can test that shim work and grub are correctly
loaded from a distro image. This patch makes the sandbox misbehave.

Best regards

Heinrich




Signed-off-by: Simon Glass <s...@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>
---

(no changes since v5)

Changes in v5:
- Drop the Fixes tag

Changes in v3:
- Put back the Linaro copyright accidentally removed

  include/efi_default_filename.h | 24 ++----------------------
  1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h
index 77932984b55..06ca8735002 100644
--- a/include/efi_default_filename.h
+++ b/include/efi_default_filename.h
@@ -16,26 +16,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 +34,3 @@
  #endif

  #endif
-
-#endif

Reply via email to