summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-11 02:04:56 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-11 02:18:12 -0400
commitdf93befac0d0267d671f384e43447c0b016d777c (patch)
treeb31601596a0c1f9d3b4c97b267640ef3c35138c2 /sys-apps/microcode-data
parentiucode_tool: new package #509742 (diff)
downloadgentoo-df93befac0d0267d671f384e43447c0b016d777c.tar.gz
gentoo-df93befac0d0267d671f384e43447c0b016d777c.tar.bz2
gentoo-df93befac0d0267d671f384e43447c0b016d777c.zip
microcode-data: add USE flags to control install of file sets #403119
With newer kernels, there's no need to install the microcode.dat file as they can automatically load the ucode files themselves. Add USE flags so people can avoid installing the parts they don't need.
Diffstat (limited to 'sys-apps/microcode-data')
-rw-r--r--sys-apps/microcode-data/metadata.xml4
-rw-r--r--sys-apps/microcode-data/microcode-data-20150121-r1.ebuild49
2 files changed, 53 insertions, 0 deletions
diff --git a/sys-apps/microcode-data/metadata.xml b/sys-apps/microcode-data/metadata.xml
index 96a2d586367d..09a573a327e1 100644
--- a/sys-apps/microcode-data/metadata.xml
+++ b/sys-apps/microcode-data/metadata.xml
@@ -2,4 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
+<use>
+ <flag name='monolithic'>install the large text microcode.dat (used by older kernels via microcode_ctl)</flag>
+ <flag name='split-ucode'>install the split binary ucode files (used by the kernel directly)</flag>
+</use>
</pkgmetadata>
diff --git a/sys-apps/microcode-data/microcode-data-20150121-r1.ebuild b/sys-apps/microcode-data/microcode-data-20150121-r1.ebuild
new file mode 100644
index 000000000000..ca78889a2884
--- /dev/null
+++ b/sys-apps/microcode-data/microcode-data-20150121-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+# Find updates by searching and clicking the first link (hopefully it's the one):
+# http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
+
+NUM="24661"
+DESCRIPTION="Intel IA32 microcode update data"
+HOMEPAGE="http://inertiawar.com/microcode/ https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}"
+SRC_URI="http://downloadmirror.intel.com/${NUM}/eng/microcode-${PV}.tgz"
+
+LICENSE="intel-ucode"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="monolithic +split-ucode"
+REQUIRED_USE="|| ( monolithic split-ucode )"
+
+RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
+
+S=${WORKDIR}
+
+src_unpack() {
+ default
+ cp "${FILESDIR}"/intel-microcode2ucode.c ./ || die
+}
+
+src_compile() {
+ if use split-ucode ; then
+ tc-env_build emake intel-microcode2ucode
+ ./intel-microcode2ucode microcode.dat || die
+ fi
+}
+
+src_install() {
+ insinto /lib/firmware
+ use monolithic && doins microcode.dat
+ use split-ucode && doins -r intel-ucode
+}
+
+pkg_postinst() {
+ elog "The microcode available for Intel CPUs has been updated. You'll need"
+ elog "to reload the code into your processor. If you're using the init.d:"
+ elog "/etc/init.d/microcode_ctl restart"
+}