- Add AMD x86/x86-64 microcode. (Dated: 2009-10-09) Doesn't need
microcode_ctl modifications as it's loaded by request_firmware() like any other sensible driver. - Eventually, this AMD firmware can probably live inside kernel-firmware once it is split out.
This commit is contained in:
parent
20dd27d870
commit
244bfe6ef2
@ -1,5 +1,5 @@
|
||||
clog
|
||||
microcode_ctl-1.17
|
||||
microcode_ctl-1.17.tar.gz
|
||||
microcode-20090330.dat
|
||||
microcode-20090927.dat
|
||||
amd-ucode-2009-10-09.tar
|
||||
|
@ -15,13 +15,20 @@ RETVAL=0
|
||||
function start ()
|
||||
{
|
||||
RETVAL=1
|
||||
# Make sure we are on an Intel machine
|
||||
vendor=`grep "^vendor_id" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
|
||||
[ "$vendor" != "GenuineIntel" ] && return
|
||||
|
||||
# Microcode wasn't available until 686's.
|
||||
# Intel 686 and above, AMD family 16 and above
|
||||
vendor=`grep "^vendor_id" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
|
||||
family=`grep "^cpu family" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
|
||||
[ $family -lt 6 ] && return
|
||||
|
||||
if [ "$vendor" = "GenuineIntel" ] && [ $family -ge 6 ]; then
|
||||
echo -n $"Applying Intel CPU microcode update: "
|
||||
elif [ "$vendor" = "AuthenticAMD" ] && [ $family -ge 16 ]; then
|
||||
echo $"Loading AMD microcode update module"
|
||||
/sbin/modprobe microcode
|
||||
return
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
echo -n $"Applying Intel CPU microcode update: "
|
||||
|
||||
@ -49,6 +56,7 @@ function start ()
|
||||
|
||||
stop()
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
@ -11,6 +11,8 @@ Source1: microcode_ctl.init
|
||||
# Microcode now distributed directly by Intel, at
|
||||
# http://downloadcenter.intel.com (just search for microcode)
|
||||
Source2: microcode-20090927.dat
|
||||
# http://www.amd64.org/support/microcode.html
|
||||
Source3: amd-ucode-2009-10-09.tar
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
Requires(pre): /sbin/chkconfig /sbin/service
|
||||
Requires(pre): grep gawk coreutils
|
||||
@ -20,11 +22,12 @@ ExclusiveArch: %{ix86} x86_64
|
||||
Patch1: microcode_ctl.patch
|
||||
|
||||
%description
|
||||
microcode_ctl - updates the microcode on Intel x86/x86-64 CPU's
|
||||
microcode_ctl - updates the microcode on Intel and AMD x86/x86-64 CPU's
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
tar xf %{SOURCE3}
|
||||
|
||||
%build
|
||||
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
||||
@ -34,6 +37,7 @@ rm -rf %{buildroot}
|
||||
|
||||
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
mkdir -p %{buildroot}/lib/firmware/amd-ucode/
|
||||
|
||||
make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
|
||||
INSDIR=/sbin MANDIR=%{_mandir}/man8 RCDIR=%{_sysconfdir} install clean
|
||||
@ -41,6 +45,11 @@ make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
|
||||
install %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/microcode_ctl
|
||||
install -m 644 %{SOURCE2} %{buildroot}/lib/firmware/microcode.dat
|
||||
|
||||
install -m 644 amd-ucode-2009-10-09/microcode_amd.bin %{buildroot}/lib/firmware/amd-ucode/microcode_amd.bin
|
||||
install -m 644 amd-ucode-2009-10-09/LICENSE LICENSE.microcode_amd
|
||||
install -m 644 amd-ucode-2009-10-09/README README.microcode_amd
|
||||
install -m 644 amd-ucode-2009-10-09/INSTALL INSTALL.microcode_amd
|
||||
|
||||
chmod -R a-s %{buildroot}
|
||||
|
||||
%clean
|
||||
@ -51,6 +60,7 @@ rm -rf %{buildroot}
|
||||
%{_sysconfdir}/init.d/microcode_ctl
|
||||
/lib/firmware/*
|
||||
/sbin/microcode_ctl
|
||||
%doc LICENSE.microcode_amd README.microcode_amd INSTALL.microcode_amd
|
||||
%attr(0644,root,root) %{_mandir}/*/*
|
||||
|
||||
|
||||
@ -61,23 +71,43 @@ if [ "$1" = "0" ] ; then
|
||||
fi
|
||||
|
||||
%post
|
||||
# Only enable on Intel 686's and above.
|
||||
# Only enable on Intel 686's and above or AMD family 0x10 and above
|
||||
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
|
||||
[ "$vendor" != "GenuineIntel" ] && exit 0
|
||||
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
|
||||
if [ "$vendor" = "GenuineIntel" ]; then
|
||||
[ $family -lt 6 ] && exit 0
|
||||
elif [ "$vendor" = "AuthenticAMD" ]; then
|
||||
[ $family -lt 16 ] && exit 0
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/sbin/chkconfig --add microcode_ctl
|
||||
exit 0
|
||||
|
||||
%triggerpostun -- kernel-utils
|
||||
# Only enable on Intel 686's and above.
|
||||
# Only enable on Intel 686's and above or AMD family 0x10 and above
|
||||
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
|
||||
[ "$vendor" != "GenuineIntel" ] && exit 0
|
||||
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
|
||||
if [ "$vendor" = "GenuineIntel" ]; then
|
||||
[ $family -lt 6 ] && exit 0
|
||||
elif [ "$vendor" = "AuthenticAMD" ]; then
|
||||
[ $family -lt 16 ] && exit 0
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/sbin/chkconfig --add microcode_ctl
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Wed Dec 02 2009 Kyle McMartin <kyle@redhat.com> 1.17-1.56
|
||||
- Add AMD x86/x86-64 microcode. (Dated: 2009-10-09)
|
||||
Doesn't need microcode_ctl modifications as it's loaded by
|
||||
request_firmware() like any other sensible driver.
|
||||
- Eventually, this AMD firmware can probably live inside
|
||||
kernel-firmware once it is split out.
|
||||
|
||||
* Wed Sep 30 2009 Dave Jones <davej@redhat.com>
|
||||
- Update to microcode-20090927.dat
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user