microcode-amd: Update to early loading

This commit is contained in:
William A. Kennington III 2015-03-25 14:44:19 -07:00
parent 79827eb8f5
commit 27f355c1e3
2 changed files with 21 additions and 17 deletions

View File

@ -1,25 +1,30 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, firmwareLinuxNonfree, libarchive }:
stdenv.mkDerivation rec {
name = "amd-ucode-2012-09-10";
name = "amd-ucode-${firmwareLinuxNonfree.version}";
src = fetchurl {
urls =
[ "http://pkgs.fedoraproject.org/repo/pkgs/microcode_ctl/${name}.tar/559bc355d3799538584add80df2996f0/${name}.tar"
"http://www.amd64.org/pub/microcode/${name}.tar"
];
sha256 = "065phvhx5hx5ssdd1x2p5m1yv26ak7l5aaw6yk6h95x9mxn5r111";
};
src = firmwareLinuxNonfree;
installPhase = ''
mkdir -p $out/lib/firmware/amd-ucode $out/share/doc/amd-ucode
mv microcode_amd_fam15h.bin microcode_amd.bin $out/lib/firmware/amd-ucode/
mv LICENSE $out/share/doc/amd-ucode
sourceRoot = ".";
buildInputs = [ libarchive ];
buildPhase = ''
mkdir -p kernel/x86/microcode
find ${firmwareLinuxNonfree}/lib/firmware/amd-ucode -name \*.bin \
-exec sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin' \;
'';
meta = {
installPhase = ''
mkdir -p $out
echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > $out/amd-ucode.img
'';
meta = with stdenv.lib; {
description = "AMD Processor microcode patch";
homepage = http://www.amd64.org/support/microcode.html;
license = stdenv.lib.licenses.unfreeRedistributableFirmware;
license = licenses.unfreeRedistributableFirmware;
maintainers = with maintainers; [ wkennington ];
platforms = platforms.linux;
};
}

View File

@ -8595,8 +8595,6 @@ let
afuse = callPackage ../os-specific/linux/afuse { };
amdUcode = callPackage ../os-specific/linux/microcode/amd.nix { };
autofs5 = callPackage ../os-specific/linux/autofs/autofs-v5.nix { };
_915resolution = callPackage ../os-specific/linux/915resolution { };
@ -8626,6 +8624,7 @@ let
alsaUtils = callPackage ../os-specific/linux/alsa-utils { };
alsaOss = callPackage ../os-specific/linux/alsa-oss { };
microcodeAmd = callPackage ../os-specific/linux/microcode/amd.nix { };
microcodeIntel = callPackage ../os-specific/linux/microcode/intel.nix { };