summaryrefslogtreecommitdiffstats
path: root/update_kernel
blob: 3782895aaa20b7dcc3b543ed4336086cdb615aba (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash

KERNEL_BOOT_PATH="kernel"

SCSI_DRIVERS=`perl -Iperl-install -e 'use modules; while (($m,$v)=each %modules::drivers) { print "$m.o\n" if $v->{type} eq "scsi" }'`

NETWORK_DRIVERS=`perl -Iperl-install -e 'use modules; while (($m,$v)=each %modules::drivers) { print "$m.o\n" if $v->{type} eq "net" }'`
NETWORK_DRIVERS="$NETWORK_DRIVERS 82596.o 8390.o cs89x0.o dgrs.o lockd.o nfs.o sunrpc.o wavelan.o"


#     3c589_cs.o ibmtr_cs.o nmclan_cs.o pcnet_cs.o smc91c92_cs.o wavelan_cs.o
#     fmvj18x_cs.o netwave_cs.o xirc2ps_cs.o 3c574_cs.o"

PCMCIA_DRIVERS="
     3c574_cs.o 3c575_cb.o 3c589_cs.o aha152x_cs.o apa1480_cb.o cb_enabler.o
     dummy_cs.o epic_cb.o fdomain_cs.o fmvj18x_cs.o 
     ibmtr_cs.o ide_cs.o iflash2+_mtd.o iflash2_mtd.o
     netwave_cs.o nmclan_cs.o
     parport_cs.o pcnet_cs.o qlogic_cs.o
     smc91c92_cs.o sram_mtd.o tulip_cb.o xirc2ps_cs.o
     ftl_cs.o memory_cb.o memory_cs.o serial_cb.o serial_cs.o

     8390.o 
     nfs.o lockd.o sunrpc.o"

#     3c589_cs.o ibmtr_cs.o nmclan_cs.o pcnet_cs.o smc91c92_cs.o wavelan_cs.o
#     fmvj18x_cs.o netwave_cs.o xirc2ps_cs.o 3c574_cs.o"


CD_DRIVERS="aztcd.o cm206.o isp16.o mcdx.o sbpcd.o sonycd535.o cdu31a.o gscd.o mcd.o optcd.o sjcd.o"

BLOCK_DRIVERS="DAC960.o cpqarray.o"

MISCMODULES="lp.o parport_pc.o parport.o loop.o"

FSMODULES="vfat.o fat.o"

NETWORK_MODULES="$MISCMODULES $FSMODULES $NETWORK_DRIVERS"
LOCAL_MODULES="$MISCMODULES $FSMODULES $SCSI_DRIVERS $CD_DRIVERS $BLOCK_DRIVERS isofs.o"
CDROM_MODULES="$MISCMODULES $FSMODULES $SCSI_DRIVERS $CD_DRIVERS isofs.o"
HD_MODULES="$MISCMODULES $FSMODULES $SCSI_DRIVERS $BLOCK_DRIVERS"
PCMCIA_MODULES="$PCMCIA_DRIVERS $MISCMODULES $FSMODULES"
LNX4WIN_MODULES="$FSMODULES loop.o isofs.o $SCSI_DRIVERS"

PCMCIA_INSTALLMODULES="pcmcia_core.o tcic.o ds.o i82365.o"

cp -f "$KERNEL_BOOT_PATH"/boot/vmlinuz* vmlinuz
cp -f "$KERNEL_BOOT_PATH"/boot/System.map* System.map

#set 640x480x16 resolution on boot.
/usr/sbin/rdev -v vmlinuz 785

rm -rf modules ; install -d modules
rm -rf install_pcmcia_modules ; install -d install_pcmcia_modules
install -d lnx4win/initrd/modules
(cd modules ; 
    cp -f `find ../"$KERNEL_BOOT_PATH"/lib/modules/ -name "*.o"` .
    /sbin/depmod -m ../System.map -i -e *.o | grep ': ' | sed 's/\.o//g' > modules.dep
    ls *.o              | ../build_archive modules 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 $LOCAL_MODULES   | cpio --quiet -H crc -o | gzip -9 > local_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
    cp $PCMCIA_INSTALLMODULES ../install_pcmcia_modules/
    cp -f $LNX4WIN_MODULES modules.dep ../lnx4win/initrd/modules
    rm -f $NETWORK_MODULES $CDROM_MODULES $HD_MODULES $PCMCIA_MODULES $PCMCIA_INSTALLMODULES nls_*.o # leave in the directory non-install1 used modules
)

cp -f vmlinuz /export/lnx4win