diff options
author | Anssi Hannula <anssi@mandriva.org> | 2009-04-02 16:43:37 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2009-04-02 16:43:37 +0000 |
commit | ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62 (patch) | |
tree | 3907e31053fd40f776fd0acb0eff95ce8c9a923f /lib | |
parent | b862e3df3c02b87843f1e1b0f5cd6d32f67c09b4 (diff) | |
download | drakx-kbd-mouse-x11-ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62.tar drakx-kbd-mouse-x11-ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62.tar.gz drakx-kbd-mouse-x11-ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62.tar.bz2 drakx-kbd-mouse-x11-ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62.tar.xz drakx-kbd-mouse-x11-ada4645d8e98d36b3dee1a1e8bf31e0b7cd34c62.zip |
Add support for boot option xdriver=foo for overriding the driver in
non-interactive probe. Allowed special values:
auto = normal mode
free = only use free drivers
Last entry on commandline is used.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Xconfig/card.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm index 6245798..f093323 100644 --- a/lib/Xconfig/card.pm +++ b/lib/Xconfig/card.pm @@ -218,6 +218,24 @@ sub configure_auto_install { } } + my ($boot_xdriver) = cat_("/proc/cmdline") =~ /.*\bxdriver=(\S+)/; + + $options->{freedriver} = 1 if $boot_xdriver eq 'free'; + + if (!$card->{Driver} && $boot_xdriver && !member($boot_xdriver, 'auto', 'free')) { + log::explanations("using driver $boot_xdriver from kernel command line"); + $card = { + Driver => $boot_xdriver, + description => "Set by boot parameter", + VendorName => "Custom", + BoardName => "Set by boot parameter", + }; + if ($force_driver =~ /^(nvidia.|fglrx)/) { + $card->{Driver} = "vesa"; + $card->{Driver2} = $boot_xdriver; + } + } + if (!$card->{Driver}) { my @cards = probe(); my ($choice) = multi_head_choices($old_X->{Xinerama}, @cards); |