blob: ef122316ed7210cc3c772b9df6dcb03d43bd1ee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/bash
KERNEL_BOOT_PATH="kernel"
function f() {
v=`perl -Iperl-install -Mmodules -e "print qq(\\$_.o\n) foreach modules::module_of_type__4update_kernel(\"$1\")"`
}
ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
f "scsi disk" ; SCSI_DRIVERS=$v
f "net network" ; NETWORK_DRIVERS=$v
f "scsi cdrom" ; CD_DRIVERS=$v
f "pcmcia network" ; PCMCIA_DRIVERS=$v
[ $ARCH == "i386" ] && FSMODULES="vfat.o fat.o"
NETWORK_MODULES="$FSMODULES $NETWORK_DRIVERS"
CDROM_MODULES=" $FSMODULES $CD_DRIVERS"
HD_MODULES=" $FSMODULES $SCSI_DRIVERS loop.o isofs.o"
PCMCIA_MODULES=" $FSMODULES $PCMCIA_DRIVERS af_packet.o isofs.o scsi_mod.o sr_mod.o sd_mod.o cdrom.o ide-cd.o ide-mod.o ide-probe.o ide-disk.o serial.o"
NOT_USEFULL_IN_STAGE1="nls_*.o parport_probe.o raid*.o serial.o smbfs.o usb-*.o"
PCMCIA_INSTALLMODULES="pcmcia_core.o tcic.o ds.o i82365.o"
if [ "$ARCH" == "i386" ]; then
#disable any existing resolution!!!
cp -f $KERNEL_BOOT_PATH/boot/vmlinuz* vmlinuz
/usr/sbin/rdev -v vmlinuz 65535 #788 #785
rm -rf install_pcmcia_modules ; install -d install_pcmcia_modules
else
cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz .
fi
cp -f $KERNEL_BOOT_PATH/boot/System.map* System.map
rm -rf modules ; install -d modules
(cd modules ;
cp -f `find ../"$KERNEL_BOOT_PATH"/lib/modules/ -name "*.o"` .
/sbin/depmod -m ../System.map -i -e *.o | perl -pe 's/\\\n//' | perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
ls *.o | packdrake -b9s modules.cz 400000
ls *.o | cpio --quiet -H crc -o | bzip2 -9> modules.cpio.bz2
ls $NETWORK_MODULES | cpio --quiet -H crc -o | gzip -9 > network_modules.cgz
ls $CDROM_MODULES | cpio --quiet -H crc -o | gzip -9 > cdrom_modules.cgz
ls $HD_MODULES | cpio --quiet -H crc -o | gzip -9 > hd_modules.cgz
ls $PCMCIA_MODULES | cpio --quiet -H crc -o | gzip -9 > pcmcia_modules.cgz
[ "$ARCH" == "i386" ] && {
cp $PCMCIA_INSTALLMODULES ../install_pcmcia_modules/
}
rm -f $NETWORK_MODULES $CDROM_MODULES $HD_MODULES $PCMCIA_MODULES $PCMCIA_INSTALLMODULES $NOT_USEFULL_IN_STAGE1 # leave in the directory non-install1 used modules
)
|