summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/pci-resource/update-pci-ids.pl
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-05 10:25:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-05 10:25:44 +0000
commit2025cb011746bb9c538547822d383e4ad4f3c0a5 (patch)
tree0a71736de95b46e9519b10320b8db0041309c291 /mdk-stage1/pci-resource/update-pci-ids.pl
parent33df5882b6955b05bbea6eeceb414dec2cfacf2f (diff)
downloaddrakx-backup-do-not-use-2025cb011746bb9c538547822d383e4ad4f3c0a5.tar
drakx-backup-do-not-use-2025cb011746bb9c538547822d383e4ad4f3c0a5.tar.gz
drakx-backup-do-not-use-2025cb011746bb9c538547822d383e4ad4f3c0a5.tar.bz2
drakx-backup-do-not-use-2025cb011746bb9c538547822d383e4ad4f3c0a5.tar.xz
drakx-backup-do-not-use-2025cb011746bb9c538547822d383e4ad4f3c0a5.zip
do not look at the mar files anymore, only use kernel/modules.pl (and so list_modules.pm)
Diffstat (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl')
-rwxr-xr-xmdk-stage1/pci-resource/update-pci-ids.pl39
1 files changed, 6 insertions, 33 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl
index 9969b6acf..09bb6f02e 100755
--- a/mdk-stage1/pci-resource/update-pci-ids.pl
+++ b/mdk-stage1/pci-resource/update-pci-ids.pl
@@ -2,8 +2,6 @@
use MDK::Common;
--x "../mar/mar" or die "\t*FAILED* Sorry, need ../mar/mar binary\n";
-
require '/usr/bin/merge2pcitable.pl';
my $drivers = read_pcitable("/usr/share/ldetect-lst/pcitable");
@@ -19,38 +17,13 @@ struct pci_module_map {
';
-my %t = ( network => [ 'network' ],
- medias => [ 'hd', 'cdrom', 'other' ]
- );
-my %sanity_check =
- arch() =~ /ia64/ ?
- ( network => [ '3c59x', 'eepro100', 'e100', 'tulip', 'via-rhine', 'ne2k-pci', '8139too' ],
- medias => [ 'aic7xxx', 'advansys', 'sym53c8xx', 'initio' ],
- ) :
- arch() =~ /ppc/ ?
- ( network => [ '3c59x', 'eepro100', 'tulip', 'via-rhine', 'ne2k-pci', '8139too' ],
- medias => [ 'aic7xxx', 'sym53c8xx', 'initio' ],
- ) :
- ( network => [ '3c59x', 'eepro100', 'e100', 'tulip', 'via-rhine', 'ne2k-pci', '8139too', 'tlan' ],
- medias => [ 'aic7xxx', 'advansys', 'sym53c8xx', 'initio' ],
- );
+my %t = (
+ network => 'network/main',
+ medias => 'disk/scsi|hardware_raid',
+);
foreach $type (keys %t) {
- my @modulez;
- print STDERR "$type (checks: ", join('/', @{$sanity_check{$type}}), ") ";
- foreach $floppy (@{$t{$type}}) {
- foreach $marfile (glob("../../kernel/all.modules/*/${floppy}_modules.mar")) {
- -f $marfile or die "\t*FAILED* Sorry, need $marfile mar file\n";
- my @modz = map { /(\S+)\.o/ } `../mar/mar -l $marfile`;
- if ($marfile !~ /(2\.2\.14)|(other)/) {
- foreach $mandatory (@{$sanity_check{$type}}) {
- member($mandatory, @modz) or die "\t*FAILED* Sanity check should prove that $mandatory.o be part of $marfile\n"
- }
- }
- push @modulez, @modz;
- print STDERR ".";
- }
- }
+ my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1:"$t{$type}"`);
print "#ifndef DISABLE_".uc($type)."
struct pci_module_map ${type}_pci_ids[] = {
@@ -58,7 +31,7 @@ struct pci_module_map ${type}_pci_ids[] = {
foreach my $k (sort keys %$drivers) {
$v = $drivers->{$k};
- member($v->[0], @modulez) or next;
+ member($v->[0], @modules) or next;
$k =~ /^(....)(....)/;
printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|,
$1, $2, $v->[1], $v->[0];