diff --git a/backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch b/backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch new file mode 100644 index 0000000000000000000000000000000000000000..bbf075dfb8d693f886eb8cfbad304466ee886168 --- /dev/null +++ b/backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch @@ -0,0 +1,48 @@ +From 6c80408c8644a0add1907b0593eb83f90d6247b1 Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Mon, 14 Aug 2023 12:28:11 +0200 +Subject: [PATCH] fix(dracut.sh): remove microcode check based on + CONFIG_MICROCODE_[AMD|INTEL] + +`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since +https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore +this check is wrong and early microcode is always disabled. +--- + dracut.sh | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index e0abdb3b..3b292910 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1561,23 +1561,20 @@ fi + + if [[ $early_microcode == yes ]]; then + if [[ $hostonly ]]; then +- if [[ $(get_cpu_vendor) == "AMD" ]]; then +- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode +- elif [[ $(get_cpu_vendor) == "Intel" ]]; then +- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode ++ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then ++ check_kernel_config CONFIG_MICROCODE || unset early_microcode + else + unset early_microcode + fi + else +- ! check_kernel_config CONFIG_MICROCODE_AMD \ +- && ! check_kernel_config CONFIG_MICROCODE_INTEL \ ++ ! check_kernel_config CONFIG_MICROCODE \ + && unset early_microcode + fi + # Do not complain on non-x86 architectures as it makes no sense + case "${DRACUT_ARCH:-$(uname -m)}" in + x86_64 | i?86) + [[ $early_microcode != yes ]] \ +- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" ++ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y" + ;; + *) ;; + esac +-- +2.33.0 + diff --git a/dracut.spec b/dracut.spec index 41e02e1b5dfead5e843a63aa4ea9a8969c57b7b9..25c051007455926a97cb5b3fd1cd2f170225797c 100644 --- a/dracut.spec +++ b/dracut.spec @@ -9,7 +9,7 @@ Name: dracut Version: 059 -Release: 4 +Release: 6 Summary: Initramfs generator using udev @@ -38,6 +38,8 @@ Patch11: backport-fix-fs-lib-remove-quoting-form-the-first-argument-of.patch # Unbreak systemd 255 Patch12: backport-feat-systemd-install-systemd-executor.patch +Patch6000: backport-fix-dracut.sh-remove-microcode-check-based-on-CONFIG.patch + Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Source2: openEuler.conf.example @@ -525,6 +527,9 @@ rm -f 51-dracut-rescue-postinst.sh %endif %changelog +* Thu Apr 18 2024 wangyuhang - 059-6 +- Backport patches to remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL] + * Mon Jan 22 2024 huyubiao - 059-5 - Backport patches to fix compatibility with systemd 255