代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。