Include virtio DRM drivers in hostonly initramfs (#1593028)

This commit is contained in:
Adam Williamson 2018-06-22 13:13:32 -07:00
parent b2d442e3cb
commit 3b5a03e586
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 57bec8020d5941644cacb5f54d735b9543fa35de Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Fri, 22 Jun 2018 11:25:04 -0700
Subject: [PATCH] Include virtio DRM drivers in hostonly initramfs
The code in 50drm which tries to include all DRM drivers for
hardware attached to the system did not look for virtio devices.
So if the system is a VM using the 'virtio' graphics adapter,
the 'virtio-gpu' module which should be included is not. This
extends the code to also look for virtio devices.
https://bugzilla.redhat.com/show_bug.cgi?id=1593028
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index eb3fc9d3..23545e34 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -31,7 +31,7 @@ installkernel() {
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed
if [[ $hostonly ]]; then
- for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
+ for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do
[[ -e $i ]] || continue
if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then
if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
--
2.18.0.rc2

View File

@ -5,7 +5,7 @@
# strip the automatically generated dep here and instead co-own the
# directory.
%global __requires_exclude pkg-config
%define dist_free_release 34.git20180604
%define dist_free_release 34.git20180604.1
Name: dracut
Version: 047
@ -62,6 +62,11 @@ Patch31: 0031.patch
Patch32: 0032.patch
Patch33: 0033.patch
# Include virtio DRM drivers in hostonly initramfs
# Fixes RHBZ#1593028
# https://github.com/dracutdevs/dracut/pull/418
Patch1000: 0001-Include-virtio-DRM-drivers-in-hostonly-initramfs.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
BuildRequires: bash
@ -492,6 +497,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%endif
%changelog
* Fri Jun 22 2018 Adam Williamson <awilliam@redhat.com> - 047-34.git20180604.1
- Test build with proposed fix for #1593028
* Mon Jun 04 2018 Harald Hoyer <harald@redhat.com> - 047-34.git20180604
- git snapshot