loongarch: Add to build system

This patch adds LoongArch to the GRUB build system and various tools,
so GRUB can be built on LoongArch as a UEFI application.

Signed-off-by: Zhou Yang <zhouyang@loongson.cn>
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
This commit is contained in:
Wentao Guan
2024-08-25 16:43:24 +08:00
parent 583bcc85a3
commit 680df77687
12 changed files with 91 additions and 15 deletions

View File

@@ -539,6 +539,7 @@ main (int argc, char *argv[])
|| source_dirs[GRUB_INSTALL_PLATFORM_ARM_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_ARM64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_MIPS64EL_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_LOONGARCH64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV32_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_X86_64_EFI])
@@ -739,7 +740,8 @@ main (int argc, char *argv[])
|| source_dirs[GRUB_INSTALL_PLATFORM_IA64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_ARM_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_ARM64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_MIPS64EL_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_MIPS64EL_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_LOONGARCH64_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV32_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV64_EFI])
{
@@ -776,6 +778,12 @@ main (int argc, char *argv[])
imgname);
free (imgname);
imgname = grub_util_path_concat (2, efidir_efi_boot, "bootloongarch64.efi");
make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_LOONGARCH64_EFI,
"loongarch64-efi",
imgname);
free (imgname);
imgname = grub_util_path_concat (2, efidir_efi_boot, "bootmips64el.efi");
make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_MIPS64EL_EFI, "mips64el-efi",
imgname);