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