summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-01-07 11:55:30 -0500
committerMike Gilbert <floppym@gentoo.org>2018-01-07 11:55:51 -0500
commit64981bc77cab21181a2184b7b5c993333f41ded7 (patch)
treeed6c53184663e658d9da07008d5862b2d3d69a1a /sys-kernel
parentapp-editors/neovim: switch CMAKE_BUILD_TYPE to Release. (diff)
downloadgentoo-64981bc77cab21181a2184b7b5c993333f41ded7.tar.gz
gentoo-64981bc77cab21181a2184b7b5c993333f41ded7.tar.bz2
gentoo-64981bc77cab21181a2184b7b5c993333f41ded7.zip
sys-kernel/dracut: backport support for newer AMD microcode
Closes: https://bugs.gentoo.org/643764 Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/dracut/dracut-046-r1.ebuild (renamed from sys-kernel/dracut/dracut-046.ebuild)3
-rw-r--r--sys-kernel/dracut/files/046-amd-microcode.patch30
2 files changed, 32 insertions, 1 deletions
diff --git a/sys-kernel/dracut/dracut-046.ebuild b/sys-kernel/dracut/dracut-046-r1.ebuild
index 8c505a56267c..501ca0187916 100644
--- a/sys-kernel/dracut/dracut-046.ebuild
+++ b/sys-kernel/dracut/dracut-046-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -51,6 +51,7 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
PATCHES=(
"${FILESDIR}/045-systemdutildir.patch"
+ "${FILESDIR}/046-amd-microcode.patch"
)
src_configure() {
diff --git a/sys-kernel/dracut/files/046-amd-microcode.patch b/sys-kernel/dracut/files/046-amd-microcode.patch
new file mode 100644
index 000000000000..c351275dbebc
--- /dev/null
+++ b/sys-kernel/dracut/files/046-amd-microcode.patch
@@ -0,0 +1,30 @@
+From a1250a704e33c59f2395aaad054db1c745a5c98a Mon Sep 17 00:00:00 2001
+From: Daniel Molkentin <dmolkentin@suse.com>
+Date: Tue, 12 Dec 2017 17:48:36 +0100
+Subject: [PATCH] Simplify microcode lookup for for AMD CPUs
+
+---
+ dracut-functions.sh | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index 112b2434..d7fc5303 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -661,11 +661,8 @@ get_ucode_file ()
+ local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
+
+ if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
+- # If family greater than or equal to 0x16
+- if [[ $family -ge 22 ]]; then
+- printf "microcode_amd_fam16h.bin"
+- elif [[ $family -eq 21 ]]; then
+- printf "microcode_amd_fam15h.bin"
++ if [[ $family -ge 21 ]]; then
++ printf "microcode_amd_fam%xh.bin" $family
+ else
+ printf "microcode_amd.bin"
+ fi
+--
+2.16.0.rc0
+