grub2/0196-grub-install-Define-default-platform-for-RISC-V.patch
Petr Šabata 100e37f2e6 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/grub2#f7e054f3d693af43a903faf33b70673f7aca4508
2020-10-15 09:48:35 +02:00

32 lines
966 B
Diff

From 0000000000000000000000000000000000000000 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 37fcdac12cc..8b6a037903e 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
#else
return NULL;
#endif