summaryrefslogtreecommitdiffstats
path: root/convert
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-01 01:54:23 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-01 01:54:23 +0000
commit82863dcf6db9e12d0aff045c807248f2ac576a47 (patch)
tree7f7097575432e70073d4cfcf59a28c1a83ff9a43 /convert
parent8bf9758b05815e717779e6ad37ddbb1578cc54c0 (diff)
downloadldetect-lst-82863dcf6db9e12d0aff045c807248f2ac576a47.tar
ldetect-lst-82863dcf6db9e12d0aff045c807248f2ac576a47.tar.gz
ldetect-lst-82863dcf6db9e12d0aff045c807248f2ac576a47.tar.bz2
ldetect-lst-82863dcf6db9e12d0aff045c807248f2ac576a47.tar.xz
ldetect-lst-82863dcf6db9e12d0aff045c807248f2ac576a47.zip
(read_kernel_aliasmap) enable to automatically add new ATI cards from
dkms-modules-info/dkms-modules.alias where fglrx declares what it supports too bad nvidia driver use wildcards in order to match devices...
Diffstat (limited to 'convert')
-rwxr-xr-xconvert/merge2pcitable.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index 1571f0b7..ee66de68 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -9,6 +9,8 @@ qw(alsa ignore),
my ($force, @force_modules, $all, $keep_subids, $wildcards, $use_description);
+# UPDATE ME WHEN UPDATING ../lst/Cards+:
+my $ati_driver = 'Card:ATI Radeon HD 2000 and later (radeon/fglrx)';
if ($0 =~ /merge2pcitable/)
{
if ($ARGV[0] =~ /^-f=?(.*)$/) {
@@ -114,6 +116,24 @@ sub read_pcitable {
\%drivers;
}
+sub read_kernel_aliasmap {
+ my ($f) = @_;
+ my %drivers;
+ if (!$f || $f eq '/dev/null') {
+ $f = find { -e $_ } map { "$_/dkms-modules-info/dkms-modules.alias" } qw(. ..);
+ }
+ foreach (cat_($f)) {
+ # too bad nvidia driver doesn't list its ids...
+ next if !/alias pci.* fglrx/;
+ if (/alias pci:v0000(....)d0000(....)sv/) {
+ my ($id1, $id2) = (lc($1), lc($2));
+ $drivers{ join '', map { /(....)$/ } $id1, $id2, '0xffff', '0xffff' } = [ $ati_driver ];
+ }
+ }
+ \%drivers;
+}
+
+
sub read_kernel_pcimap {
my ($f) = @_;
my (%drivers, %driver_with_classes);