]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL]
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 14 Aug 2023 10:28:11 +0000 (12:28 +0200)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Wed, 30 Aug 2023 06:47:15 +0000 (08:47 +0200)
`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

index e0abdb3b050800fbfb70f4fd533f403f9d476e79..3b292910f3240c87000a7af31c7eb4acdd84ed0e 100755 (executable)
--- 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