summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile7
-rwxr-xr-xkernel/check_mar.pl12
-rwxr-xr-xkernel/gen_modules_conf.pl.pl40
-rw-r--r--kernel/list_modules.pm16
-rw-r--r--kernel/modules.pl8
-rwxr-xr-xkernel/update_kernel40
6 files changed, 94 insertions, 29 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index 90fad04b6..0d478b9a5 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,10 +1,13 @@
-all: all.modules
+all: all.modules gen_modules_conf
+
+gen_modules_conf:
+ perl gen_modules_conf.pl.pl > ../rescue/tree/ka/gen_modules_conf.pl
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..19225410a 100755
--- a/kernel/check_mar.pl
+++ b/kernel/check_mar.pl
@@ -7,14 +7,14 @@ my $mar = '../mdk-stage1/mar/mar';
my %sanity_check = (
hd => [
- if_(arch() !~ /x86_64/, 'aic7xxx'),
- qw(sym53c8xx initio),
- if_(arch() !~ /ppc/, 'advansys'),
+ qw(aic7xxx 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|ia64/, 'tlan'),
+ qw(3c59x eepro100 tulip via-rhine ne2k-pci 8139too),
+ if_(arch() !~ /ppc/, 'e100'),
+ if_(arch() !~ /ppc|x86_64|ia64/, 'tlan'),
],
);
diff --git a/kernel/gen_modules_conf.pl.pl b/kernel/gen_modules_conf.pl.pl
new file mode 100755
index 000000000..e842eafa0
--- /dev/null
+++ b/kernel/gen_modules_conf.pl.pl
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+use list_modules;
+
+my %kinds = (
+ scsi => 'disk/scsi|hardware_raid',
+ network => 'network/main|usb',
+);
+
+my %kinds2all_modules = map {
+ $_ => [ list_modules::category2modules($kinds{$_}) ];
+} keys %kinds;
+
+$kinds2all_modules{usb} = [ qw(usb-uhci usb-ohci ehci-hcd) ];
+
+use Data::Dumper;
+print Data::Dumper->Dump([\%kinds2all_modules], ['$kinds2all_modules']);
+
+print <<'EOF';
+my @l = map { /^(\S+)\s*:/ ? $1 : () } `lspcidrake`;
+
+my %kinds2modules = map {
+ $_ => [ intersection(\@l, $kinds2all_modules->{$_}) ];
+} keys %$kinds2all_modules;
+
+if (my @scsi = @{$kinds2modules{scsi}}) {
+ print "probeall scsi_hostadapter ", join(" ", @scsi), "\n";
+}
+if (my @usb = @{$kinds2modules{usb}}) {
+ print "probeall usb-interface ", join(" ", @usb), "\n";
+}
+my $eth = 0;
+foreach (@{$kinds2modules{network}}) {
+ print "alias eth$eth $_\n";
+ $eth++;
+}
+
+sub intersection { my (%l, @m); @l{@{shift @_}} = (); foreach (@_) { @m = grep { exists $l{$_} } @$_; %l = (); @l{@m} = () } keys %l }
+EOF
+
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index b1ce99e3f..20dcb42cc 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -16,15 +16,16 @@ our %l = (
main => [
if_(arch() =~ /ppc/, qw(mace bmac gmac)),
if_(arch() =~ /^sparc/, qw(myri_sbus sunbmac sunhme sunqe)),
- if_(arch() !~ /alpha/ && arch() !~ /sparc/,
+ 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 r8169),
qw(defxx orinoco_plx), # most unused
- qw(depca dgrs dmfe e100 e1000 e2100 eepro eepro100 eexpress epic100 eth16i),
+ qw(depca dmfe e100 e1000 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(sb1000 sis900 sk98lin smc-ultra smc9194 starfire tlan tmspci tulip via-rhine), #sktr
+ qw(tg3 bcm5700 bcm5820),
qw(wd winbond-840 yellowfin ns83820),
qw(iph5526), #- fibre channel
@@ -55,14 +56,14 @@ our %l = (
if_(arch() =~ /ppc/, qw(mesh mac53c94)),
if_(arch() =~ /^sparc/, qw(qlogicpti)),
if_(arch() !~ /alpha/ && arch() !~ /sparc/,
- qw(3w-xxxx AM53C974 BusLogic NCR53c406a a100u2w advansys aha152x aha1542 aha1740),
+ qw(3w-xxxx AM53C974 NCR53c406a a100u2w advansys aha1740),
qw(atp870u dc395x_trm dtc fdomain g_NCR5380 in2000 initio pas16 pci2220i psi240i),
qw(qla1280 qla2x00 qlogicfas qlogicfc),
- qw(seagate sim710 sym53c416 t128 tmscsim u14-34f ultrastor wd7000),
+ qw(seagate sym53c416 u14-34f ultrastor),
qw(eata eata_pio eata_dma),
),
'53c7,8xx',
- qw(aic7xxx pci2000 qlogicisp sym53c8xx), # ncr53c8xx
+ qw(aic7xxx pci2000 qlogicisp sym53c8xx mptscsih mptbase), # ncr53c8xx
],
hardware_raid => [
if_(arch() =~ /^sparc/, qw(pluto)),
@@ -99,7 +100,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),
],
@@ -143,6 +144,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???
],
diff --git a/kernel/modules.pl b/kernel/modules.pl
index 6e8f04307..e7a3c6f53 100644
--- a/kernel/modules.pl
+++ b/kernel/modules.pl
@@ -28,22 +28,26 @@ my @skip_modules_on_stage1 = (
qw(sktr tmspci ibmtr abyss), # alt token ring
qw(old_tulip rtl8139),
if_(arch() =~ /alpha|ppc/, qw(sb1000)),
+ if_(arch() !~ /x86_64|ia64|^i.86/, qw(tg3 bcm5700 bcm5820)), #- important gigabit cards
qw(
- tg3 r8169
+ r8169
apa1480_cb
imm ppa plip
3w-xxxx pci2220i qla2x00 i2o_block
eata_pio eata_dma
qla2200 qla2300
iph5526
+ ppp_async ppp_generic shlc eth16i rcpci yellowfin orinoco_plx natsemi lance dmfe depca cs89x0 wd slhc # not necessary for ka (most out of pcitable)
),
+ if_(arch() =~ /x86_64/, qw(53c7,8xx initio ataraid advansys atp870u)), #- old
'AM53C974', # deprecated by tmscsim
qw(ac3200 at1700 atp ni5010 ni52 ni65), #- unused from Jeff
"u14-34f", #- duplicate from ultrastor.o
);
my %images = (
- network => 'fs/network network/raw bus/pcmcia network/main',
+ ka => 'fs/network network/raw bus/pcmcia network/main',
+ network => 'fs/network network/raw 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',
pcmcia => 'fs/cdrom disk/cdrom|raw|pcmcia bus/pcmcia fs/network network/pcmcia|raw',
diff --git a/kernel/update_kernel b/kernel/update_kernel
index 9cea09e7d..b778fd150 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -1,11 +1,17 @@
#!/bin/bash
ALL_KERNELS="all.kernels"
+RPMS=/RPMS
# move stuff to this new "kernel" directory
if [ ! -d all.kernels ]; then
- mv ../all.kernels .
- rm -rf ../all.modules
+ 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() {
@@ -29,7 +35,7 @@ function create_modules() {
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 cdrom hd usb other pcmcia all ka; do
modules_var="${i}_modules"
eval "create_marfile ${i}_modules.mar \$$modules_var"
done
@@ -38,13 +44,23 @@ 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/')
+ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
+
+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,7 +77,6 @@ fi
cd ..
}
-ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
eval `perl modules.pl images`
@@ -70,12 +85,12 @@ if [ "$ARCH" == "i386" ]; then
#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
+elif [ "$ARCH" == "ppc" ]; then
+ cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux .
+elif [ "$ARCH" == "ia64" ]; then
+ cp -f "$KERNEL_BOOT_PATH"/boot/efi/vmlinuz* .
+else
+ cp -f "$KERNEL_BOOT_PATH"/boot/vmlinuz* .
fi
@@ -91,6 +106,7 @@ for i in $ALL_KERNELS/*; do
create_modules ../../$i $kern
else
echo "$kern ($main)"
+ find ../../$i -type f -name "*.o.gz" | xargs gunzip
create_modules ../../$i $kern 2>/dev/null
fi
) || exit 1