mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 20:49:52 +03:00
Merge pull request #165895 from tpwrules/fix-microcode-reproducibility
This commit is contained in:
commit
764c88feac
@ -12,13 +12,14 @@ stdenv.mkDerivation {
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p kernel/x86/microcode
|
||||
find ${linux-firmware}/lib/firmware/amd-ucode -name \*.bin \
|
||||
-exec sh -c 'cat {} >> kernel/x86/microcode/AuthenticAMD.bin' \;
|
||||
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
|
||||
echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > $out/amd-ucode.img
|
||||
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; {
|
||||
|
@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
mkdir -p $out kernel/x86/microcode
|
||||
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
||||
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
|
||||
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/GenuineIntel.bin
|
||||
echo kernel/x86/microcode/GenuineIntel.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/intel-ucode.img
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user