summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
committerMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
commitfa40f30b4253b1e05c46cc5e0c111176825b7623 (patch)
tree76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /kernel
parent327bd24f8e4291bd1882de1990dd7339f781a9cb (diff)
downloaddrakx-Corpo_2_1_1.tar
drakx-Corpo_2_1_1.tar.gz
drakx-Corpo_2_1_1.tar.bz2
drakx-Corpo_2_1_1.tar.xz
drakx-Corpo_2_1_1.zip
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile2
-rwxr-xr-xkernel/check_mar.pl10
-rw-r--r--kernel/list_modules.pm77
-rw-r--r--kernel/modules.pl194
-rwxr-xr-xkernel/update_kernel58
5 files changed, 220 insertions, 121 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index 90fad04b6..a821d3939 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -4,7 +4,7 @@ all.modules: ../mdk-stage1/mar/mar update_kernel list_modules.pm
`../tools/specific_arch ./update_kernel`
../mdk-stage1/mar/mar:
- make -C `dirname $@`
+ make -C `dirname $@` mar
clean:
rm -rf *~ modules.description all.modules all.modules64
diff --git a/kernel/check_mar.pl b/kernel/check_mar.pl
index d29e65088..aedbfdfe7 100755
--- a/kernel/check_mar.pl
+++ b/kernel/check_mar.pl
@@ -7,13 +7,13 @@ my $mar = '../mdk-stage1/mar/mar';
my %sanity_check = (
hd => [
- if_(arch() !~ /x86_64/, 'aic7xxx'),
- qw(sym53c8xx initio),
- if_(arch() !~ /ppc/, 'advansys'),
+ qw(sym53c8xx),
+ if_(arch() !~ /x86_64/, 'initio'),
+ if_(arch() !~ /ppc|x86_64/, 'advansys'),
],
network => [
qw(3c59x eepro100 tulip via-rhine ne2k-pci 8139too),
- if_(arch() !~ /ppc|x86_64/, 'e100'),
+ if_(arch() !~ /ppc/, 'e100'),
if_(arch() !~ /ppc|ia64/, 'tlan'),
],
);
@@ -22,7 +22,7 @@ my $main_version = chomp_(cat_("all.kernels/.main"));
foreach (keys %sanity_check) {
my $marfile = "all.modules/$main_version/${_}_modules.mar";
- -e $mar or die "ERROR: missing $marfile\n";
+ -e $marfile or die "ERROR: missing $marfile\n";
my @l = map { /(\S+)\.o/ } `$mar -l $marfile`;
my @pbs = difference2($sanity_check{$_}, \@l);
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index b1ce99e3f..4488a9cfe 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -14,26 +14,34 @@ our %l = (
network =>
{
main => [
- if_(arch() =~ /ppc/, qw(mace bmac gmac)),
- if_(arch() =~ /^sparc/, qw(myri_sbus sunbmac sunhme sunqe)),
- if_(arch() !~ /alpha/ && arch() !~ /sparc/,
- qw(3c501 3c503 3c505 3c507 3c509 3c515), # 3c90x
- qw(82596 abyss ac3200 acenic aironet4500_card at1700 atp com20020-pci),
- qw(cs89x0 de600 de620 r8169),
- qw(defxx orinoco_plx), # most unused
- qw(depca dgrs dmfe e100 e1000 e2100 eepro eepro100 eexpress epic100 eth16i),
+ if_(arch() =~ /ppc/, qw(mace bmac gmac airport)),
+ if_(arch() =~ /^sparc/, qw(sunbmac sunhme sunqe)),
+ if_(arch() !~ /alpha|sparc/,
+ qw(3c501 3c503 3c505 3c507 3c509 3c515 3c90x),
+ qw(82596 abyss ac3200 acenic aironet4500_card at1700 atp com20020-pci),
+ qw(cs89x0 de600 de620),
+ qw(acx100_pci defxx orinoco_plx), # most unused
+ qw(depca dgrs dmfe e100 e2100 eepro eepro100 eexpress epic100 eth16i),
qw(ewrk3 hamachi hp hp-plus hp100 ibmtr),
- qw(lance natsemi ne ne2k-pci ni5010 ni52 ni65 nvnet olympic pcnet32 plip rcpci), #old_tulip
- qw(sb1000 sis900 sk98lin smc-ultra smc9194 starfire tg3 tlan tmspci tulip via-rhine), #sktr
- qw(wd winbond-840 yellowfin ns83820),
+ qw(lance natsemi ne ne2k-pci ni5010 ni52 ni65 nvnet olympic pcnet32 plip rcpci),
+ qw(sb1000 sis900 smc-ultra smc9194 starfire tlan tmspci tulip via-rhine),
+ qw(wd winbond-840),
+ qw(fealnx 3c990 3c990fx bcm4400),
+ qw(skfp tc35815 lanstreamer farsync sdladrv orinoco_pci prism2_plx),
qw(iph5526), #- fibre channel
),
- qw(3c59x 8139too sundance dl2k), #rtl8139
+ qw(3c59x 8139too 8139cp sundance), #rtl8139
+
],
+
+ gigabit => [
+ qw(dl2k myri_sbus yellowfin ns83820 r8169 tg3 e1000 sk98lin),
+ qw(bcm5820 bcm5700), #- encrypted
+ ],
+
raw => [
- qw(8390 mii),
- qw(ppp_generic ppp_async slhc aironet4500_core),
+ qw(ppp_generic ppp_async),
],
pcmcia => [
qw(3c574_cs 3c589_cs airo airo_cs aironet4500_cs axnet_cs fmvj18x_cs),
@@ -41,7 +49,7 @@ our %l = (
qw(xirc2ps_cs xircom_cb xircom_tulip_cb),
],
usb => [
- qw(pegasus kaweth usbnet catc CDCEther),
+ qw(catc CDCEther kaweth pegasus rtl8150 usbnet usbvnet_rfmd),
],
isdn => [
qw(b1pci c4 hisax hisax_fcpcipnp hysdn t1pci tpam),
@@ -56,19 +64,19 @@ our %l = (
if_(arch() =~ /^sparc/, qw(qlogicpti)),
if_(arch() !~ /alpha/ && arch() !~ /sparc/,
qw(3w-xxxx AM53C974 BusLogic NCR53c406a a100u2w advansys aha152x aha1542 aha1740),
- qw(atp870u dc395x_trm dtc fdomain g_NCR5380 in2000 initio pas16 pci2220i psi240i),
+ qw(atp870u dc395x_trm dtc g_NCR5380 in2000 initio pas16 pci2220i psi240i fdomain),
qw(qla1280 qla2x00 qlogicfas qlogicfc),
- qw(seagate sim710 sym53c416 t128 tmscsim u14-34f ultrastor wd7000),
- qw(eata eata_pio eata_dma),
+ qw(seagate wd7000 sim710 sym53c416 t128 tmscsim u14-34f ultrastor),
+ qw(eata eata_pio eata_dma mptscsih nsp32),
),
'53c7,8xx',
- qw(aic7xxx pci2000 qlogicisp sym53c8xx), # ncr53c8xx
+ qw(aic7xxx aic7xxx_old aic79xx pci2000 qlogicisp sym53c8xx lpfcdd), # ncr53c8xx
],
hardware_raid => [
if_(arch() =~ /^sparc/, qw(pluto)),
if_(arch() !~ /alpha/ && arch() !~ /sparc/,
- qw(DAC960 dpt_i2o megaraid aacraid ataraid cciss cpqarray gdth i2o_block),
- qw(qla2200 qla2300 cpqfc),
+ qw(DAC960 dpt_i2o megaraid aacraid cciss cpqarray gdth i2o_block),
+ qw(cpqfc qla2200 qla2300 ataraid hptraid silraid pdcraid pdc-ultra),
qw(ips ppa imm),
),
],
@@ -86,7 +94,7 @@ our %l = (
usb => [ qw(usbcore usb-uhci usb-ohci ehci-hcd usbkbd keybdev input) ],
firewire => [ qw(ohci1394 ieee1394) ],
pcmcia => [
- if_(arch() !~ /^sparc/, qw(pcmcia_core tcic ds i82365 yenta_socket)), # cb_enabler
+ if_(arch() !~ /^sparc/, qw(pcmcia_core tcic ds i82365 i82092 yenta_socket)), # cb_enabler
],
#serial_cs
#ftl_cs 3c575_cb apa1480_cb epic_cb serial_cb tulip_cb iflash2+_mtd iflash2_mtd
@@ -99,7 +107,7 @@ our %l = (
cdrom => [ qw(isofs) ],
loopback => [ qw(isofs loop) ],
local => [
- if_(arch() =~ /^i.86/, qw(vfat fat)),
+ if_(arch() =~ /^i.86|x86_64/, qw(vfat fat)),
if_(arch() =~ /^ppc/, qw(hfs)),
qw(reiserfs),
],
@@ -111,19 +119,19 @@ our %l = (
multimedia =>
{
sound => [
- if_(arch() =~ /ppc/, qw(dmasound_awacs)),
+ if_(arch() =~ /ppc/, qw(dmasound_pmac)),
if_(arch() !~ /^sparc/,
- qw(ad1816 ad1848 awe_wave audigy cmpci cs46xx cs4232 cs4281 emu10k1 es1370 es1371 esssolo1),
- qw(gus i810_audio mad16 maestro maestro3 mpu401 msnd_pinnacle opl3 opl3sa opl3sa2 nm256_audio),
- qw(pas2 rme96xx sb sgalaxy sam9407 sonicvibes sscape trident via82cxxx_audio wavefront ymfpci),
- qw(snd-ali5451 snd-als100 snd-als4000 snd-azt2320 snd-cmi8330 snd-cmipci snd-cs46xx snd-dt0197h),
- qw(snd-cs4281 snd-emu10k1),
- qw(snd-ad1816a snd-ad1848 snd-cs4232 snd-gusclassic snd-gusextreme snd-gusmax snd-interwave),
- qw(snd-mpu401 snd-opl3sa2 snd-opl3sa2 snd-opti93x snd-rme9652 snd-sb8 snd-sbawe),
+ qw(ad1816 ad1848 ad1889 ali5455 awe_wave audigy cmpci cs46xx cs4232 cs4281 emu10k1 es1370 es1371 esssolo1 forte),
+ qw(gus i810_audio ice1712 kahlua mad16 maestro maestro3 mpu401 msnd_pinnacle nvaudio opl3 opl3sa opl3sa2 nm256_audio),
+ qw(pas2 pss rme96xx sb sgalaxy sam9407 sonicvibes sscape trident via82cxxx_audio wavefront ymfpci),
+ qw(snd-ali5451 snd-als100 snd-als4000 snd-azt2320 snd-azt3328 snd-cmi8330 snd-cmipci),
+ qw(snd-cs4231 snd-cs4232 snd-cs4236 snd-cs46xx snd-dt0197h snd-cs4281 snd-emu10k1),
+ qw(snd-ad1816a snd-ad1848 snd-gusclassic snd-gusextreme snd-gusmax snd-interwave),
+ qw(snd-mpu401 snd-opti93x snd-rme9652 snd-sb8 snd-sbawe),
qw(snd-ens1370 snd-ens1371 snd-es18xx snd-es968 snd-es1938 snd-es1968 snd-es1688),
- qw(snd-fm801 snd-hdsp snd-ice1712 snd-intel8x0 snd-korg1212 snd-maestro3),
+ qw(snd-fm801 snd-hdsp snd-ice1712 snd-ice1724 snd-intel8x0 snd-korg1212 snd-maestro3),
qw(snd-nm256 snd-rme96 snd-rme32 snd-opl3sa2 snd-sb16 snd-sgalaxy snd-sonicvibes),
- qw(snd-trident snd-usb-audio snd-via686 snd-via8233 snd-wavefront snd-ymfpci),
+ qw(snd-trident audio snd-via82xx snd-vx222 snd-wavefront snd-ymfpci),
),
],
tv => [ qw(bttv cpia_usb ibmcam mod_quickcam ov511 ov518_decomp ultracam usbvideo cyber2000fb saa7134) ],
@@ -143,6 +151,7 @@ our %l = (
qw(busmouse msbusmouse logibusmouse serial qpmouse atixlmouse),
],
char => [
+ if_(arch() =~ /ia64/, qw(efivars)),
qw(amd768_rng applicom n_r3964 nvram pc110pad ppdev),
qw(mxser moxa isicom wdt_pci epca synclink istallion sonypi i810-tco sx), #- what are these???
],
@@ -152,7 +161,7 @@ our %l = (
qw(btaudio),
#- these need checking
- qw(pcilynx sktr rrunner gmac meye 3c559 buz paep),
+ qw(pcilynx sktr rrunner meye 3c559 buz paep),
],
},
);
diff --git a/kernel/modules.pl b/kernel/modules.pl
index 6e8f04307..e06157368 100644
--- a/kernel/modules.pl
+++ b/kernel/modules.pl
@@ -10,111 +10,170 @@ BEGIN {
use MDK::Common;
use list_modules;
-
-my @skip_big_modules_on_stage1 = (
-qw(
-olympic
-sk98lin acenic
-3c90x
-ns83820
-aironet4500_card aironet4500_core com20020-pci hamachi starfire winbond-840
-
-dc395x_trm
-BusLogic seagate fdomain g_NCR5380
-)
+#- seldom used modules
+#- we don't bother making a special floppy for those
+my %modules_only_for_all_img = (
+
+ 'network/main' => [
+ qw(olympic acenic),
+ qw(aironet4500_card com20020-pci hamachi starfire winbond-840),
+ qw(fealnx 3c990 3c990fx prism2_plx dgrs),
+
+ # token ring
+ qw(tmspci ibmtr abyss),
+
+ qw(3c501 3c503 3c505 3c507 3c515), # unused, hopefully?
+ qw(eepro 82596 de620 depca ewrk3 cs89x0),
+
+ if_(arch() =~ /x86_64/, qw(orinoco_plx)), # don't support laptop for now
+ if_(arch() =~ /x86_64/, qw(hp100 epic100)), # old (nico)
+ if_(arch() =~ /alpha|ppc/, qw(sb1000)),
+ qw(iph5526),
+
+ qw(ac3200 at1700 atp ni5010 ni52 ni65), #- unused from Jeff
+
+ qw(ewrk3 hamachi ibmtr),
+ qw(ne ni5010 ni52 ni65 nvnet olympic rcpci),
+ qw(skfp tc35815 lanstreamer farsync sdladrv orinoco_pci prism2_plx fealnx 3c990 3c990fx bcm4400),
+
+ qw(acx100_pci eth16i e2100 3c509 orinoco_plx wd eexpress),
+ ],
+
+ 'network/gigabit' => [
+
+ ],
+
+ 'bus/pcmcia' => [
+ if_(arch() =~ /x86_64/, qw(pcmcia_core ds tcic yenta_socket)), # don't support laptop for now
+ if_(arch() =~ /x86_64/, qw(i82092 i82365)), # doco says "older laptops"
+
+ qw(pcmcia_core ds tcic yenta_socket), # don't support laptop for now
+ qw(i82092 i82365), # doco says "older laptops"
+ ],
+
+ 'disk/scsi' => [
+ # ISA cards:
+ qw(NCR53c406a aha152x psi240i qlogicfas qlogicfc wd7000 sim710 t128 ultrastor), '53c7,8xx',
+ qw(qla2x00 in2000 pas16 a100u2w seagate g_NCR5380),
+ if_(arch() =~ /x86_64/, qw(53c7,8xx nsp32 initio advansys atp870u)), #- old
+ qw(AM53C974), # deprecated by tmscsim
+ qw(u14-34f), #- duplicate from ultrastor.o
+ #- still used, keeping them: qw(aha1542 sym53c416),
+
+ qw(dc395x_trm mptscsih BusLogic fdomain),
+ qw(pci2220i eata eata_pio eata_dma),
+ 'aic7xxx_old',
+ 'lpfcdd',
+ qw(seagate wd7000 sim710 sym53c416 t128 tmscsim u14-34f ultrastor),
+ qw(eata eata_pio eata_dma nsp32),
+ qw(AM53C974 BusLogic NCR53c406a aha152x aha1542 aha1740 qlogicisp),
+ '53c7,8xx',
+ ],
+
+ 'disk/hardware_raid' => [
+ if_(arch() =~ /x86_64/, qw(ataraid)), #- old
+ qw(i2o_block qla2200 qla2300 cpqfc DAC960 gdth pdc-ultra),
+ ],
);
-my @skip_modules_on_stage1 = (
- qw(sktr tmspci ibmtr abyss), # alt token ring
- qw(old_tulip rtl8139),
- if_(arch() =~ /alpha|ppc/, qw(sb1000)),
- qw(
- tg3 r8169
- apa1480_cb
- imm ppa plip
- 3w-xxxx pci2220i qla2x00 i2o_block
- eata_pio eata_dma
- qla2200 qla2300
- iph5526
- ),
- 'AM53C974', # deprecated by tmscsim
- qw(ac3200 at1700 atp ni5010 ni52 ni65), #- unused from Jeff
- "u14-34f", #- duplicate from ultrastor.o
+#- modules that will only be available in stage2
+#- those modules are NOT in all.img, network.img...
+#- there should only be modules that can't be used on stage1
+#- completly unused modules should be removed directly from the kernel
+#- (and so be removed from stage2 too)
+my %modules_removed_from_stage1 = (
+ 'network/main' => [
+ 'plip'
+ ],
+
+ 'disk/hardware_raid' => [
+ qw(imm ppa),
+ qw(ataraid hptraid silraid pdcraid), # ad-hoc raid which is unsupported in stage1 anyway
+ ],
);
+my @modules_always_on_stage1 = qw(floppy);
+
+
+sub flatten_and_check {
+ my ($h) = @_;
+ map {
+ my $category = $_;
+ my @l = @{$h->{$category}};
+ if (my @bad = difference2(\@l, [ category2modules($category) ])) {
+ foreach (@bad) {
+ if (my $cat = module2category($_)) {
+ warn "ERROR in modules.pl: module $_ is in category $cat, not in $category\n";
+ } else {
+ warn "ERROR in modules.pl: unknown module $_\n";
+ }
+ }
+ exit 1;
+ }
+ @l;
+ } keys %$h;
+}
+
+my @modules_only_for_all_img = flatten_and_check(\%modules_only_for_all_img);
+my @modules_removed_from_stage1 = flatten_and_check(\%modules_removed_from_stage1);
+
+
my %images = (
+ network_gigabit
+ => 'fs/network network/raw network/gigabit',
+ network_usb
+ => 'fs/network network/raw bus/usb network/usb',
+ network_gigabit_usb
+ => 'fs/network network/raw bus/usb network/gigabit|usb',
network => 'fs/network network/raw bus/pcmcia network/main',
hd => 'disk/raw fs/local|loopback disk/scsi|hardware_raid',
- other => 'disk/scsi|hardware_raid network/main ONLY_BIG fs/cdrom disk/cdrom|raw fs/network network/raw',
+ hdcdrom_usb
+ => 'disk/cdrom|raw fs/local|loopback|cdrom bus/usb disk/usb bus/firewire disk/firewire',
pcmcia => 'fs/cdrom disk/cdrom|raw|pcmcia bus/pcmcia fs/network network/pcmcia|raw',
cdrom => 'fs/cdrom disk/cdrom|raw|scsi',
- usb => 'fs/cdrom disk/cdrom|raw bus/usb disk/usb fs/network network/usb|raw bus/firewire disk/firewire',
- all => 'fs/cdrom disk/cdrom|raw bus/usb disk/usb|scsi fs/loopback|local bus/pcmcia disk/pcmcia|hardware_raid fs/network network/main|pcmcia|usb|raw bus/firewire disk/firewire',
+ all => 'fs/cdrom disk/cdrom|raw bus/usb disk/usb|scsi fs/loopback|local bus/pcmcia disk/pcmcia|hardware_raid fs/network network/main|pcmcia|usb|raw|gigabit bus/firewire disk/firewire',
);
+load_dependencies(glob("all.modules/2.4*/modules.dep"));
+
my $verbose = "@ARGV" =~ /-v/;
images() if "@ARGV" =~ /images/;
check() if "@ARGV" =~ /check/;
pci_modules4stage1($1) if "@ARGV" =~ /pci_modules4stage1:(.*)/;
sub images {
- load_dependencies('modules.dep');
-
while (my ($image, $l) = each %images) {
- my @modules;
+ my @modules = @modules_always_on_stage1;
foreach (split(' ', $l)) {
- if (/ONLY_BIG/) {
- @modules = intersection(\@modules, \@skip_big_modules_on_stage1);
- next;
- }
push @modules, category2modules($_);
}
+
+ @modules = difference2(\@modules, \@modules_removed_from_stage1);
if ($image !~ /all/) {
- @modules = difference2(\@modules, \@skip_modules_on_stage1);
- }
- if ($image !~ /other|all/) {
- @modules = difference2(\@modules, \@skip_big_modules_on_stage1)
+ @modules = difference2(\@modules, \@modules_only_for_all_img);
}
- @modules = map { dependencies_closure($_) } @modules;
+ @modules = uniq(map { dependencies_closure($_) } @modules);
printf qq(%s_modules="%s"\n), $image, join(" ", map { "$_.o" } @modules);
}
}
sub pci_modules4stage1 {
- print "$_\n" foreach difference2([ category2modules($_[0]) ], \@skip_modules_on_stage1);
+ print "$_\n" foreach uniq(map { dependencies_closure($_) } difference2([ category2modules($_[0]) ], \@modules_removed_from_stage1));
}
sub check {
my $error;
my %listed;
- my %big_modules_categories;
while (my ($t1, $l) = each %list_modules::l) {
while (my ($t2, $l) = each %$l) {
ref $l or die "bad $l in $t1/$t2";
foreach (@$l) {
$listed{$_} = 1;
- push @{$big_modules_categories{$t1}{$t2}}, $_ if member($_, @skip_modules_on_stage1);
}
}
}
- # remove accepted categories for other.img
- delete $big_modules_categories{disk}{hardware_raid};
- delete $big_modules_categories{disk}{scsi};
- delete $big_modules_categories{network}{main};
-
- if (map { %$_ } values %big_modules_categories) {
- my @l = map { "$_/" . join('|', sort keys %{$big_modules_categories{$_}}) } sort keys %big_modules_categories;
- print STDERR "WEIRD CATEGORIES USED FOR other.img: ", join(" ", @l), "\n";
- if ($verbose) {
- while (my ($t1, $t2s) = each %big_modules_categories) {
- print "$t1/$_ used for other.img: ", join(" ", @{$t2s->{$_}}), "\n" foreach keys %$t2s;
- }
- }
- $error = 1;
- }
-
my %module2category;
my %deprecated_modules = %listed;
my $not_listed = sub {
@@ -144,16 +203,19 @@ sub check {
my $pcitable = read_pcitable("/usr/share/ldetect-lst/pcitable");
my $usbtable = read_pcitable("/usr/share/ldetect-lst/usbtable");
- my @l = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$pcitable;
- if (my @l = difference2(\@l, [ keys %listed ])) {
+ my @l1 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$pcitable;
+ if (my @l = difference2(\@l1, [ keys %listed ])) {
my %not_listed;
push @{$not_listed{$module2category{$_}}}, $_ foreach @l;
+ if (my $l = delete $not_listed{''}) {
+ print "bad/old pcitable modules : ", join(" ", @$l), "\n";
+ }
print STDERR "PCITABLE MODULES NOT LISTED $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed;
#$error = 1;
}
- my @l = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$usbtable;
- if (my @l = difference2(\@l, [ keys %listed ])) {
+ my @l2 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$usbtable;
+ if (my @l = difference2(\@l2, [ keys %listed ])) {
my %not_listed;
push @{$not_listed{$module2category{$_}}}, $_ foreach @l;
if ($verbose) {
diff --git a/kernel/update_kernel b/kernel/update_kernel
index 9cea09e7d..ddb7483dc 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -1,11 +1,20 @@
#!/bin/bash
ALL_KERNELS="all.kernels"
+RPMS=/export/Mandrake/RPMS
+
+ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
+
# move stuff to this new "kernel" directory
if [ ! -d all.kernels ]; then
+ if [ -d ../all.kernels ]; then
mv ../all.kernels .
rm -rf ../all.modules
+ else
+ # make sure "all.kernels" directory exists
+ mkdir all.kernels
+ fi
fi
function create_marfile() {
@@ -24,12 +33,18 @@ function create_modules() {
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
/sbin/modinfo -f '%{filename} %{description}\n' *.o | perl -lne 'print "$1\t$2" if /(.*?)\.o "(.*)"/' > modules.description
+}
+
+function create_modules_mar() {
+ echo -n "stripping $kern: "
+ $GIBASEDIR/kernel/strip_modules *.o 2>/dev/null
+ echo "done"
echo -n "packdrake $kern: "
ls *.o | packdrake -b9s "modules.cz" 400000
echo "done"
mv modules.cz ../modules.cz-$kern
- for i in network cdrom hd usb other pcmcia all; do
+ for i in network network_gigabit_usb network_gigabit network_usb cdrom hd hdcdrom_usb pcmcia all; do
modules_var="${i}_modules"
eval "create_marfile ${i}_modules.mar \$$modules_var"
done
@@ -38,13 +53,21 @@ function create_modules() {
[ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main)
-rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/')
+if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then
+ rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-[0-9]*.rpm | perl -pe 's/kernel-((\.?[0-9]+){3})\.(.*)/$1-${3}/')
+else
+ rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/')
+fi
if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then
[ -n "$main" ] && rm -rf $ALL_KERNELS/$main
cd $ALL_KERNELS
rm -rf $rpm ; mkdir $rpm
cd $rpm
- rpm2cpio /RPMS/kernel-BOOT-*.rpm | cpio -id
+ if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then
+ rpm2cpio $RPMS/kernel-[0-9]*.rpm | cpio -id
+ else
+ rpm2cpio $RPMS/kernel-BOOT-*.rpm | cpio -id
+ fi
find -type f -name "*.o.gz" | xargs gunzip
cd ../..
@@ -61,21 +84,12 @@ fi
cd ..
}
-ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
-
-eval `perl modules.pl images`
if [ "$ARCH" == "i386" ]; then
for i in $ALL_KERNELS/*/boot/vmlinuz*; do
#disable any existing resolution!!!
/usr/sbin/rdev -v $i 65535 #788 #785
done
-else
- if [ "$ARCH" == "ppc" ]; then
- cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux .
- else
- cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz .
- fi
fi
@@ -87,14 +101,28 @@ for i in $ALL_KERNELS/*; do
(
mkdir all.modules/$kern
cd all.modules/$kern
+
+ create_modules ../../$i $kern
+ ) || exit 1
+done
+cp -f all.modules/$main/modules.description .
+
+l=`perl modules.pl images` || exit 1
+eval $l
+
+for i in $ALL_KERNELS/*; do
+ kern=`basename $i`
+ (
+ cd all.modules/$kern
+
if [ "$kern" = "$main" ]; then
- create_modules ../../$i $kern
+ create_modules_mar ../../$i $kern
else
echo "$kern ($main)"
- create_modules ../../$i $kern 2>/dev/null
+ create_modules_mar ../../$i $kern 2>/dev/null
fi
) || exit 1
done
-cp -f all.modules/$main/modules.description .
+
./check_mar.pl