mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
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>
This commit is contained in:
1 parent
d33cbf2d8f
commit
ad5e446af1
12 files changed
+113
-39
No files matched your search
+7
-1
@@ -119,6 +119,7 @@ case "$target_cpu" in
|
||||
;;
|
||||
arm*) target_cpu=arm ;;
|
||||
aarch64*) target_cpu=arm64 ;;
|
||||
loongarch64) target_cpu=loongarch64 ;;
|
||||
riscv32*) target_cpu=riscv32 ;;
|
||||
riscv64*) target_cpu=riscv64 ;;
|
||||
esac
|
||||
@@ -144,6 +145,7 @@ if test "x$with_platform" = x; then
|
||||
ia64-*) platform=efi ;;
|
||||
arm-*) platform=uboot ;;
|
||||
arm64-*) platform=efi ;;
|
||||
loongarch64-*) platform=efi;;
|
||||
riscv32-*) platform=efi ;;
|
||||
riscv64-*) platform=efi ;;
|
||||
*)
|
||||
@@ -194,6 +196,7 @@ case "$target_cpu"-"$platform" in
|
||||
arm-coreboot) ;;
|
||||
arm-efi) ;;
|
||||
arm64-efi) ;;
|
||||
loongarch64-efi) ;;
|
||||
riscv32-efi) ;;
|
||||
riscv64-efi) ;;
|
||||
*-emu) ;;
|
||||
@@ -1236,7 +1239,8 @@ AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
|
||||
|
||||
LDFLAGS="$TARGET_LDFLAGS"
|
||||
|
||||
if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
|
||||
if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 \
|
||||
|| test "$target_cpu" = loongarch64 ; then
|
||||
# Use large model to support 4G memory
|
||||
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
|
||||
CFLAGS="$TARGET_CFLAGS -mcmodel=large"
|
||||
@@ -2021,6 +2025,8 @@ AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform =
|
||||
AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot])
|
||||
AM_CONDITIONAL([COND_i386_xen], [test x$target_cpu = xi386 -a x$platform = xxen])
|
||||
AM_CONDITIONAL([COND_i386_xen_pvh], [test x$target_cpu = xi386 -a x$platform = xxen_pvh])
|
||||
AM_CONDITIONAL([COND_loongarch64], [test x$target_cpu = xloongarch64])
|
||||
AM_CONDITIONAL([COND_loongarch64_efi], [test x$target_cpu = xloongarch64 -a x$platform = xefi])
|
||||
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
|
||||
AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc])
|
||||
AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform = xloongson])
|
||||
|
||||
Reference in new issue
Block a user