diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2000-12-12 21:05:30 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2000-12-12 21:05:30 +0000 |
commit | 2b2914cc04a93ca362e4eb3663061c3039aa4049 (patch) | |
tree | 3f8dbeae1bc114e58f3246cd76b9b0156392b720 /mdk-stage1/pci-resource/update-pci-ids.pl | |
parent | 7852f76ee05551c05a4f833f9a55bec15f44f85d (diff) | |
download | drakx-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar drakx-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.gz drakx-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.bz2 drakx-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.xz drakx-2b2914cc04a93ca362e4eb3663061c3039aa4049.zip |
- add pci probing feature
- add listing of available modules and insmod'ing on user request
- make rescue-stage2 working
Diffstat (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl')
-rwxr-xr-x | mdk-stage1/pci-resource/update-pci-ids.pl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl new file mode 100755 index 000000000..4aaa04b70 --- /dev/null +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +use lib "../../perl-install"; +use common qw(:common); +use pci_probing::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'); + +foreach (keys %t) { + print " +struct pci_module_map ${_}_pci_ids[] = { +"; + my %l; + foreach (glob("../../kernel*/lib/modules/*/$t{$_}/*.o")) { + m|([^/]*)\.o$|; + $l{$1} = 1; + } + while (my ($k, $v) = each %pci_probing::pcitable::ids) { + $l{$v->[1]} or next; + printf qq|\t{0x%04x , 0x%04x , ( "%s" ), ( "%s" )} ,\n|, + $k / 0x10000, $k % 0x10000, $v->[0], $v->[1]; + } + +print " +}; +int ${_}_num_ids=sizeof(${_}_pci_ids)/sizeof(struct pci_module_map); +" + +} |