From 1f5e24a40232711ae44c8a9c202d5f9eea034bd0 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Nov 16 2023 15:24:17 +0000 Subject: fix(dracut.sh): remove microcode check based on --- diff --git a/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch b/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch new file mode 100644 index 0000000..0882803 --- /dev/null +++ b/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch @@ -0,0 +1,45 @@ +From 61b9cd16e049434597e398be61a47e0112382c5b 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 d7bf4b071..b8174fe78 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1564,23 +1564,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 diff --git a/dracut.spec b/dracut.spec index a2b66a8..3c3e925 100644 --- a/dracut.spec +++ b/dracut.spec @@ -7,7 +7,7 @@ %global __requires_exclude pkg-config # rpmdev-bumpspec and releng automation compatible variable -%global baserelease 16 +%global baserelease 17 Name: dracut Version: 059 @@ -89,6 +89,11 @@ Patch14: https://github.com/dracutdevs/dracut/commit/bee1c4824a8cd47ce6c01892a54 Patch15: 0001-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch Patch16: https://github.com/dracutdevs/dracut/pull/2527.patch +# Fix for kernel 6.6 +# https://bugzilla.redhat.com/show_bug.cgi?id=2249112 +# https://github.com/dracutdevs/dracut/pull/2481 +Patch17: 2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch + BuildRequires: bash BuildRequires: git-core BuildRequires: pkgconfig(libkmod) >= 23 @@ -489,6 +494,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Thu Nov 16 2023 Pavel Valena - 059-17 +- fix(dracut.sh): remove microcode check based on + * Wed Nov 8 2023 Zbigniew Jedrzejewski-Szmek - 059-16 - Backport patches to fix compatibility with systemd 255