1 Star 0 Fork 99

src-NestOS/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0192-grub-install-Define-default-platform-for-RISC-V.patch 979 Bytes
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 06417565c4c66b670f72e5b0cc7ae9e7e147aaad Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Thu, 15 Aug 2019 16:55:13 +0200
Subject: [PATCH 192/220] 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 37fcdac..8b6a037 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
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-nest-os/grub2.git
git@gitee.com:src-nest-os/grub2.git
src-nest-os
grub2
grub2
master

搜索帮助