1 |
tmb |
1108470 |
# define intel date once for reuse |
2 |
tmb |
1191026 |
%define intel_date 20171215 |
3 |
tmb |
1108470 |
|
4 |
tmb |
19854 |
Summary: Intel / AMD CPU Microcode |
5 |
|
|
Name: microcode |
6 |
tmb |
1108470 |
Version: 0.%{intel_date} |
7 |
tmb |
1191401 |
Release: %mkrel 2 |
8 |
tmb |
19854 |
Group: System/Kernel and hardware |
9 |
|
|
License: Distributable |
10 |
tmb |
1108470 |
# use the debian way to get microcodes for older CPUs as Intel removes old firmwares from recent releases |
11 |
|
|
Source0: http://http.debian.net/debian/pool/non-free/i/intel-microcode/intel-microcode_3.%{intel_date}.1.tar.xz |
12 |
|
|
# use fakeroot /sbin/update-amd-microcode --download-only (from microcode_ctl) to update |
13 |
tmb |
19854 |
Source1: amd-ucode-latest.tar |
14 |
tmb |
1191401 |
Source2: amd-ucode-fam17h.tar |
15 |
tmb |
19854 |
Buildarch: noarch |
16 |
tmb |
1108470 |
BuildRequires: iucode-tool |
17 |
tv |
559054 |
BuildRequires: microcode_ctl |
18 |
tmb |
751292 |
# (tmb) conflict lock elision enabled glibc as it will crash |
19 |
|
|
Conflicts: glibc < 6:2.20-11 |
20 |
tmb |
19854 |
|
21 |
|
|
%description |
22 |
|
|
Since PentiumPro, Intel CPU are made of a RISC chip and of a microcode whose |
23 |
|
|
purpose is to decompose "old" ia32 instruction into new risc ones. |
24 |
|
|
P6 familly is concerned: PPro, PII, Celeron, PIII, Celeron2. |
25 |
|
|
Recent kernels have the ability to update this microcode. |
26 |
|
|
|
27 |
|
|
The microcode update is volatile and needs to be uploaded on each system |
28 |
|
|
boot. I.e. it doesn't reflash your cpu permanently. |
29 |
|
|
Reboot and it reverts back to the old microcode. |
30 |
|
|
|
31 |
tmb |
1191401 |
This package contains microcode for Intel and Amd CPUs. |
32 |
tmb |
19854 |
|
33 |
|
|
%prep |
34 |
|
|
%setup -q -T -c |
35 |
|
|
|
36 |
|
|
%build |
37 |
|
|
|
38 |
tmb |
1108470 |
# build the microcode file from several old ones |
39 |
|
|
tar xvf %{SOURCE0} |
40 |
|
|
pushd intel-microcode-3.%{intel_date}.1 |
41 |
|
|
make |
42 |
|
|
mkdir intel-ucode |
43 |
|
|
/sbin/iucode_tool -Kintel-ucode intel-microcode.bin |
44 |
|
|
popd |
45 |
|
|
|
46 |
tmb |
19854 |
%install |
47 |
zezinho |
251615 |
rm -rf %{buildroot} |
48 |
tmb |
19854 |
|
49 |
tv |
559054 |
mkdir -p %{buildroot}/lib/firmware/intel-ucode |
50 |
tmb |
1108470 |
pushd intel-microcode-3.%{intel_date}.1 |
51 |
tv |
559054 |
install -m 644 intel-ucode/* %{buildroot}/lib/firmware/intel-ucode |
52 |
tmb |
19854 |
|
53 |
zezinho |
251615 |
tar xf %{SOURCE1} -C %{buildroot}/lib/firmware |
54 |
tmb |
1191401 |
tar xf %{SOURCE2} -C %{buildroot}/lib/firmware |
55 |
tmb |
19854 |
|
56 |
|
|
%clean |
57 |
|
|
|
58 |
|
|
%files |
59 |
|
|
%defattr(-,root,root,-) |
60 |
tmb |
999906 |
/lib/firmware/amd-ucode/ |
61 |
tv |
559054 |
/lib/firmware/intel-ucode/ |