1 From 6c80408c8644a0add1907b0593eb83f90d6247b1 Mon Sep 17 00:00:00 2001
2 From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
3 Date: Mon, 14 Aug 2023 12:28:11 +0200
4 Subject: [PATCH] fix(dracut.sh): remove microcode check based on
5 CONFIG_MICROCODE_[AMD|INTEL]
7 `CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since
8 https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore
9 this check is wrong and early microcode is always disabled.
11 dracut.sh | 11 ++++-------
12 1 file changed, 4 insertions(+), 7 deletions(-)
14 diff --git a/dracut.sh b/dracut.sh
15 index e0abdb3b0..3b292910f 100755
18 @@ -1561,23 +1561,20 @@ fi
20 if [[ $early_microcode == yes ]]; then
21 if [[ $hostonly ]]; then
22 - if [[ $(get_cpu_vendor) == "AMD" ]]; then
23 - check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
24 - elif [[ $(get_cpu_vendor) == "Intel" ]]; then
25 - check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
26 + if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
27 + check_kernel_config CONFIG_MICROCODE || unset early_microcode
32 - ! check_kernel_config CONFIG_MICROCODE_AMD \
33 - && ! check_kernel_config CONFIG_MICROCODE_INTEL \
34 + ! check_kernel_config CONFIG_MICROCODE \
35 && unset early_microcode
37 # Do not complain on non-x86 architectures as it makes no sense
38 case "${DRACUT_ARCH:-$(uname -m)}" in
40 [[ $early_microcode != yes ]] \
41 - && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
42 + && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"