tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
microcodeAmd, microcodeIntel: fix reproducibility
Thomas Watson
3 years ago
a51fea44
a9414de1
+6
-4
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
microcode
amd.nix
intel.nix
+4
-3
pkgs/os-specific/linux/microcode/amd.nix
···
12
13
buildPhase = ''
14
mkdir -p kernel/x86/microcode
15
-
find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin \
16
-
-exec sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin' \;
17
'';
18
19
installPhase = ''
20
mkdir -p $out
21
-
echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > $out/amd-ucode.img
0
22
'';
23
24
meta = with lib; {
···
12
13
buildPhase = ''
14
mkdir -p kernel/x86/microcode
15
+
find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin -print0 | sort -z |\
16
+
xargs -0 -I{} sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin'
17
'';
18
19
installPhase = ''
20
mkdir -p $out
21
+
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/AuthenticAMD.bin
22
+
echo kernel/x86/microcode/AuthenticAMD.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/amd-ucode.img
23
'';
24
25
meta = with lib; {
+2
-1
pkgs/os-specific/linux/microcode/intel.nix
···
18
19
mkdir -p $out kernel/x86/microcode
20
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
21
-
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
0
22
23
runHook postInstall
24
'';
···
18
19
mkdir -p $out kernel/x86/microcode
20
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
21
+
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/GenuineIntel.bin
22
+
echo kernel/x86/microcode/GenuineIntel.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/intel-ucode.img
23
24
runHook postInstall
25
'';