On 02.12.2011 15:57, Anssi Hannula wrote:
> On 02.12.2011 13:28, Colin Guthrie wrote:
>> Hi,
>>
>> Just a suggestion! Should we move wholesale to dracut?
>>
>> It's very easy to hack on, and Harald Hoyer has been very helpful and
>> has merged some of the patches we carried locally (which I mostly copied
>> from Mandriva). Not sure why they were not upstreamed before.
>>
>> There are still a couple patches we carry locally (soon to be less when
>> Harald pushes his git repo and I rebase), but they are pretty trivial,
>> understandable and easily maintainable (mostly they will be stylistic
>> tweaks and naming variations - i.e. very minor).
>>
>> Modprobe rules are included even in the initrd so tweaks there follow
>> through.
>>
>> I'm not necessarily against keeping mkinitrd, but I think we should take
>> the time from now until the beta phase to obsolte mkinitrd and force
>> everyone to use dracut in order to see if there are any issues and then
>> make the call before next beta or rc.
> 
> +1
> 
> One thing that doesn't work with dracut yet is that it only includes the
> KMS drivers into initramfs if they are loaded at the time of initramfs
> creation, causing unoptimal boot screen when a) initramfs created by the
> installer (I guess), and when b) user has switched a driver non-kms -> kms.
> 
> This can probably be solved by some patching of
> modules.d/50plymouth/module-setup.sh, but I haven't looked at it closely
> yet.

Patch attached. I guess this would remain as a Mageia specific patch as
the wanted behavior is dependant on how the distribution handles driver
switching etc...

Shall I apply it?

-- 
Anssi Hannula
--- /usr/share/dracut/modules.d/50plymouth/module-setup.sh-OLD	2011-12-02 12:43:22.000000000 +0200
+++ /usr/share/dracut/modules.d/50plymouth/module-setup.sh	2011-12-02 22:40:03.525836233 +0200
@@ -14,7 +14,17 @@
     local _modname
     # Include KMS capable drm drivers
     for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
-        zgrep -q drm_crtc_init  $_modname && instmods $_modname
+        if zgrep -q drm_crtc_init  $_modname; then
+            # if the hardware is present, include module even if it is not currently loaded,
+            # as we could e.g. be in the installer; nokmsboot boot parameter will disable
+            # loading of the driver if needed
+            if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
+                                  | grep -qxf - /sys/bus/pci/devices/*/modalias; then
+                hostonly='' instmods $_modname
+                continue
+            fi
+            instmods $_modname
+        fi
     done
 }
 

Reply via email to