Skip to content

Instantly share code, notes, and snippets.

@waltercool
Last active April 2, 2021 18:35
Show Gist options
  • Save waltercool/d71ab5efbd6de0ed11ebee4a7f21d34b to your computer and use it in GitHub Desktop.
Save waltercool/d71ab5efbd6de0ed11ebee4a7f21d34b to your computer and use it in GitHub Desktop.
Process Intel Microcode for your system only.
#!/bin/sh
# This tool requires git and iucode_tool.
# iucode_tool can be found at most repositories, or https://gitlab.com/iucode-tool/
#
# This script is NOT DESIGNED to be run as root. You must manually copy the output at the
# intel firmware folder. This is for security reasons.
MICROCODE_DATA="/tmp/microcode_data"
OUTPUT="microcodes"
if [ ! -d ${MICROCODE_DATA} ]; then
git clone https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git ${MICROCODE_DATA} --depth=1
fi
iucode_tool -S ${MICROCODE_DATA}/intel-ucode/ -w ${OUTPUT}
rm -Rf ${MICROCODE_DATA}
echo "Microcode generated at ${OUTPUT}. Please copy it into /lib/firmware/intel-ucode/microcodes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment