nixpkgs/pkgs/os-specific/linux/microcode/amd.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
803 B
Nix
Raw Normal View History

{ lib, stdenv, linux-firmware, libarchive }:
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
2022-01-22 17:13:29 +00:00
pname = "amd-ucode";
version = linux-firmware.version;
src = linux-firmware;
2015-03-25 21:44:19 +00:00
sourceRoot = ".";
buildInputs = [ libarchive ];
buildPhase = ''
mkdir -p kernel/x86/microcode
find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin \
2015-03-25 21:44:19 +00:00
-exec sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin' \;
'';
installPhase = ''
2015-03-25 21:44:19 +00:00
mkdir -p $out
echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > $out/amd-ucode.img
'';
meta = with lib; {
description = "AMD Processor microcode patch";
2020-08-31 10:25:00 +00:00
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
2015-03-25 21:44:19 +00:00
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
};
}