summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaotian Wu2023-06-29 16:52:28 +0200
committerMichael Brown2023-06-29 16:53:57 +0200
commit280942a92a4567796976e06d186d0a199ae0337e (patch)
tree1c9f8ee10da05f72754185081ea52397ea8eb0e2
parent[loong64] Add CPU sleeping API for EFI LoongArch64 (diff)
downloadipxe-280942a92a4567796976e06d186d0a199ae0337e.tar.gz
ipxe-280942a92a4567796976e06d186d0a199ae0337e.tar.xz
ipxe-280942a92a4567796976e06d186d0a199ae0337e.zip
[loong64] Add support for building EFI binaries
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/arch/loong64/Makefile.efi14
-rw-r--r--src/config/defaults/efi.h5
2 files changed, 19 insertions, 0 deletions
diff --git a/src/arch/loong64/Makefile.efi b/src/arch/loong64/Makefile.efi
new file mode 100644
index 00000000..1c51bcd6
--- /dev/null
+++ b/src/arch/loong64/Makefile.efi
@@ -0,0 +1,14 @@
+# -*- makefile -*- : Force emacs to use Makefile mode
+
+# Specify EFI image builder
+#
+ELF2EFI = $(ELF2EFI64)
+
+# Specify EFI boot file
+#
+EFI_BOOT_FILE = bootloongarch64.efi
+
+# Include generic EFI Makefile
+#
+MAKEDEPS += Makefile.efi
+include Makefile.efi
diff --git a/src/config/defaults/efi.h b/src/config/defaults/efi.h
index cb9e2348..e39d475b 100644
--- a/src/config/defaults/efi.h
+++ b/src/config/defaults/efi.h
@@ -67,4 +67,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IMAGE_GZIP /* GZIP image support */
#endif
+#if defined ( __loongarch__ )
+#define IOAPI_LOONG64
+#define NAP_EFILOONG64
+#endif
+
#endif /* CONFIG_DEFAULTS_EFI_H */