[PATCH v7 3/7] efi_loader: sandbox: Use a different filename for sandbox

Simon Glass sjg at chromium.org
Sat Oct 19 17:24:30 CEST 2024


Sandbox is a separate architecture in U-Boot. We want to create binaries
which can run no matter what host architecture is in use.

Create a special filename for sandbox, to avoid needing different
code paths when creating the file in CI.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v7:
- Just do the minimal update for the sandbox filename

 include/efi_default_filename.h | 32 +++++++++++---------------------
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h
index 13b9de8754a..6806c0daa88 100644
--- a/include/efi_default_filename.h
+++ b/include/efi_default_filename.h
@@ -14,31 +14,21 @@
 
 #undef BOOTEFI_NAME
 
-#if HOST_ARCH == HOST_ARCH_X86_64
-#define BOOTEFI_NAME "BOOTX64.EFI"
-#endif
-
-#if HOST_ARCH == HOST_ARCH_X86
-#define BOOTEFI_NAME "BOOTIA32.EFI"
-#endif
-
-#if HOST_ARCH == HOST_ARCH_AARCH64
+#ifdef CONFIG_SANDBOX
+#define BOOTEFI_NAME "BOOTSBOX.EFI"
+#elif defined(CONFIG_ARM64)
 #define BOOTEFI_NAME "BOOTAA64.EFI"
-#endif
-
-#if HOST_ARCH == HOST_ARCH_ARM
+#elif defined(CONFIG_ARM)
 #define BOOTEFI_NAME "BOOTARM.EFI"
-#endif
-
-#if HOST_ARCH == HOST_ARCH_RISCV32
+#elif defined(CONFIG_X86_64)
+#define BOOTEFI_NAME "BOOTX64.EFI"
+#elif defined(CONFIG_X86)
+#define BOOTEFI_NAME "BOOTIA32.EFI"
+#elif defined(CONFIG_ARCH_RV32I)
 #define BOOTEFI_NAME "BOOTRISCV32.EFI"
-#endif
-
-#if HOST_ARCH == HOST_ARCH_RISCV64
+#elif defined(CONFIG_ARCH_RV64I)
 #define BOOTEFI_NAME "BOOTRISCV64.EFI"
-#endif
-
-#ifndef BOOTEFI_NAME
+#else
 #error Unsupported UEFI architecture
 #endif
 
-- 
2.34.1



More information about the U-Boot mailing list