Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

microcode updates: prepend first in initrd

Prevents crashing the kernel on boot if other blobs are prepended
before the microkernel update image.

Fixes #22674.

+4 -2
+2 -1
nixos/modules/hardware/cpu/amd-microcode.nix
··· 22 22 ###### implementation 23 23 24 24 config = mkIf config.hardware.cpu.amd.updateMicrocode { 25 - boot.initrd.prepend = [ "${pkgs.microcodeAmd}/amd-ucode.img" ]; 25 + # Microcode updates must be the first item prepended in the initrd 26 + boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ]; 26 27 }; 27 28 28 29 }
+2 -1
nixos/modules/hardware/cpu/intel-microcode.nix
··· 22 22 ###### implementation 23 23 24 24 config = mkIf config.hardware.cpu.intel.updateMicrocode { 25 - boot.initrd.prepend = [ "${pkgs.microcodeIntel}/intel-ucode.img" ]; 25 + # Microcode updates must be the first item prepended in the initrd 26 + boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeIntel}/intel-ucode.img" ]; 26 27 }; 27 28 28 29 }