]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dracut: fix early_microcode put into ramdisk
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 20 Dec 2023 07:44:10 +0000 (08:44 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 20 Dec 2023 07:44:10 +0000 (08:44 +0100)
the kernel has no CONFIG_MICROCODE_{AMD|INTEL} anymore so this patch change the check
to CONFIG_MICROCODE.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/183/filelists/dracut [new symlink]
lfs/dracut
src/patches/dracut/dracut-056-fix_early_microcode_for_kernel_6.6.patch [new file with mode: 0644]

diff --git a/config/rootfiles/core/183/filelists/dracut b/config/rootfiles/core/183/filelists/dracut
new file mode 120000 (symlink)
index 0000000..1608699
--- /dev/null
@@ -0,0 +1 @@
+../../../common/dracut
\ No newline at end of file
index cf8cd5cb56e53a3c98fe70d83dce653020c38a1b..de48ae61f9a81e2e1123528a89b3df9871366fd0 100644 (file)
@@ -73,6 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # https://bugzilla.ipfire.org/show_bug.cgi?id=12842
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dracut-059-fix-e2fsck-call.patch
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dracut/dracut-056-fix_early_microcode_for_kernel_6.6.patch
 
        cd $(DIR_APP) && ./configure --prefix=/usr --sbindir=/sbin --sysconfdir=/etc
        cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/dracut/dracut-056-fix_early_microcode_for_kernel_6.6.patch b/src/patches/dracut/dracut-056-fix_early_microcode_for_kernel_6.6.patch
new file mode 100644 (file)
index 0000000..dc9e7c3
--- /dev/null
@@ -0,0 +1,30 @@
+diff -Naur dracut-056.prg/dracut.sh dracut-056/dracut.sh
+--- dracut-056.prg/dracut.sh   2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/dracut.sh       2023-12-19 23:30:27.720703043 +0100
+@@ -1385,22 +1385,21 @@
+ if [[ $early_microcode == yes ]]; then
+     if [[ $hostonly ]]; then
+         if [[ $(get_cpu_vendor) == "AMD" ]]; then
+-            check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
++            check_kernel_config CONFIG_MICROCODE || unset early_microcode
+         elif [[ $(get_cpu_vendor) == "Intel" ]]; then
+-            check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
++            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 $(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