uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
31
pkgs/os-specific/linux/microcode/amd.nix
Normal file
31
pkgs/os-specific/linux/microcode/amd.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, linux-firmware, libarchive }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "amd-ucode";
|
||||
version = linux-firmware.version;
|
||||
|
||||
src = linux-firmware;
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
buildInputs = [ libarchive ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p kernel/x86/microcode
|
||||
find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin -print0 | sort -z |\
|
||||
xargs -0 -I{} sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/AuthenticAMD.bin
|
||||
echo kernel/x86/microcode/AuthenticAMD.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/amd-ucode.img
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "AMD Processor microcode patch";
|
||||
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue