forked from pool/grub2
5c5a86e543
- Enable support for riscv64 - Backports from upstream: * risc-v-fix-computation-of-pc-relative-relocation-offset.patch * risc-v-add-clzdi2-symbol.patch * grub-install-define-default-platform-for-risc-v.patch OBS-URL: https://build.opensuse.org/request/show/741725 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=341
35 lines
1000 B
Diff
35 lines
1000 B
Diff
From 11268841e2e0130a862d15fce86d42cd6501bb49 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Schwab <schwab@suse.de>
|
|
Date: Thu, 15 Aug 2019 16:55:13 +0200
|
|
Subject: [PATCH] grub-install: Define default platform for RISC-V
|
|
|
|
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
Reviewed-by: Alexander Graf <agraf@csgraf.de>
|
|
---
|
|
util/grub-install.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/util/grub-install.c b/util/grub-install.c
|
|
index 8a55ad4b8..8970b73aa 100644
|
|
--- a/util/grub-install.c
|
|
+++ b/util/grub-install.c
|
|
@@ -324,6 +324,14 @@ get_default_platform (void)
|
|
return "arm64-efi";
|
|
#elif defined (__amd64__) || defined (__x86_64__) || defined (__i386__)
|
|
return grub_install_get_default_x86_platform ();
|
|
+#elif defined (__riscv)
|
|
+#if __riscv_xlen == 32
|
|
+ return "riscv32-efi";
|
|
+#elif __riscv_xlen == 64
|
|
+ return "riscv64-efi";
|
|
+#else
|
|
+ return NULL;
|
|
+#endif
|
|
#elif defined (__s390x__)
|
|
return "s390x-emu";
|
|
#else
|
|
--
|
|
2.23.0
|
|
|