summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/pci-resource/update-pci-ids.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl')
-rwxr-xr-xmdk-stage1/pci-resource/update-pci-ids.pl65
1 files changed, 0 insertions, 65 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl
deleted file mode 100755
index 1ea4ffc60..000000000
--- a/mdk-stage1/pci-resource/update-pci-ids.pl
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl
-
-require '/usr/bin/merge2pcitable.pl';
-
-my $drivers = read_pcitable("/usr/share/ldetect-lst/pcitable");
-
-
-print '
-#define PCI_REVISION_ID 0x08 /* Revision ID */
-
-struct pci_module_map {
- unsigned short vendor; /* PCI vendor id */
- unsigned short device; /* PCI device id */
- const char *name; /* PCI human readable name */
- const char *module; /* module to load */
-};
-
-';
-
-my %t = (scsi => 'scsi', eth => 'net');
-
-my @modulz = sort grep { -d $_ } glob("../../all.modules/*");
-my $selected_mod = pop @modulz;
-my ($kern) = $selected_mod =~ /.*\/([^\/]+)/;
-
-if (-x "../mar/mar" && -f "../../all.modules/$kern/network_modules.mar" && -f "../../all.modules/$kern/hd_modules.mar") {
- $modulez{'eth'} = [ `../mar/mar -l ../../all.modules/$kern/network_modules.mar` ];
- $modulez{'scsi'} = [ `../mar/mar -l ../../all.modules/$kern/hd_modules.mar` ];
- $check_marfiles = 1;
-}
-
-
-foreach $type (keys %t) {
- print "#ifndef DISABLE_NETWORK\n" if ($type eq 'eth');
- print "#ifndef DISABLE_MEDIAS\n" if ($type eq 'scsi');
-
- print "
-struct pci_module_map ${type}_pci_ids[] = {
-";
- my %l;
- foreach (glob("../../all.kernels/$kern/lib/modules/*/$t{$type}/*.o"), glob("../../all.kernels/$kern/lib/modules/*/kernel/drivers/$t{$type}/{*/,}*.o")) {
- m|([^/]*)\.o$|;
- $l{$1} = 1;
- }
- my %absent;
- while (my ($k, $v) = each %$drivers) {
- $l{$v->[0]} or next;
- $k =~ /^(....)(....)/;
- printf qq|\t{0x%s , 0x%s , ( "%s" ), ( "%s" )} ,\n|,
- $1, $2, $v->[1], $v->[0];
- if (defined($check_marfiles)) {
- ($absent{$v->[0]} = 1) if (!grep(/^\t$v->[0]\.o\s/, @{$modulez{$type}}));
- }
- }
-
- if (%absent) { print STDERR "\tmissing for $type: "; foreach (keys %absent) { print STDERR "$_ " } print STDERR "\n"; };
-
-print "
-};
-int ${type}_num_ids=sizeof(${type}_pci_ids)/sizeof(struct pci_module_map);
-";
-
- print "#endif\n";
-
-}