Last active
February 24, 2020 20:59
-
-
Save polymorphm/7d0b7697c9616a66c9bebd46b086ba41 to your computer and use it in GitHub Desktop.
/boot/make-amd-ucode.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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