1 |
# define intel date once for reuse |
2 |
%define intel_date 20170511 |
3 |
|
4 |
Summary: Intel / AMD CPU Microcode |
5 |
Name: microcode |
6 |
Version: 0.%{intel_date} |
7 |
Release: %mkrel 1 |
8 |
Group: System/Kernel and hardware |
9 |
License: Distributable |
10 |
# 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 |
Source1: amd-ucode-latest.tar |
14 |
Buildarch: noarch |
15 |
BuildRequires: iucode-tool |
16 |
BuildRequires: microcode_ctl |
17 |
# (tmb) conflict lock elision enabled glibc as it will crash |
18 |
Conflicts: glibc < 6:2.20-11 |
19 |
|
20 |
%description |
21 |
Since PentiumPro, Intel CPU are made of a RISC chip and of a microcode whose |
22 |
purpose is to decompose "old" ia32 instruction into new risc ones. |
23 |
P6 familly is concerned: PPro, PII, Celeron, PIII, Celeron2. |
24 |
Recent kernels have the ability to update this microcode. |
25 |
|
26 |
The microcode update is volatile and needs to be uploaded on each system |
27 |
boot. I.e. it doesn't reflash your cpu permanently. |
28 |
Reboot and it reverts back to the old microcode. |
29 |
|
30 |
This package contains microcode for Intel CPU, as well as microcode for |
31 |
AMD CPU (AMD Phenom(TM), AMD Opteron(TM) and AMD Turion(TM) 64 Ultra). |
32 |
|
33 |
%prep |
34 |
%setup -q -T -c |
35 |
|
36 |
%build |
37 |
|
38 |
# 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 |
%install |
47 |
rm -rf %{buildroot} |
48 |
|
49 |
mkdir -p %{buildroot}/lib/firmware/intel-ucode |
50 |
pushd intel-microcode-3.%{intel_date}.1 |
51 |
install -m 644 intel-ucode/* %{buildroot}/lib/firmware/intel-ucode |
52 |
|
53 |
tar xf %{SOURCE1} -C %{buildroot}/lib/firmware |
54 |
|
55 |
%clean |
56 |
|
57 |
%files |
58 |
%defattr(-,root,root,-) |
59 |
/lib/firmware/amd-ucode/ |
60 |
/lib/firmware/intel-ucode/ |