Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > ba8a2312f38b9f2f1ec3f3778e790f7d > files > 4

microcode-0.20180425-1.mga6.nonfree.src.rpm

# define intel date once for reuse
%define    debian_date 20180312
%define    intel_date 20180425

Summary:   Intel / AMD CPU Microcode
Name:      microcode
Version:   0.%{intel_date}
Release:   %mkrel 1
Group:     System/Kernel and hardware
License:   Distributable
# use the debian way to get microcodes for older CPUs as Intel removes old firmwares from recent releases
Source0:   http://http.debian.net/debian/pool/non-free/i/intel-microcode/intel-microcode_3.%{debian_date}.1.tar.xz
# from https://downloadcenter.intel.com/download/27431/Linux-Processor-Microcode-Data-File
Source1:   microcode-%{intel_date}.tgz
# AMD now pushes their microcode to upstream linux-firmware git
# so this is a tarball of: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/amd-ucode
Source2:   amd-ucode-latest.tar
Buildarch: noarch
BuildRequires: iucode-tool
BuildRequires: microcode_ctl
# (tmb) conflict lock elision enabled glibc as it will crash
Conflicts: glibc < 6:2.20-11

%description
Since PentiumPro, Intel CPU are made of a RISC chip and of a microcode whose
purpose is to decompose "old" ia32 instruction into new risc ones.
P6 familly is concerned: PPro, PII, Celeron, PIII, Celeron2.
Recent kernels have the ability to update this microcode.

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.

This package contains microcode for Intel and Amd CPUs.

%prep
%setup -q -T -c

%build

# build the microcode file from several old ones
tar xvf %{SOURCE0}
pushd intel-microcode-3.%{debian_date}.1
  make
  mkdir intel-ucode
  /sbin/iucode_tool -Kintel-ucode intel-microcode.bin
popd

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/lib/firmware/intel-ucode
pushd intel-microcode-3.%{debian_date}.1
install -m 644 intel-ucode/* %{buildroot}/lib/firmware/intel-ucode

# Intel microcodes not in  debian
tar xf %{SOURCE1} -C %{buildroot}/lib/firmware
# move the "caveat" firmware in place as we have all needed microcode
# patches and are using early firmware loading
mv %{buildroot}/lib/firmware/intel-ucode-with-caveats/06-4f-01 %{buildroot}/lib/firmware/intel-ucode/
cat %{buildroot}/lib/firmware/intel-ucode-with-caveats/list >> %{buildroot}/lib/firmware/intel-ucode/list
# remove unwanted stuff
rm -rf %{buildroot}/lib/firmware/intel-ucode-with-caveats/
rm -rf %{buildroot}/lib/firmware/linux-kernel-patches/
rm -f %{buildroot}/lib/firmware/microcode.dat
rm -f %{buildroot}/lib/firmware/releasenote

# Amd microcodes
tar xf %{SOURCE2} -C %{buildroot}/lib/firmware

%clean

%files
%defattr(-,root,root,-)
/lib/firmware/amd-ucode/
/lib/firmware/intel-ucode/


%changelog
* Sat May 19 2018 tmb <tmb> 0.20180425-1.mga6
  (not released yet)
+ Revision: 1230499
- update Intel microcode to 20180425
- update Amd fam15 and fam17 microcode to 2018-05-15
- update to Intel microcode release 20180312
- update intel microcode to 20180108
- add Amd microcode for fam17h (Zen)
- update Intel microcode to 20171215

* Sun Jun 25 2017 tmb <tmb> 0.20170511-1.mga6.nonfree
+ Revision: 1108463
- update Intel microcode to 2017-05-11

* Sun Feb 05 2017 zezinho <zezinho> 0.20161104-2.mga6.nonfree
+ Revision: 1084863
- use debian way to keep microcodes for old cpus that were removed by intel in recent dat files

* Wed Feb 01 2017 zezinho <zezinho> 0.20161104-1.mga6.nonfree
+ Revision: 1084457
- new intel microcode from 4 Nov 2016

* Fri May 13 2016 tv <tv> 0.20160513-1.mga6.nonfree
+ Revision: 1014907
- update Intel microcode (& adjust spec file to current update-intel-microcode)
- AMD microcode wasn't updated as the one downloaded by the script looks older
  than the one tmb uploaded last time (???)

* Sat Apr 09 2016 tmb <tmb> 0.20160409-1.mga6.nonfree
+ Revision: 999898
- update AMD Family 15h Processors microcode to fix bugs in prior microcode

* Thu Mar 03 2016 tmb <tmb> 0.20160303-1.mga6.nonfree
+ Revision: 984578
- update to 2016-03-03 snapshot

* Wed Oct 15 2014 tmb <tmb> 0.20140913-4.mga5.nonfree
+ Revision: 751292
- enable haswell microcode again as glibc lock elision is now disabled
+ umeabot <umeabot>
- Second Mageia 5 Mass Rebuild

* Fri Oct 10 2014 tmb <tmb> 0.20140913-2.mga5.nonfree
+ Revision: 737966
- nuke intel haswell firmwares that break glibc-2.20 lock elision

* Fri Oct 10 2014 tv <tv> 0.20140913-1.mga5.nonfree
+ Revision: 737841
- fix install
- update to latest AMD microcode
- update to latest Intel microcode

* Tue Sep 16 2014 umeabot <umeabot> 0.20131009-4.mga5.nonfree
+ Revision: 682384
- Mageia 5 Mass Rebuild

* Fri Dec 20 2013 tv <tv> 0.20131009-3.mga4.nonfree
+ Revision: 559054
- split intel ucode for microcode module (mga#11934)

* Thu Oct 31 2013 tmb <tmb> 0.20131009-2.mga4.nonfree
+ Revision: 548433
- Mageia 4 rebuild

* Wed Oct 09 2013 tv <tv> 0.20131009-1.mga4.nonfree
+ Revision: 493888
- new release

* Sat Jan 12 2013 umeabot <umeabot> 0.20121025-3.mga3.nonfree
+ Revision: 360023
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Oct 25 2012 tv <tv> 0.20121025-2.mga3.nonfree
+ Revision: 310084
- force latest microcode (mgarepo sync sucks)
- fix path

* Thu Oct 25 2012 tv <tv> 0.20121025-1.mga3.nonfree
+ Revision: 310078
- latest microcode
- amd update command needs fakeroot
- fix command name

* Wed May 30 2012 zezinho <zezinho> 0.20120313-2.mga3.nonfree
+ Revision: 251615
- fix amducode path

* Tue Mar 13 2012 tv <tv> 0.20120313-1.mga2.nonfree
+ Revision: 223288
- update microcode

* Sat Jan 15 2011 tmb <tmb> 0.20110115-1.mga1
+ Revision: 19854
- imported package microcode


* Sat Jan 15 2011 Thomas Backlund <tmb@mageia.org> 0.20110115-1.mga1
- initial Mageia import
- update intel microcode to 2010-09-29
- update amd microcode to 2011-01-11
- install intel microcode under /lib/firmware too
- build as noarch

* Thu Feb 04 2010 Frederic Crozat <fcrozat@mandriva.com> 0.20100204-1mdv2010.1
+ Revision: 500860
- import microcode