From 75b27ff9ef727362a0e930b1a89c6f42d2df39d6 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 14 Dec 2001 16:46:10 +0000 Subject: change again way of selection PCI entries : what's in mar files --> what's given by modules (e.g. just as update_kernel does) --- mdk-stage1/pci-resource/update-pci-ids.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl') diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl index 49d4ada9d..d6a723fc6 100755 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use MDK::Common; +use lib qw(../../perl-install); -x "../mar/mar" or die "\t*FAILED* Sorry, need ../mar/mar binary\n"; @@ -37,7 +38,6 @@ my %sanity_check = foreach $type (keys %t) { print STDERR "$type (checks: ", join('/', @{$sanity_check{$type}}), ") "; - my @modulez; foreach $floppy (@{$t{$type}}) { foreach $marfile (glob("../../all.modules/*/${floppy}_modules.mar")) { -f $marfile or die "\t*FAILED* Sorry, need $marfile mar file\n"; @@ -47,17 +47,22 @@ foreach $type (keys %t) { grep(/\t$mandatory\.o/, @modz) or die "\t*FAILED* Sanity check should prove that $mandatory.o be part of $marfile\n" } } - push @modulez, @modz; print STDERR "."; } } + my %names_in_stage2 = ( network => [ 'net' ], medias => [ 'scsi', 'disk' ] ); + require modules; + my @modulez; + push @modulez, modules::module_of_type__4update_kernel($_) foreach @{$names_in_stage2{$type}}; + print "#ifndef DISABLE_".uc($type)." struct pci_module_map ${type}_pci_ids[] = { "; - while (my ($k, $v) = each %$drivers) { - grep(/^\t$v->[0]\.o/, @modulez) or next; + foreach my $k (sort keys %$drivers) { + $v = $drivers->{$k}; + member($v->[0], @modulez) or next; $k =~ /^(....)(....)/; printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|, $1, $2, $v->[1], $v->[0]; -- cgit v1.2.1