summaryrefslogtreecommitdiff
path: root/system/intel-microcode
diff options
context:
space:
mode:
authorAndrzej Telszewski <atelszewski@gmail.com>2015-10-12 23:38:48 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-10-12 23:38:48 +0700
commit5a96b0c138c436bb6a53a360dbe06d1839ca1c07 (patch)
tree0c80cf604069187981d88ef2c59962421f7ac78e /system/intel-microcode
parentc6e5c054a6bff5ca352cac142d955081c09d738e (diff)
downloadslackbuilds-5a96b0c138c436bb6a53a360dbe06d1839ca1c07.tar.gz
system/intel-microcode: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/intel-microcode')
-rw-r--r--system/intel-microcode/README41
-rw-r--r--system/intel-microcode/intel-microcode.SlackBuild19
2 files changed, 44 insertions, 16 deletions
diff --git a/system/intel-microcode/README b/system/intel-microcode/README
index 332f0fd362..fef45f24af 100644
--- a/system/intel-microcode/README
+++ b/system/intel-microcode/README
@@ -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.
-
-This script is intended to repackage the official Intel microcode tarball.
-The resulting firmware file is placed under /lib/firmware/microcode.dat
-
-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.
+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 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).
+
+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
diff --git a/system/intel-microcode/intel-microcode.SlackBuild b/system/intel-microcode/intel-microcode.SlackBuild
index 5c3939a213..08afacf8c4 100644
--- a/system/intel-microcode/intel-microcode.SlackBuild
+++ b/system/intel-microcode/intel-microcode.SlackBuild
@@ -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