]> git.ipfire.org Git - thirdparty/dracut.git/commit
ucode: use microcode found in packed cpio images
authorJonas Witschel <diabonas@gmx.de>
Tue, 24 Dec 2019 14:48:19 +0000 (15:48 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 24 Jan 2020 08:06:32 +0000 (09:06 +0100)
commitd613d88dd272cde8b69445bd69d64f99aac5b94b
tree42a8588389ed050bedb626cdeae64a17ebc03f9a
parent2ee69a40c8b70ce823b8db922a8f1ea4cf31af4d
ucode: use microcode found in packed cpio images

Some distributions (Arch, Gentoo) ship prepacked microcode images. These
are cpio images that follow the structure specified in the Linux kernel
documentation (x86/microcode.rst, "Early load microcode"), the same
structure dracut uses for its early microcode images.

In case of Arch Linux, the microcode for Intel CPUs is currently only
available in this packed form, /usr/lib/firmware/intel-ucode does not
exist. This commit adds a way to make use of these images on such
systems by unpacking them to the early cpio directory. (Note that the
packed image cannot be used directly since dracut might need to add ACPI
tables to the early initramfs.)

This approach has the drawback that it is not possible to control the
selection of CPUs to be included in the microcode file in host-only
mode, so we only try it as a last ressort if no unpacked microcode could
be found in fw_dir.

The list of possible file names for the packed microcode image is taken
from GRUB (cf. GRUB_EARLY_INITRD_LINUX_STOCK), but can be adapted by
setting "early_microcode_image_name" (and "early_microcode_image_dir")
in a dracut configuration file.
dracut.sh