8 Star 0 Fork 16

src-anolis-os/dracut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-check-microcode-config-for-Hygon.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2024-12-17 16:18 . check microcode config for Hygon
From 436fc767fc9415ef73eb40912aa4d7bb3d709be7 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 17 Dec 2024 16:14:03 +0800
Subject: [PATCH] check microcode config for Hygon
---
dracut-functions.sh | 5 ++++-
dracut.sh | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 14e60a9..c15195b 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -664,6 +664,9 @@ get_cpu_vendor ()
if grep -qE Intel /proc/cpuinfo; then
printf "Intel"
fi
+ if grep -qE Hygon /proc/cpuinfo; then
+ printf "Hygon"
+ fi
}
# get_host_ucode
@@ -761,4 +764,4 @@ block_is_fcoe() {
# Check whether $1 is a net device
block_is_netdevice() {
block_is_nbd "$1" || block_is_iscsi "$1" || block_is_fcoe "$1"
-}
\ No newline at end of file
+}
diff --git a/dracut.sh b/dracut.sh
index 42e1650..e2ab247 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1084,7 +1084,7 @@ fi
if [[ $early_microcode = yes ]]; then
if [[ $hostonly ]]; then
- if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
+ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" || $(get_cpu_vendor) == "Hygon" ]]; then
check_kernel_config CONFIG_MICROCODE || unset early_microcode
else
unset early_microcode
--
2.39.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/dracut.git
git@gitee.com:src-anolis-os/dracut.git
src-anolis-os
dracut
dracut
a8

搜索帮助