Skip to content

Instantly share code, notes, and snippets.

@polymorphm
Last active February 24, 2020 20:59
Show Gist options
  • Save polymorphm/7d0b7697c9616a66c9bebd46b086ba41 to your computer and use it in GitHub Desktop.
Save polymorphm/7d0b7697c9616a66c9bebd46b086ba41 to your computer and use it in GitHub Desktop.
/boot/make-amd-ucode.sh
#!/bin/bash
set -e
cd -- /boot
rm -vf -- amd-ucode.img.new
rm -vRf -- amd-ucode-work
mkdir -v -- amd-ucode-work
cd -- amd-ucode-work
mkdir -v -- kernel kernel/x86 kernel/x86/microcode
cat -- /usr/lib/firmware/amd-ucode/microcode_amd*.bin >kernel/x86/microcode/AuthenticAMD.bin
echo created AuthenticAMD.bin
find . -type f -print0 | cpio -o -H newc -0 >../amd-ucode.img.new
echo created amd-ucode.img.new
cd ..
rm -vRf -- amd-ucode-work
mv -v -- amd-ucode.img.new amd-ucode.img
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment