summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-03-29 22:47:09 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-03-29 22:47:09 +0000
commit84adb9036e99bc2e7560135694197b9312faa9e6 (patch)
treedfdc79ddfc972f2167c67ff96af51fbec5a7518c /mdk-stage1
parent094971eecb7a5df84b325de8c6ae46e88fc1f0ea (diff)
downloaddrakx-84adb9036e99bc2e7560135694197b9312faa9e6.tar
drakx-84adb9036e99bc2e7560135694197b9312faa9e6.tar.gz
drakx-84adb9036e99bc2e7560135694197b9312faa9e6.tar.bz2
drakx-84adb9036e99bc2e7560135694197b9312faa9e6.tar.xz
drakx-84adb9036e99bc2e7560135694197b9312faa9e6.zip
support more than one boot kernel :-)
Diffstat (limited to 'mdk-stage1')
-rwxr-xr-xmdk-stage1/pci-resource/update-pci-ids.pl12
1 files changed, 8 insertions, 4 deletions
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;
}