2 # - do not package intel-microcode2ucode and make package noarch, tool doesn't seem to be used runtime
3 Summary: Microcode definitions for Intel processors
4 Summary(pl.UTF-8): Definicje mikrokodu dla procesorów Intela
5 Name: microcode-data-intel
8 License: INTEL SOFTWARE LICENSE AGREEMENT
10 # http://downloadcenter.intel.com/, enter "processor microcode data file" to the search
11 Source0: http://downloadmirror.intel.com/26925/eng/microcode-%{version}.tgz
12 # Source0-md5: fe4bcb12e4600629a81fb65208c34248
13 # Tool for splitting Intel's microcode file. From Fedora
14 Source1: intel-microcode2ucode.c
15 # Produces single file for use by boot loader (like grub)
16 Source2: intel-microcode2ucode-single.c
18 Provides: microcode-data
19 ExclusiveArch: i686 pentium2 pentium3 pentium4 %{x8664} x32
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The microcode data file for Linux contains the latest microcode
24 definitions for all Intel processors.
26 %description -l pl.UTF-8
27 Te pliki danych mikrokodu dla Linuksa zawierają najnowsze definicje
28 mikrokodu dla procesorów Intela.
31 Summary: Microcode for initrd
32 Summary(pl.UTF-8): Mikrokod dla initrd
36 Intel microcode for initrd.
38 %description initrd -l pl.UTF-8
39 Mikrokod dla procesorów Intel dla initrd.
45 if ! grep -q 0x00000000 microcode.dat; then
46 echo >&2 microcode.dat contains giberrish
50 %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode %{SOURCE1}
51 %{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -Wall -o intel-microcode2ucode-single %{SOURCE2}
52 ./intel-microcode2ucode microcode.dat > /dev/null || exit 1
53 ./intel-microcode2ucode-single microcode.dat > /dev/null || exit 1
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sbindir},/lib/firmware,/boot}
59 cp -p intel-microcode2ucode $RPM_BUILD_ROOT%{_sbindir}
60 mv intel-ucode $RPM_BUILD_ROOT/lib/firmware
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
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
72 %attr(755,root,root) %{_sbindir}/intel-microcode2ucode
73 /lib/firmware/intel-ucode
76 %defattr(644,root,root,755)
77 %attr(755,root,root) %{_sbindir}/intel-microcode2ucode-single