Skip to content

generalised early microcode support

classabbyamp requested to merge classabbyamp/mkinitcpio:ucode-support into master

This pull request adds general support for creating an early cpio, which is prepended to the main initcpio image.

This allows us to create a hook that installs microcode update files in a way that they will be loaded early.

fixes #117 (closed)
fixes #191 (closed)

Remaining TODOs/Questions

  • lsinitcpio support
    • this is going to be complex. I can find no good way to unpack/list the concatenated cpios in shell. dracut uses a C program for this.
    • better -a behaviour (currently just skips it, which means the printed size etc is misleading)
    • extract only the main or early (separate flag -X/--extract-early)?)
    • better UI for splitting the early/main file listing (take cues from -a output?)
    • can the skipping algorithm be optimised? will bsdcpio always make an image aligned to 512 bytes? this would make things faster and easier
  • autodetection of host-specific microcode?
    • similar to dracut's hostonly mode or mkinitcpio's autodetect hook for microcode: only include the specific microcode for the host the image is built on. This can be determined by inspecting /proc/cpuinfo. This would only work if not using the precompiled microcode (like Arch currently ships), and it should probably not be the default.
  • should the microcode hook only do something on x86 hosts? YES
    • this isn't much of a concern for Arch, but Void does have arm support (though initcpios are not typical on most setups)
  • extensive testing
Edited by Morten Linderud

Merge request reports