system/intel-microcode: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrzej Telszewski 2015-10-12 23:38:48 +07:00 committed by Willy Sudiarto Raharjo
parent c6e5c054a6
commit 5a96b0c138
2 changed files with 42 additions and 14 deletions

View File

@ -1,14 +1,31 @@
Linux Processor Microcode Data File
The microcode data file contains the latest microcode definitions for all Intel processors.
Intel releases microcode updates to correct processor behavior as documented in the respective
processor specification updates. While the regular approach to getting this microcode update
is via a BIOS upgrade, Intel realizes that this can be an administrative hassle. The Linux
operating system and VMware ESX products have a mechanism to update the microcode after booting.
The microcode data file contains the latest microcode definitions for all Intel
processors. Intel releases microcode updates to correct processor behavior as
documented in the respective processor specification updates. While the regular
approach to getting this microcode update is via a BIOS upgrade, Intel realizes
that this can be an administrative hassle. The Linux operating system and VMware
ESX products have a mechanism to update the microcode after booting.
This script is intended to repackage the official Intel microcode tarball.
The resulting firmware file is placed under /lib/firmware/microcode.dat
This SlackBuild repackages the official Intel microcode tarball, placing the
microcode.dat file under /lib/firmware/microcode.dat, which can be later
uploaded using microcode_ctl utility (available from SlackBuilds.org).
NOTE:
Although there is another (newer) mean of uploading the microcode data file to the processor,
this package is meant to be used with the *microcode_ctl* utility available at slackbuilds.org.
If the iucode_tool (available from SlackBuilds.org) is installed on the system,
this SlackBuild writes the microcodes with the file names expected by the Linux
kernel firmware loader and places them under /lib/firmware/intel-ucode
directory. In that case, the correct microcode is uploaded when the Intel
microcode kernel's module is loaded.
Please note that the method using the iucode_tool is preferred for multiple
reasons, one being the deprecation of the kernel's interface used by the
microcode_ctl utility.
If you need to load the microcode early during the boot:
1) read https://www.kernel.org/doc/Documentation/x86/early-microcode.txt
2) read the manual for iucode_tool, especially about --write-earlyfw option
3) make sure your kernel has the followings:
CONFIG_MICROCODE=y
CONFIG_MICROCODE_EARLY=y
CONFIG_MICROCODE_INTEL=y
CONFIG_MICROCODE_INTEL_EARLY=y

View File

@ -25,7 +25,7 @@
PRGNAM=intel-microcode
SRCNAM=microcode
VERSION=${VERSION:-20150121}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
ARCH=noarch
@ -38,11 +38,22 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
mkdir $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tgz -C $SRCNAM-$VERSION
cd $SRCNAM-$VERSION
chown root:root microcode.dat
chmod 0644 microcode.dat
mkdir -p $PKG/lib/firmware
tar xvf $CWD/$SRCNAM-$VERSION.tgz -C $PKG/lib/firmware
chown root:root $PKG/lib/firmware/microcode.dat
chmod 0644 $PKG/lib/firmware/microcode.dat
cp -a microcode.dat $PKG/lib/firmware
if [ -x /usr/sbin/iucode_tool ]; then
mkdir -p $PKG/lib/firmware/intel-ucode
/usr/sbin/iucode_tool -v -L -K$PKG/lib/firmware/intel-ucode microcode.dat
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild