Lines 4-10
Link Here
|
4 |
|
4 |
|
5 |
EAPI="4" |
5 |
EAPI="4" |
6 |
|
6 |
|
7 |
inherit toolchain-funcs |
7 |
inherit linux-info toolchain-funcs |
8 |
|
8 |
|
9 |
# Find updates by searching and clicking the first link (hopefully it's the one): |
9 |
# Find updates by searching and clicking the first link (hopefully it's the one): |
10 |
# http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File |
10 |
# http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File |
Lines 17-45
Link Here
|
17 |
LICENSE="intel-ucode" |
17 |
LICENSE="intel-ucode" |
18 |
SLOT="0" |
18 |
SLOT="0" |
19 |
KEYWORDS="-* ~amd64 ~x86" |
19 |
KEYWORDS="-* ~amd64 ~x86" |
20 |
IUSE="" |
20 |
IUSE="monolitic" |
21 |
|
21 |
|
22 |
RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586 |
22 |
RDEPEND=" |
|
|
23 |
monolitic? ( !<sys-apps/microcode-ctl-1.17-r2 ) |
24 |
" |
23 |
|
25 |
|
24 |
S=${WORKDIR} |
26 |
S=${WORKDIR} |
25 |
|
27 |
|
|
|
28 |
if ( ! use monolitic); then |
29 |
CONFIG_CHECK="~MICROCODE_INTEL" |
30 |
ERROR_MICROCODE_INTEL="Your kernel needs to support Intel microcode loading. You're suggested to build it as a module as it doesn't require a reboot to reload the microcode, that way." |
31 |
fi |
32 |
|
26 |
src_unpack() { |
33 |
src_unpack() { |
27 |
default |
34 |
default |
28 |
cp "${FILESDIR}"/intel-microcode2ucode.c ./ || die |
35 |
! use monolitic && ( cp "${FILESDIR}"/intel-microcode2ucode.c ./ || die ) |
29 |
} |
36 |
} |
30 |
|
37 |
|
31 |
src_compile() { |
38 |
src_compile() { |
32 |
tc-env_build emake intel-microcode2ucode |
39 |
if ( ! use monolitic ); then |
33 |
./intel-microcode2ucode microcode.dat || die |
40 |
tc-env_build emake intel-microcode2ucode |
|
|
41 |
./intel-microcode2ucode microcode.dat || die |
42 |
fi |
34 |
} |
43 |
} |
35 |
|
44 |
|
36 |
src_install() { |
45 |
src_install() { |
37 |
insinto /lib/firmware |
46 |
insinto /lib/firmware |
38 |
doins -r microcode.dat intel-ucode |
47 |
if ( ! use monolitic ); then |
|
|
48 |
doins -r microcode.dat intel-ucode |
49 |
else |
50 |
doins -r intel-ucode |
51 |
fi |
39 |
} |
52 |
} |
40 |
|
53 |
|
41 |
pkg_postinst() { |
54 |
pkg_postinst() { |
42 |
elog "The microcode available for Intel CPUs has been updated. You'll need" |
55 |
elog "The microcode available for Intel CPUs has been updated. You'll need" |
43 |
elog "to reload the code into your processor. If you're using the init.d:" |
56 |
elog "to reload the code into your processor." |
44 |
elog "/etc/init.d/microcode_ctl restart" |
57 |
if ( use monolitic ); then |
|
|
58 |
elog "If you're using the init.d:" |
59 |
elog "/etc/init.d/microcode_ctl restart" |
60 |
fi |
45 |
} |
61 |
} |