]>
Commit | Line | Data |
---|---|---|
165fd4a0 | 1 | Summary: Microcode definitions for Intel processors |
1db93e84 | 2 | Summary(pl.UTF-8): Definicje mikrokodu dla procesorów Intela |
165fd4a0 | 3 | Name: microcode-data-intel |
e7ade0a9 | 4 | Version: 20180108 |
4806c0f5 | 5 | Release: 1 |
165fd4a0 AM |
6 | License: INTEL SOFTWARE LICENSE AGREEMENT |
7 | Group: Base | |
e54dfb65 | 8 | # http://downloadcenter.intel.com/, enter "processor microcode data file" to the search |
b7f6af29 | 9 | Source0: https://downloadmirror.intel.com/27431/eng/microcode-%{version}.tgz |
e7ade0a9 | 10 | # Source0-md5: 871df55f0ab010ee384dabfc424f2c12 |
343a5efd AM |
11 | # Tool for splitting Intel's microcode file. From Fedora |
12 | Source1: intel-microcode2ucode.c | |
ca91a51d AM |
13 | # Produces single file for use by boot loader (like grub) |
14 | Source2: intel-microcode2ucode-single.c | |
165fd4a0 | 15 | Provides: microcode-data |
476af782 | 16 | BuildArch: noarch |
165fd4a0 AM |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
19 | %description | |
20 | The microcode data file for Linux contains the latest microcode | |
21 | definitions for all Intel processors. | |
22 | ||
1db93e84 JB |
23 | %description -l pl.UTF-8 |
24 | Te pliki danych mikrokodu dla Linuksa zawierają najnowsze definicje | |
25 | mikrokodu dla procesorów Intela. | |
26 | ||
ca91a51d AM |
27 | %package initrd |
28 | Summary: Microcode for initrd | |
29 | Summary(pl.UTF-8): Mikrokod dla initrd | |
30 | Group: Base | |
31 | ||
32 | %description initrd | |
33 | Intel microcode for initrd. | |
34 | ||
35 | %description initrd -l pl.UTF-8 | |
36 | Mikrokod dla procesorów Intel dla initrd. | |
37 | ||
165fd4a0 | 38 | %prep |
476af782 | 39 | %setup -qc |
165fd4a0 AM |
40 | |
41 | %build | |
23d57ba9 | 42 | if ! grep -q 0x00000000 microcode.dat; then |
b7f6af29 | 43 | echo >&2 "microcode.dat contains giberrish" |
23d57ba9 ER |
44 | exit 1 |
45 | fi | |
46 | ||
343a5efd | 47 | %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode %{SOURCE1} |
ca91a51d | 48 | %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode-single %{SOURCE2} |
4584837a | 49 | |
36712ef9 JR |
50 | ./intel-microcode2ucode microcode.dat |
51 | ./intel-microcode2ucode-single microcode.dat | |
343a5efd | 52 | |
e168b899 ER |
53 | install -d kernel/x86/microcode |
54 | ln microcode.bin kernel/x86/microcode/GenuineIntel.bin | |
55 | echo kernel/x86/microcode/GenuineIntel.bin | cpio -o -H newc -R 0:0 > intel-ucode.img | |
56 | ||
165fd4a0 AM |
57 | %install |
58 | rm -rf $RPM_BUILD_ROOT | |
476af782 | 59 | install -d $RPM_BUILD_ROOT{/lib/firmware,/boot} |
343a5efd | 60 | |
e168b899 ER |
61 | cp -a intel-ucode $RPM_BUILD_ROOT/lib/firmware |
62 | cp -p intel-ucode.img $RPM_BUILD_ROOT/boot | |
ca91a51d | 63 | |
165fd4a0 AM |
64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
343a5efd | 69 | /lib/firmware/intel-ucode |
ca91a51d AM |
70 | |
71 | %files initrd | |
72 | %defattr(644,root,root,755) | |
ca91a51d | 73 | /boot/intel-ucode.img |