Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/
Date: Wed, 07 Feb 2018 03:26:19
Message-Id: 1517973895.51d07a0f5c5db7a9b8ea9a449e551c7f7408ad80.whissi@gentoo
1 commit: 51d07a0f5c5db7a9b8ea9a449e551c7f7408ad80
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 7 03:18:40 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 7 03:24:55 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51d07a0f
7
8 sys-firmware/intel-microcode: Rev bump to update ebuild code
9
10 Ebuild uses microcodes from 2017-11-17 but ebuild code changes
11 from recent ebuilds were backported.
12
13 Package-Manager: Portage-2.3.24, Repoman-2.3.6
14
15 .../intel-microcode-20171117-r1.ebuild | 95 ++++++++++++++++++++++
16 1 file changed, 95 insertions(+)
17
18 diff --git a/sys-firmware/intel-microcode/intel-microcode-20171117-r1.ebuild b/sys-firmware/intel-microcode/intel-microcode-20171117-r1.ebuild
19 new file mode 100644
20 index 00000000000..f58fcaea14a
21 --- /dev/null
22 +++ b/sys-firmware/intel-microcode/intel-microcode-20171117-r1.ebuild
23 @@ -0,0 +1,95 @@
24 +# Copyright 1999-2018 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI="6"
28 +
29 +inherit toolchain-funcs mount-boot
30 +
31 +# Find updates by searching and clicking the first link (hopefully it's the one):
32 +# http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
33 +
34 +NUM="27337"
35 +DESCRIPTION="Intel IA32/IA64 microcode update data"
36 +HOMEPAGE="http://inertiawar.com/microcode/ https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}"
37 +SRC_URI="http://downloadmirror.intel.com/${NUM}/eng/microcode-${PV}.tgz"
38 +
39 +LICENSE="intel-ucode"
40 +SLOT="0"
41 +KEYWORDS="-* ~amd64 ~x86"
42 +IUSE="initramfs +split-ucode"
43 +REQUIRED_USE="|| ( initramfs split-ucode )"
44 +
45 +DEPEND="sys-apps/iucode_tool"
46 +RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
47 +
48 +S=${WORKDIR}
49 +
50 +# TODO:
51 +# Blacklist bad microcode here.
52 +DEFAULT_MICROCODE_SIGNATURES=""
53 +
54 +# Advanced users only:
55 +# merge with:
56 +# only current CPU: MICROCODE_SIGNATURES="-S"
57 +# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
58 +# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
59 +MICROCODE_SIGNATURES="${MICROCODE_SIGNATURES:=${DEFAULT_MICROCODE_SIGNATURES}}"
60 +
61 +pkg_pretend() {
62 + if [[ "${MICROCODE_SIGNATURES}" != "${DEFAULT_MICROCODE_SIGNATURES}" ]]; then
63 + ewarn "MICROCODE_SIGNATURES is set!"
64 + ewarn "The user has decided to install only a SUBSET of microcode."
65 + fi
66 + use initramfs && mount-boot_pkg_pretend
67 +}
68 +
69 +src_install() {
70 + # This will take ALL of the upstream microcode sources:
71 + # - microcode.dat
72 + # - intel-ucode/
73 + # In some cases, they have not contained the same content (eg the directory has newer stuff).
74 + MICROCODE_SRC=(
75 + "${S}"/microcode.dat
76 + "${S}"/intel-ucode/
77 + )
78 + opts=(
79 + ${MICROCODE_SIGNATURES}
80 + # be strict about what we are doing
81 + --overwrite
82 + --strict-checks
83 + --no-ignore-broken
84 + # show everything we find
85 + --list-all
86 + # show what we selected
87 + --list
88 + )
89 +
90 + # The earlyfw cpio needs to be in /boot because it must be loaded before
91 + # rootfs is mounted.
92 + use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED%/}"/boot/intel-uc.img )
93 + # split location:
94 + use split-ucode && dodir /lib/firmware/intel-ucode && opts+=( --write-firmware="${ED%/}"/lib/firmware/intel-ucode )
95 +
96 + iucode_tool \
97 + "${opts[@]}" \
98 + "${MICROCODE_SRC[@]}" \
99 + || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
100 +
101 + dodoc releasenote
102 +}
103 +
104 +pkg_preinst() {
105 + use initramfs && mount-boot_pkg_preinst
106 +}
107 +
108 +pkg_prerm() {
109 + use initramfs && mount-boot_pkg_prerm
110 +}
111 +
112 +pkg_postrm() {
113 + use initramfs && mount-boot_pkg_postrm
114 +}
115 +
116 +pkg_postinst() {
117 + use initramfs && mount-boot_pkg_postinst
118 +}