diff --git a/0001-check-microcode-config-for-Hygon.patch b/0001-check-microcode-config-for-Hygon.patch new file mode 100644 index 0000000000000000000000000000000000000000..eef8ab8b0b5accc50324c5a46289461138960446 --- /dev/null +++ b/0001-check-microcode-config-for-Hygon.patch @@ -0,0 +1,47 @@ +From 436fc767fc9415ef73eb40912aa4d7bb3d709be7 Mon Sep 17 00:00:00 2001 +From: 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 + diff --git a/dracut.spec b/dracut.spec index 8d72add24313b5a1af5ee1d9747c75fadc86f715..b88d68d6558a6032546d06092d19453b44710d45 100644 --- a/dracut.spec +++ b/dracut.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %define dracutlibdir %{_prefix}/lib/dracut %bcond_without doc @@ -262,6 +262,7 @@ Patch230: 0230.patch Patch231: 0231.patch Patch232: 0232.patch Patch1000: 0001-add-loongarch.conf-for-loongarch64.patch +Patch1001: 0001-check-microcode-config-for-Hygon.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -721,6 +722,9 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf %changelog +* Tue Dec 17 2024 Liwei Ge - 049-233.git20240115.0.2 +- add microcode config checking for Hygon + * Wed Jun 26 2024 Wenlong Zhang - 049-233.git20240115.0.1 - add loongarch.conf for loongarch64