1 Star 0 Fork 50

yangqiming/grub2_3

forked from src-anolis-os/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0488-powerpc-fix-prefix-signed-grub-special-case-for-Powe.patch 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:15 . update to grub2-2.02-120.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Axtens <dja@axtens.net>
Date: Mon, 16 Aug 2021 16:01:47 +1000
Subject: [PATCH] powerpc: fix prefix + signed grub special case for PowerVM
Mea culpa: when testing the PowerPC special case for signed grub, I
assumed qemu and PowerVM would behave identically. This was wrong, and
with hindsight a pretty dumb error.
This fixes it. This time, I am actually testing on PowerVM.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
grub-core/kern/main.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
index 25dbcfef1..40a709117 100644
--- a/grub-core/kern/main.c
+++ b/grub-core/kern/main.c
@@ -235,9 +235,20 @@ grub_set_prefix_and_root (void)
which will have now been extended to device=$fwdisk,partition
and path=/path
- So we only need to act if device = ieee1275/disk exactly.
+ - PowerVM will give us device names like
+ ieee1275//vdevice/v-scsi@3000006c/disk@8100000000000000
+ and we don't want to try to encode some sort of truth table about
+ what sorts of paths represent disks with partition tables and those
+ without partition tables.
+
+ So we act unless there is a comma in the device, which would indicate
+ a partition has already been specified.
+
+ (If we only have a path, the code in normal to discover config files
+ will try both without partitions and then with any partitions so we
+ will cover both CDs and HDs.)
*/
- if (grub_strncmp (device, "ieee1275/disk", 14) == 0)
+ if (grub_strchr (device, ',') == NULL)
grub_env_set ("prefix", path);
else
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yyangqiming/grub2_3.git
git@gitee.com:yyangqiming/grub2_3.git
yyangqiming
grub2_3
grub2_3
a8

搜索帮助