Accepting request 556733 from home:dmolkentin:branches:Base:System

- Support AMD CPU families 0x16 and 0x17 (bsc#1072424)
  * Adds 0545-Add-early-microcode-support-for-AMD-family-16h.patch
  * Adds 0546-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch

- Make ip=dhcp work. Previously, a network interface specifier was required.
  The new behaviour matches documented behaviour.
  Adds 0544-40network-Make-ip-dhcp-work.patch 

- Remove 00systemd-bootchart, which is gone from systemd for some time (bsc#1067279)
  Adds 0543-Remove-00systemd-bootchart.patch
- Ensure 0541-Make-sure-70-persistent-net.rules-is-included-in-ini.patch is
  not applied on Leap either

OBS-URL: https://build.opensuse.org/request/show/556733
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=326
This commit is contained in:
Daniel Molkentin 2017-12-13 16:42:36 +00:00 committed by Git OBS Bridge
parent 36574b035b
commit 8d109f57bd
6 changed files with 206 additions and 4 deletions

View File

@ -0,0 +1,43 @@
From d886567080bd53d2efcba43c89cdfb000ffd594b Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 4 Dec 2017 15:55:12 +0100
Subject: [PATCH] Remove 00systemd-bootchart
This was removed from systemd almost two years ago in
c550f7a9b89d017215af084288bc44f736f774fe, so dracut should drop support
as well.
Reference: bsc#1067279
---
modules.d/00systemd-bootchart/module-setup.sh | 19 -------------------
1 file changed, 19 deletions(-)
delete mode 100755 modules.d/00systemd-bootchart/module-setup.sh
diff --git a/modules.d/00systemd-bootchart/module-setup.sh b/modules.d/00systemd-bootchart/module-setup.sh
deleted file mode 100755
index dcf546e6..00000000
--- a/modules.d/00systemd-bootchart/module-setup.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# called by dracut
-check() {
- [[ "$mount_needs" ]] && return 1
- require_binaries $systemdutildir/systemd-bootchart || return 1
- return 255
-}
-
-# called by dracut
-depends() {
- return 0
-}
-
-# called by dracut
-install() {
- inst_symlink /init /sbin/init
- inst_multiple $systemdutildir/systemd-bootchart
-}
--
2.13.6

View File

@ -0,0 +1,69 @@
From 9d4167efa9b6f093f1a37cb07bc744e763a5d292 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Fri, 8 Dec 2017 09:51:47 +0100
Subject: [PATCH] 40network: Make ip=dhcp work
This fixes ip=dhcp to behave exactly like ip=<dev>:dhcp, as indicated
in the documentation.
Reference: bsc#1069163
---
modules.d/40network/ifup.sh | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index a684cba0..d9a418e5 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -497,6 +497,19 @@ if [ -z "$ip" ]; then
fi
fi
+bring_online() {
+ > /tmp/net.${netif}.up
+
+ if [ -e /sys/class/net/${netif}/address ]; then
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+ fi
+
+ setup_net $netif
+ source_hook initqueue/online $netif
+ if [ -z "$manualup" ]; then
+ /sbin/netroot $netif
+ fi
+}
# Specific configuration, spin through the kernel command line
# looking for ip= lines
@@ -555,17 +568,7 @@ for p in $(getargs ip=); do
done
if [ $? -eq 0 ]; then
- > /tmp/net.${netif}.up
-
- if [ -e /sys/class/net/${netif}/address ]; then
- > /tmp/net.$(cat /sys/class/net/${netif}/address).up
- fi
-
- setup_net $netif
- source_hook initqueue/online $netif
- if [ -z "$manualup" ]; then
- /sbin/netroot $netif
- fi
+ bring_online
fi
done
@@ -593,6 +596,9 @@ if [ ! -e /tmp/net.${netif}.up ]; then
do_dhcp -4
fi
fi
+ if [ $? -eq 0 ]; then
+ bring_online
+ fi
fi
if [ -e /tmp/net.${netif}.up ]; then
--
2.13.6

View File

@ -0,0 +1,29 @@
From 8bbdf5f5300fcb234a36fc83b8218b0f5be21b31 Mon Sep 17 00:00:00 2001
From: jonathan-teh <30538043+jonathan-teh@users.noreply.github.com>
Date: Sat, 29 Jul 2017 00:19:19 +0100
Subject: [PATCH 1/2] Add early microcode support for AMD family 16h
---
dracut-functions.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index ebe05a21..93a56f03 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -656,8 +656,10 @@ get_ucode_file ()
local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
- # If family greater or equal than 0x15
- if [[ $family -ge 21 ]]; 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"
else
printf "microcode_amd.bin"
--
2.13.6

View File

@ -0,0 +1,30 @@
From e725f7e919c286c93ee720aefb91ae231f89ec87 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Tue, 12 Dec 2017 17:48:36 +0100
Subject: [PATCH 2/2] Support Microcode Updates for AMD CPU Family 0x17
Original-Patch-By: Tom Lendacky <thomas.lendacky@amd.com>
---
dracut-functions.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 93a56f03..7dcbef7c 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -656,8 +656,10 @@ 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
+ # If family greater than or equal to 0x17
+ if [[ $family -ge 23 ]]; then
+ printf "microcode_amd_fam17h.bin"
+ elif [[ $family -eq 22 ]]; then
printf "microcode_amd_fam16h.bin"
elif [[ $family -eq 21 ]]; then
printf "microcode_amd_fam15h.bin"
--
2.13.6

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Dec 13 16:32:54 UTC 2017 - daniel.molkentin@suse.com
- Support AMD CPU families 0x16 and 0x17 (bsc#1072424)
* Adds 0545-Add-early-microcode-support-for-AMD-family-16h.patch
* Adds 0546-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch
-------------------------------------------------------------------
Fri Dec 8 08:55:30 UTC 2017 - daniel.molkentin@suse.com
- Make ip=dhcp work. Previously, a network interface specifier was required.
The new behaviour matches documented behaviour.
Adds 0544-40network-Make-ip-dhcp-work.patch
-------------------------------------------------------------------
Wed Dec 6 16:21:33 UTC 2017 - daniel.molkentin@suse.com
- Remove 00systemd-bootchart, which is gone from systemd for some time (bsc#1067279)
Adds 0543-Remove-00systemd-bootchart.patch
- Ensure 0541-Make-sure-70-persistent-net.rules-is-included-in-ini.patch is
not applied on Leap either
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 3 01:00:25 UTC 2017 - daniel.molkentin@suse.com Fri Nov 3 01:00:25 UTC 2017 - daniel.molkentin@suse.com

View File

@ -222,10 +222,15 @@ Patch537: 0537-dracut-init.sh-ignore-crc32.ko-in-builtin-test.patch
Patch538: 0538-Enable-core-dumps-with-systemd-from-initrd.patch Patch538: 0538-Enable-core-dumps-with-systemd-from-initrd.patch
Patch539: 0539-Add-IMA-functionality-fate-323289.patch Patch539: 0539-Add-IMA-functionality-fate-323289.patch
Patch540: 0540-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch Patch540: 0540-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch
%if 0%{?is_opensuse} # SLE and Leap have persistent net names, but not Factory/TW
%if 0%{?suse_version} && 0%{?sle_version}
Patch541: 0541-Make-sure-70-persistent-net.rules-is-included-in-ini.patch Patch541: 0541-Make-sure-70-persistent-net.rules-is-included-in-ini.patch
%endif %endif
Patch542: 0542-Include-crc32c-intel-module-when-using-btrfs.patch Patch542: 0542-Include-crc32c-intel-module-when-using-btrfs.patch
Patch543: 0543-Remove-00systemd-bootchart.patch
Patch544: 0544-40network-Make-ip-dhcp-work.patch
Patch545: 0545-Add-early-microcode-support-for-AMD-family-16h.patch
Patch546: 0546-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: bash BuildRequires: bash
@ -484,10 +489,14 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh
%patch538 -p1 %patch538 -p1
%patch539 -p1 %patch539 -p1
%patch540 -p1 %patch540 -p1
%if 0%{?is_opensuse} %if 0%{?suse_version} && 0%{?sle_version}
%patch541 -p1 %patch541 -p1
%endif %endif
%patch542 -p1 %patch542 -p1
%patch543 -p1
%patch544 -p1
%patch545 -p1
%patch546 -p1
%build %build
%configure\ %configure\
@ -501,7 +510,7 @@ make all CFLAGS="%{optflags}" %{?_smp_mflags}
echo -e "#!/bin/bash\nDRACUT_VERSION=%{_pkg_version}-%{release}" > %{buildroot}/%{dracutlibdir}/dracut-version.sh echo -e "#!/bin/bash\nDRACUT_VERSION=%{_pkg_version}-%{release}" > %{buildroot}/%{dracutlibdir}/dracut-version.sh
# use 00systemd-bootchart instead # no longer needed, use the (built-in) systemd-analyze instead
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/00bootchart rm -fr %{buildroot}/%{dracutlibdir}/modules.d/00bootchart
# not supported # not supported
@ -670,7 +679,6 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
%dir %{dracutlibdir}/modules.d %dir %{dracutlibdir}/modules.d
%{dracutlibdir}/modules.d/00bash %{dracutlibdir}/modules.d/00bash
%{dracutlibdir}/modules.d/00systemd-bootchart
%{dracutlibdir}/modules.d/00warpclock %{dracutlibdir}/modules.d/00warpclock
%{dracutlibdir}/modules.d/00systemd %{dracutlibdir}/modules.d/00systemd
%{dracutlibdir}/modules.d/01systemd-initrd %{dracutlibdir}/modules.d/01systemd-initrd