From 84adb9036e99bc2e7560135694197b9312faa9e6 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 29 Mar 2001 22:47:09 +0000 Subject: support more than one boot kernel :-) --- mdk-stage1/pci-resource/update-pci-ids.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mdk-stage1/pci-resource') diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl index 84c5b7063..1ea4ffc60 100755 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -19,9 +19,13 @@ struct pci_module_map { my %t = (scsi => 'scsi', eth => 'net'); -if (-x "../mar/mar" && -f "../../modules/network_modules.mar" && -f "../../modules/hd_modules.mar") { - $modulez{'eth'} = [ `../mar/mar -l ../../modules/network_modules.mar` ]; - $modulez{'scsi'} = [ `../mar/mar -l ../../modules/hd_modules.mar` ]; +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; } @@ -34,7 +38,7 @@ foreach $type (keys %t) { struct pci_module_map ${type}_pci_ids[] = { "; my %l; - foreach (glob("../../kernel/lib/modules/*/$t{$type}/*.o"), glob("../../kernel/lib/modules/*/kernel/drivers/$t{$type}/{*/,}*.o")) { + 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; } -- cgit v1.2.1