[v1,4/8] lfs/Config: Add EFI and GRUB architecture definitions for loongarch64

Message ID 20260805023956.3379890-5-vincent.mc.li@gmail.com
State New
Headers
Series Add loongarch64 architecture support to IPFire |

Commit Message

Vincent Li 5 Aug 2026, 2:39 a.m. UTC
Add support for building EFI bootable images on loongarch64 by defining
the appropriate architecture variables. This enables the build system
to correctly locate and build the EFI firmware, GRUB bootloader, and
associated boot components for the LoongArch64 architecture.

- Set EFI=1 to enable EFI support
- Set EFI_ARCH=LOONGARCH64 for EFI firmware selection
- Set GRUB_ARCH=loongarch64 to build the correct GRUB target

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
---
 lfs/Config | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lfs/Config b/lfs/Config
index 2334d5f0a..06ba065ea 100644
--- a/lfs/Config
+++ b/lfs/Config
@@ -111,7 +111,7 @@  DIR_TMP_PAK = $(DIR_TMP)/package-$(PROG)
 # Add the compiler location and version and specs to the ccache hash
 CCACHE_COMPILERCHECK += $(shell gcc -dumpspecs 2>/dev/null | md5sum | cut -d ' ' -f1)
 
-# We support EFI on x86_64 riscv64 and aarch64
+# We support EFI on x86_64 riscv64 aarch64 and loongarch64
 ifeq "$(BUILD_ARCH)" "x86_64"
 	EFI = 1
 	EFI_ARCH = x64
@@ -130,6 +130,12 @@  ifeq "$(BUILD_ARCH)" "aarch64"
 	GRUB_ARCH = arm64
 endif
 
+ifeq "$(BUILD_ARCH)" "loongarch64"
+	EFI = 1
+	EFI_ARCH = LOONGARCH64
+	GRUB_ARCH = $(BUILD_ARCH)
+endif
+
 CMAKE = cmake
 
 # In the toolchain, we might be cross-compiling and need cmake to know