File microcode_ctl.spec of Package microcode_ctl
%define realname microcode_ctl
%define realver 2.1
%define extraver -10
%define srcext tar.xz
%define amd_ver latest
%define intel_ver 20160714
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: %{realname}
Version: %{realver}
Release: %{?extraver:0.}1%{?dist}
License: GPL-2.0+
Group: System/Kernel
URL: http://fedorahosted.org/microcode_ctl/
Summary: tool to update x86/x86-64 CPU microcode
%if 0%{?rhel}
Epoch: 2
%endif
ExclusiveArch: %{ix86} x86_64
Provides: intel-ucode intel-microcode
# Build-time parameters
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-root
Source: http://fedorahosted.org/released/microcode_ctl/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
The microcode_ctl utility is a companion to the IA32 microcode driver
written by Tigran Aivazian <tigran@aivazian.fsnet.co.uk>. The utility has
two uses:
a) it decodes and sends new microcode to the kernel driver to be uploaded
to Intel IA32 family processors. (Pentium Pro, PII, Celeron, PIII,
Xeon, Pentium 4 etc, x86_64)
b) it signals the kernel driver to release any buffers it may hold
The microcode update is volatile and needs to be uploaded on each system
boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts
back to the old microcode.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%{__sed} -i '/README/ d' Makefile
%build
%{__make} %{?_smp_mflags} \
MICROCODE_INTEL=microcode-%{intel_ver}.tgz \
CFLAGS="%{optflags} -I/usr/src/linux/include" \
PREFIX=%{_prefix} \
MICDIR=/lib/firmware/updates
%install
%{__make} install DESTDIR=%{buildroot} \
PREFIX=%{_prefix} \
MICDIR=/lib/firmware/updates
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc Changelog README
%{_sbindir}/*
/lib/firmware/updates/*
%changelog