summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
commit126777bc019a54afb4ec51299f2cf9d2841698aa (patch)
tree97f76e571902ead55ba138f1156a4b4f00b9b779 /kernel
parentf1f67448efc714873378dfeb8279fae68054a90a (diff)
downloaddrakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.zip
re-sync after the big svn loss
Diffstat (limited to 'kernel')
-rw-r--r--kernel/.cvsignore3
-rw-r--r--kernel/Makefile10
-rw-r--r--kernel/list_modules.pm114
-rw-r--r--kernel/modules.pl153
-rwxr-xr-xkernel/strip_modules129
-rwxr-xr-xkernel/update_kernel118
6 files changed, 77 insertions, 450 deletions
diff --git a/kernel/.cvsignore b/kernel/.cvsignore
deleted file mode 100644
index 6ba150ae1..000000000
--- a/kernel/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-modules.description
-all.kernels
-RPMS
diff --git a/kernel/Makefile b/kernel/Makefile
index f601c178f..ea4cc1a54 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -1,13 +1,5 @@
-all: all.kernels
-
-all.kernels: ../mdk-stage1/mar/mar update_kernel list_modules.pm
- ./update_kernel
-
-../mdk-stage1/mar/mar:
- make -C `dirname $@` mar
-
clean:
- rm -rf *~ modules.description all.kernels
+ rm -rf *~
check:
perl modules.pl check > /dev/null
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index c9e930231..a69a17398 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -3,11 +3,11 @@ package list_modules; # $Id$
use MDK::Common;
our @ISA = qw(Exporter);
-our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories kernel_is_26 module_extension);
+our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories);
# the categories have 2 purposes
# - choosing modules to include on stage1's (cf update_kernel and mdk-stage1/pci-resource/update-pci-ids.pl)
-# - performing a load_category or probe_category (modules.pm and many files in perl-install)
+# - performing a load_category or probe_category (detect_devices.pm and many files in perl-install)
our %l = (
################################################################################
@@ -20,23 +20,28 @@ our %l = (
if_(arch() !~ /alpha|sparc/,
qw(3c501 3c503 3c505 3c507 3c509 3c515 3c990 3c990fx),
qw(82596 ac3200 acenic aironet4500_card amd8111e at1700 atp),
- qw(b44 bcm4400 cassini com20020-pci cs89x0 de2104x de600 de620),
- qw(defxx), # most unused
- qw(depca dgrs dmfe e100 e2100 eepro eepro100 eexpress epic100 eth16i),
- qw(ewrk3 fealnx hamachi hp hp-plus hp100),
+ qw(bcm4400 cassini cs89x0 de600 de620),
+ qw(depca dmfe e2100 eepro eexpress eth16i),
+ qw(ewrk3 hp hp-plus hp100),
qw(iph5526), #- fibre channel
- qw(lance natsemi ne ne2k-pci ni5010 ni52 ni65 nvnet),
- qw(pcnet32 plip prism2_plx rcpci rhineget),
- qw(sb1000 sis900 skfp smc-ultra smc9194 starfire),
- qw(tc35815 tlan tulip typhoon uli526x via-rhine),
- qw(wd winbond-840 forcedeth),
+ qw(lance ne ni5010 ni52 ni65 nvnet),
+ qw(prism2_plx rcpci rhineget),
+ qw(sb1000 sc92031 smc-ultra smc9194),
+ qw(tc35815 tlan uli526x),
+ ),
+ if_(arch() !~ /alpha/,
+ qw(b44 com20020-pci de2104x),
+ qw(defxx), # most unused
+ qw(dgrs e100 eepro100 epic100 fealnx hamachi natsemi),
+ qw(ne2k-pci pcnet32 plip sis900 skfp starfire tulip),
+ qw(typhoon via-rhine winbond-840 forcedeth),
qw(sungem sunhme), # drivers for ultrasparc, but compiled in ix86 kernels...
),
qw(3c59x 8139too 8139cp sundance), #rtl8139
],
firewire => [ qw(eth1394 pcilynx) ],
gigabit => [
- qw(bnx2 cxgb dl2k e1000 ixgb myri_sbus ns83820 r8169 s2io sis190 sk98lin skge sky2 spidernet tg3 via-velocity yellowfin),
+ qw(atl1 bnx2 cxgb cxgb3 dl2k e1000 ixgb myri_sbus netxen_nic ns83820 qla3xxx r8169 s2io sis190 sk98lin skge sky2 spidernet tg3 via-velocity yellowfin),
qw(bcm5820 bcm5700), #- encrypted
],
@@ -52,20 +57,23 @@ our %l = (
#- protocol reported are not accurate) so we match network adapters against
#- known drivers :-(
usb => [
- qw(catc CDCEther kaweth pegasus rtl8150 usbnet),
+ qw(catc cdc_ether kaweth pegasus rtl8150 usbnet),
],
wireless => [
- qw(acx100_pci adm8211 airo airo_cs aironet4500_cs aironet_cs),
- qw(at76c503-i3861 at76c503-i3863 at76c503-rfmd at76c503-rfmd-acc at76c505-rfmd at76c505-rfmd2958 at76c505a-rfmd2958),
- qw(ath_pci atmel_cs atmel_pci dyc_ar5),
- qw(hostap_pci hostap_plx ipw2100 ipw2200 ipw3945 madwifi_pci netwave_cs orinoco orinoco_cs orinoco_nortel orinoco_pci orinoco_plx orinoco_tmd),
- qw(prism2_cs prism2_pci prism2_usb prism54 r8180 ray_cs rt2400 rt2500 rt2570 usbvnet_rfmd vt_ar5k wavelan_cs wvlan_cs zd1201),
+ qw(acx-pci acx-usb adm8211 airo airo_cs aironet4500_cs aironet_cs arlan),
+ qw(at76_usb ath_pci atmel_cs atmel_pci bcm43xx com20020_cs dyc_ar5),
+ qw(hostap_cs hostap_pci hostap_plx ipw2100 ipw2200 ipw3945 madwifi_pci netwave_cs orinoco orinoco_cs orinoco_nortel orinoco_pci orinoco_plx orinoco_tmd),
+ qw(ndiswrapper prism2_cs prism2_pci prism2_usb prism54 r8180 ray_cs rt2400 rt2500 rt2570 rt61 rt73 rtusb),
+ qw(spectrum_cs usbvnet_rfmd vt_ar5k wavelan_cs wl3501_cs wvlan_cs zd1201 zd1211rw),
if_(arch() =~ /ppc/, qw(airport)),
],
isdn => [
qw(avmfritz c4 cdc-acm b1pci divas hfc4s8s_l1 hfc_usb hfc4s8s_l1 hisax hisax_st5481 hisax_fcpcipnp hysdn sedlfax t1pci tpam w6692pci),
qw(fcpci fcdsl fcdsl fcdsl2 fcdslsl fcdslslusb fcdslusb fcdslusba fcusb fcusb2 fxusb fxusb_CZ)
],
+ cellular => [
+ qw(nozomi option),
+ ],
modem => [
qw(ltmodem mwave sm56),
],
@@ -73,7 +81,7 @@ our %l = (
qw(slamr slusb snd-ali5451 snd-atiixp-modem snd-intel8x0m snd-via82xx-modem),
],
tokenring => [ qw(3c359 abyss ibmtr lanstreamer olympic proteon skisa smctr tms380tr tmspci) ],
- wan => [ qw(c101 cosa cyclomx cycx_drv dlci farsync hdlc hostess_sv11 n2 pc300 pci200syn sbni sdla sdladrv sealevel syncppp wanxl z85230) ],
+ wan => [ qw(c101 cosa cyclomx cycx_drv dlci dscc4 farsync hdlc hostess_sv11 lmc n2 pc300 pci200syn sbni sdla sdladrv sealevel syncppp wanxl z85230) ],
usb_dsl => [ qw(cxacru eagle-usb speedtch ueagle-atm usbatm xusbatm) ],
},
@@ -82,8 +90,8 @@ our %l = (
{
# ide drivers compiled as modules:
ide => [
- qw(aec62xx cs5520 cs5530 cs5535 delkin_cb ),
- qw(rz1000 sc1200 slc90e66 triflex trm290 ide-generic) ],
+ qw(aec62xx cs5520 cs5530 cs5535 delkin_cb it8213),
+ qw(rz1000 sc1200 slc90e66 tc86c001 triflex trm290 ide-generic) ],
# ide drivers compiled in core kernel:
all_ide => [
qw(ali14xx amd74xx dtc2278 ht6560b qd65xx umc8672 alim15x3 atiixp cmd64x cy82c693),
@@ -98,42 +106,44 @@ our %l = (
qw(AM53C974 BusLogic NCR53c406a a100u2w advansys aha152x aha1542 aha1740),
qw(atp870u dc395x dc395x_trm dmx3191d dtc g_NCR5380 in2000 initio pas16 pci2220i psi240i fdomain),
qw(qla1280 qla2x00 qla2xxx qlogicfas qlogicfc),
- qw(seagate wd7000 sim710 sym53c416 t128 tmscsim u14-34f ultrastor),
+ qw(seagate wd7000 shasta sim710 stex sym53c416 t128 tmscsim u14-34f ultrastor),
qw(eata eata_pio eata_dma nsp32),
),
qw(aic7xxx aic7xxx_old aic79xx pci2000 qlogicfas408 sym53c8xx lpfc lpfcdd), # ncr53c8xx
],
sata => [
# note that ata_piix manage RAID devices on ICH6R
- qw(ahci aic94xx ata_adma ata_piix pata_pdc2027x pdc_adma sata_mv sata_nv sata_promise sata_qstor sata_sil sata_sil24 sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc sx8),
- # new drivers :old ide drivers ported over libata:
- qw(pata_amd pata_mpiix pata_oldpiix pata_opti pata_pdc2027x pata_sil680 pata_triflex pata_via),
+ qw(ahci aic94xx ata_adma ata_piix pata_pdc2027x pdc_adma sata_inic162x sata_mv sata_nv sata_promise sata_qstor sata_sil sata_sil24 sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc sx8),
+ # new drivers: old ide drivers ported over libata:
+ qw(pata_ali pata_amd pata_artop pata_atiixp pata_cmd64x pata_cmd640 pata_cs5520 pata_cs5530 pata_cs5535 pata_cypress),
+ qw(pata_efar pata_hpt366 pata_hpt37x pata_hpt3x2n pata_hpt3x3 pata_isapnp pata_it821x pata_it8172 pata_it8213 pata_jmicron),
+ qw(pata_legacy pata_marvell pata_mpiix pata_netcell pata_ns87410 pata_oldpiix pata_opti pata_optidma),
+ qw(pata_pdc2027x pata_pdc202xx_old pata_platform pata_qdi pata_radisys pata_rz1000),
+ qw(pata_sc1200 pata_serverworks pata_sil680 pata_sis pata_sl82c105 pata_triflex pata_via pata_winbond),
],
hardware_raid => [
if_(arch() =~ /^sparc/, qw(pluto)),
if_(arch() !~ /alpha/ && arch() !~ /sparc/,
# 3w-xxxx drives ATA-RAID, 3w-9xxx and arcmsr drive SATA-RAID
- qw(a320raid),
- qw(3w-9xxx 3w-xxxx aacraid arcmsr cciss cpqfc cpqarray DAC960 dpt_i2o gdth i2o_block ipr it821x it8212),
- qw(iteraid megaraid megaraid_mbox megaraid_sas mptfc mptsas mptscsih qla2100 qla2200 qla2300 qla2322 qla4xxx qla6312 qla6322 pdc-ultra),
+ qw(a320raid megaide),
+ qw(3w-9xxx 3w-xxxx aacraid arcmsr cciss cpqfc cpqarray DAC960 dpt_i2o gdth hptiop i2o_block ipr it821x it8212),
+ qw(iteraid megaraid megaraid_mbox megaraid_sas mptfc mptsas mptspi mptscsih qla2100 qla2200 qla2300 qla2322 qla4xxx qla6312 qla6322 pdc-ultra),
qw(ips ppa imm),
- if_(c::kernel_version =~ /^\Q2.4/,
- qw(ataraid hptraid silraid pdcraid)
- ),
),
],
- pcmcia => [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs) ], #ide_cs
+ pcmcia => [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs pata_pcmcia sym53c500_cs) ],
raw => [ qw(sd_mod) ],
usb => [ qw(usb-storage) ],
firewire => [ qw(sbp2) ],
cdrom => [ qw(ide-cd sr_mod) ],
+ card_reader => [ qw(sdhci tifm_sd tifm_7xx1) ],
},
################################################################################
bus =>
{
- usb => [ qw(usb-uhci usb-ohci ehci-hcd uhci-hcd ohci-hcd) ],
+ usb => [ qw(isp116x-hcd ehci-hcd ohci-hcd uhci-hcd usb-uhci usb-ohci) ],
bluetooth => [ qw(bcm203x bfusb bpa10x hci_usb) ],
firewire => [ qw(ohci1394) ],
i2c => [
@@ -154,7 +164,7 @@ our %l = (
{
network => [ qw(af_packet nfs) ],
cdrom => [ qw(isofs) ],
- loopback => [ qw(isofs loop cryptoloop gzloop), if_($ENV{MOVE}, qw(supermount)) ],
+ loopback => [ qw(isofs loop squashfs), if_($ENV{MOVE}, qw(supermount)) ],
local => [
if_(arch() =~ /^i.86|x86_64/, qw(vfat ntfs)),
if_(arch() =~ /^ppc/, qw(hfs)),
@@ -168,16 +178,16 @@ our %l = (
multimedia =>
{
sound => [
- if_(arch() =~ /ppc/, qw(dmasound_pmac snd-powermac)),
+ if_(arch() =~ /ppc/, qw(dmasound_pmac snd-aoa snd-powermac)),
if_(arch() =~ /sparc/, qw(snd-sun-amd7930 snd-sun-cs4231 snd-sun-dbri)),
if_(arch() !~ /^sparc/,
- qw(ad1816 ad1848 ad1889 ali5455 audigy audio awe_wave cmpci cs4232 cs4281 cs46xx),
+ qw(ad1816 ad1848 ad1889 ali5455 audigy audio awe_wave cmpci cs4232 cs4281 cs46xx cx88-alsa),
qw(emu10k1 es1370 es1371 esssolo1 forte gus i810_audio ice1712 kahlua mad16 maestro),
qw(maestro3 mpu401 msnd_pinnacle nm256_audio nvaudio opl3 opl3sa opl3sa2 pas2 pss),
qw(rme96xx sam9407 sb sgalaxy snd-ad1816a snd-ad1848 snd-ad1889 snd-ali5451 snd-als100 snd-als300),
qw(snd-als4000 snd-atiixp snd-au8810 snd-au8820 snd-au8830 snd-audigyls snd-azt2320 snd-azt3328 snd-azx),
qw(snd-asihpi snd-bt87x snd-ca0106 snd-cmi8330 snd-cmipci snd-cs4231 snd-cs4232 snd-cs4236 snd-cs4281),
- qw(snd-cs46xx snd-cs5535audio snd-darla20 snd-darla24 snd-dt019x snd-emu10k1 snd-emu10k1x snd-ens1370 snd-ens1371 snd-es1688 snd-es18xx),
+ qw(snd-cs46xx snd-cs5535audio snd-darla20 snd-darla24 snd-dt019x snd-echo3g snd-emu10k1 snd-emu10k1x snd-ens1370 snd-ens1371 snd-es1688 snd-es18xx),
qw(snd-es1938 snd-es1968 snd-es968 snd-fm801 snd-gina20 snd-gina24 snd-gina3g snd-gusclassic snd-gusextreme),
qw(snd-gusmax snd-hda-intel snd-hdsp snd-hdspm snd-ice1712 snd-ice1724 snd-indi snd-indigo snd-indigodj snd-indigoio snd-intel8x0 snd-interwave),
qw(snd-interwave-stb snd-korg1212 snd-layla20 snd-layla24 snd-layla3g snd-maestro3 snd-mia snd-mixart snd-mona snd-mpu401 snd-nm256),
@@ -187,14 +197,20 @@ our %l = (
qw(snd-ymfpci sonicvibes sscape trident via82cxxx_audio wavefront ymfpci),
),
],
- tv => [ qw(bt878 bttv cx8800 cx88-blackbird dpc7146 ivtv saa7134 zr36067) ],
- dvb => [ qw(budget budget-av budget-ci cinergyT2 dvb-ttusb-budget dvb-usb-a800 dvb-dibusb dvb-usb-dibusb-mb dvb-ttpci dvb-usb-digitv dvb-usb-dtt200u dvb-usb-nova-t-usb2 dvb-usb-umt-010 dvb-usb-vp7045 hexium_orion hexium_gemini pluto2 skystar2) ],
+ tv => [ qw(bt878 bttv cx8800 cx8802 cx88-blackbird dpc7146 ivtv mxb pvrusb2 saa7134 zr36067) ],
+ dvb => [
+ qw(b2c2-flexcop-pci b2c2-flexcop-usb budget budget-av budget-ci cinergyT2),
+ qw(dvb-dibusb dvb-ttpci dvb-ttusb-budget dvb-usb-a800 dvb-usb-cxusb),
+ qw(dvb-usb-dib0700 dvb-usb-dibusb-mb dvb-usb-dibusb-mc dvb-usb-digitv dvb-usb-dtt200u),
+ qw(dvb-usb-gp8ps dvb-usb-nova-t-usb2 dvb-usb-ttusb2 dvb-usb-umt-010 dvb-usb-vp702x dvb-usb-vp7045),
+ qw(hexium_gemini hexium_orion pluto2 skystar2 ttusb_dec),
+ ],
photo => [ qw(dc2xx mdc800) ],
- radio => [ qw(radio-gemtek-pci radio-maxiradio) ],
+ radio => [ qw(radio-gemtek-pci radio-maestro radio-maxiradio) ],
scanner => [ qw(scanner microtek) ],
gameport => [ qw(cs461x ns558 emu10k1-gp fm801-gp lightning ns558 vortex) ],
- usb_sound => [ qw(audio dabusb dsbr100 snd-usb-audio snd-usb-usx2y usb-midi) ],
- webcam => [ qw(cpia_usb cpia2 cyber2000fb et61x251 ibmcam konicawc mod_quickcam ov511 ov511-alt ov518_decomp ovfx2 pwc quickcam se401 stv680 sn9c102 ultracam usbvideo usbvision vicam w9968cf) ],
+ usb_sound => [ qw(audio dabusb dsbr100 snd-usb-audio snd-usb-caiaq snd-usb-usx2y usb-midi) ],
+ webcam => [ qw(cafe_ccic cpia_usb cpia2 cyber2000fb em28xx et61x251 ibmcam konicawc mod_quickcam ov511 ov511-alt ov518_decomp ovfx2 pwc quickcam quickcam_messenger se401 stv680 sn9c102 ultracam usbvideo usbvision vicam w9968cf zc0301) ],
},
# USB input stuff get automagically loaded by hotplug and thus
@@ -217,12 +233,12 @@ our %l = (
# just here for classification, unused categories (nor auto-detect, nor load_thiskind)
{
raid => [
- qw(dm-crypt dm-mirror dm-mod linear lvm-mod multipath raid0 raid1 raid10 raid5),
+ qw(dm-crypt dm-mirror dm-mod linear lvm-mod multipath raid0 raid1 raid10 raid5 raid6),
],
mouse => [
qw(atixlmouse busmouse generic_serial inport ioc3_serial logibm logibusmouse msbusmouse pcips2 qpmouse synclinkmp),
if_(arch() =~ /ppc/, 'macserial'),
- qw(hid mousedev usbhid usbmouse),
+ qw(mousedev usbhid usbmouse),
],
char => [
if_(arch() =~ /ia64/, qw(efivars)),
@@ -236,14 +252,14 @@ our %l = (
qw(i8k sonypi toshiba),
],
serial => [
- qw(8250_pci 8250 epca esp isicom istallion jsm moxa mxser stallion sx synclink synclinkmp),
+ qw(8250_pci 8250 epca esp isicom istallion jsm moxa mxser mxser_new stallion sx synclink synclinkmp),
],
other => [
qw(defxx i810fb ide-floppy ide-scsi ide-tape loop lp nbd sg st),
qw(parport_pc parport_serial),
- qw(btaudio),
+ qw(btaudio mmc_block),
- arch() =~ /i.86/ ? 'aes-i586' : 'aes',
+ 'cryptoloop', arch() =~ /i.86/ ? 'aes-i586' : 'aes',
if_(arch() =~ /sparc/, 'openprom'),
qw(evdev), qw(usblp printer), 'floppy',
@@ -316,8 +332,4 @@ sub sub_categories {
keys %{$l{$t1}};
}
-sub kernel_is_26 { $_[0] =~ /^2\.6/ }
-
-sub module_extension { kernel_is_26($_[0]) ? 'ko' : 'o' }
-
1;
diff --git a/kernel/modules.pl b/kernel/modules.pl
index d6efbf9f9..baccde635 100644
--- a/kernel/modules.pl
+++ b/kernel/modules.pl
@@ -10,61 +10,6 @@ BEGIN {
use MDK::Common;
use list_modules;
-#- seldom used modules
-#- we don't bother making a special floppy for those
-my %modules_only_for_all_img = (
-
- 'network/main' => [
- qw(acenic),
- qw(aironet4500_card com20020-pci hamachi starfire winbond-840),
-
- if_(arch() =~ /alpha|ppc/, qw(sb1000)),
- qw(iph5526),
-
- qw(ac3200 at1700 atp ni5010 ni52 ni65), #- unused from Jeff
- ],
-
- '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(lpfcdd), #- HUGE!!
-
- qw(dc395x dc395x_trm dmx3191d qla1280 BusLogic fdomain),
- qw(pci2220i eata eata_pio eata_dma),
- 'aic7xxx_old',
- 'dtc',
- ],
- 'disk/sata' => [
- qw(ahci ata_piix sata_nv sata_promise sata_sil sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc sx8),
- ],
-
- 'disk/hardware_raid' => [
- qw(i2o_block qla2200 qla2300 cpqfc DAC960 gdth pdc-ultra mptscsih),
- ],
-);
-
-#- 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),
- ],
-);
-
-my @modules_always_on_stage1 = qw(floppy);
-
sub flatten_and_check {
my ($h) = @_;
@@ -85,52 +30,26 @@ sub flatten_and_check {
} 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 = (
- pcmcia => 'fs/cdrom|loopback disk/cdrom|raw|pcmcia bus/pcmcia',
- cdrom => 'fs/cdrom|loopback disk/cdrom|raw|scsi',
- network => 'bus/usb|usb_keyboard|pcmcia disk/raw|usb',
- network_drivers => 'fs/network|loopback network/main|pcmcia|usb|raw|gigabit',
- ka => 'fs/network network/main|raw|gigabit',
- all => 'fs/cdrom disk/cdrom|raw bus/usb|usb_keyboard disk/usb|scsi fs/loopback|local bus/pcmcia disk/ide|pcmcia|sata|hardware_raid fs/network network/main|pcmcia|usb|raw|gigabit|wireless|tokenring bus/firewire disk/firewire',
-);
+my $images_cat = 'fs/* disk/* bus/* network/* input/* various/*'; #- ie everything except multimedia
my $verbose = $ARGV[0] eq '-v' && shift;
my ($f, @para) = @ARGV;
$::{$f}->(@para);
-sub image2modules {
- my ($image) = @_;
- my $l = $images{$image};
-
- my @modules = if_($image !~ /drivers/, @modules_always_on_stage1);
- push @modules, map { category2modules($_) } split(' ', $l);
-
- @modules = difference2(\@modules, \@modules_removed_from_stage1);
-
- if ($image !~ /all/) {
- @modules = difference2(\@modules, \@modules_only_for_all_img);
- }
-
- @modules;
+sub modules() {
+ map { category2modules($_) } split(' ', $images_cat);
}
sub remove_unneeded_modules {
my ($kern_ver) = @_;
#- need creating a first time the modules.dep for all modules
- #- it will be redone in make_modules_dep when unneeded modules are removed
- make_modules_dep($kern_ver);
+ filter_modules_dep($kern_ver);
load_dependencies("all.kernels/$kern_ver/modules.dep");
- my $ext = module_extension($kern_ver);
-
- my @all = list_modules::all_modules();
+ my @all = modules();
my @all_with_deps = map { dependencies_closure($_) } @all;
- my %wanted_modules = map { ("$_.$ext" => 1) } @all_with_deps;
+ my %wanted_modules = map { ("$_.ko.gz" => 1) } @all_with_deps;
foreach (all("all.kernels/$kern_ver/modules")) {
$wanted_modules{$_} or unlink "all.kernels/$kern_ver/modules/$_";
}
@@ -139,34 +58,15 @@ sub remove_unneeded_modules {
sub make_modules_per_image {
my ($kern_ver) = @_;
- make_modules_dep($kern_ver);
- load_dependencies("all.kernels/$kern_ver/modules.dep");
-
- my $ext = module_extension($kern_ver);
-
- foreach my $image (keys %images) {
- my @modules_with_deps = uniq(map { dependencies_closure($_) } image2modules($image));
- my @l = map { "$_.$ext" } @modules_with_deps;
-
- my $dir = "all.kernels/$kern_ver/modules";
- @l = grep { -e "$dir/$_" } @l;
+ my $dir = "all.kernels/$kern_ver/modules";
- if ($image =~ /all/) {
- system("cd $dir ; tar cf ../${image}_modules.tar @l") == 0 or die "tar failed\n";
- } else {
- my $gi_base_dir = chomp_(`pwd`) . '/..';
- system("cd $dir ; $gi_base_dir/mdk-stage1/mar/mar -c ../${image}_modules.mar @l") == 0 or die "mar failed\n";
- }
- }
+ system("cd $dir ; tar cf ../all_modules.tar *.ko.gz") == 0 or die "tar failed\n";
}
-sub make_modules_dep {
+sub filter_modules_dep {
my ($kern_ver) = @_;
- my @l =
- kernel_is_26($kern_ver) ?
- cat_("all.kernels/$kern_ver/lib/modules/$kern_ver/modules.dep") :
- `/sbin/depmod-24 -F all.kernels/$kern_ver/boot/System.map-$kern_ver -e *.o | perl -pe 's/\\\n//'`;
+ my @l = cat_("all.kernels/$kern_ver/modules.dep");
@l = map {
if (/(\S+):\s+(.*)/) {
@@ -185,26 +85,6 @@ sub make_modules_dep {
output("all.kernels/$kern_ver/modules.dep", map { "$_\n" } @l);
}
-sub make_modules_description {
- my ($kern_ver) = @_;
- my $ext = module_extension($kern_ver);
- my $dir = "all.kernels/$kern_ver/modules";
-
- my @l;
- if (kernel_is_26(`uname -r`)) { #- modinfo behaves differently depending on the build kernel used
- my $name;
- @l = map {
- $name = $1 if m!^filename:\s*(.*)\.$ext!;
- if_($name && /^description:\s*(.*)/, "$name\t$1");
- } `cd $dir ; /sbin/modinfo *.$ext`;
- } else {
- @l = map {
- if_(/(.*?)\.$ext "(.*)"/, "$1\t$2\n");
- } `cd $dir ; /sbin/modinfo-24 -f '%{filename} %{description}\n' *.$ext`;
- }
- output("modules.description", @l);
-}
-
sub get_main_modules() {
my $base = dirname($0);
my $main = chomp_(cat_("$base/RPMS/.main"));
@@ -213,15 +93,8 @@ sub get_main_modules() {
sub pci_modules4stage1 {
my ($category) = @_;
- my @list = map { s/\.k?o.*$//; $_ } get_main_modules();
- my %listed;
- @listed{@list} = ();
- #- keep 2.4 compatibility aliases (to sync with get_name_kernel_26_transition() from mdk-stage1/modules.c)
- @listed{qw(usb-ohci usb-uhci uhci bcm4400 3c559 3c90x dc395x_trm)} = ();
- my @modules = difference2([ category2modules($category) ], \@modules_removed_from_stage1);
- my ($kept, $rejected) = partition { exists $listed{$_} } @modules;
- print STDERR "REJECTED @$rejected\n" if $verbose && @$rejected;
- print "$_\n" foreach uniq(map { dependencies_closure($_) } @$kept);
+ my @modules = difference2([ category2modules($category) ]);
+ print "$_\n" foreach uniq(map { dependencies_closure($_) } @modules);
}
sub check() {
@@ -245,7 +118,7 @@ sub check() {
my ($mod) = m|([^/]*)\.k?o(\.gz)?$| or next;
delete $deprecated_modules{$mod};
next if $listed{$mod};
- s|.*?mdk(BOOT)?/||;
+ s|.*?mdk/||;
s|kernel/||; s|drivers/||; s|3rdparty/||;
$_ = dirname $_;
$_ = dirname $_ if $mod eq basename($_);
diff --git a/kernel/strip_modules b/kernel/strip_modules
deleted file mode 100755
index cd4077a66..000000000
--- a/kernel/strip_modules
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/sh
-#
-# Given a list of objects, strip all static symbols except those
-# required by insmod.
-#
-# Copyright Keith Owens <kaos@ocs.com.au>. GPL.
-# Sat Feb 1 12:52:17 EST 1997
-#
-# Mainly intended for reducing the size of modules to save space
-# on emergency and install disks. Be aware that removing the
-# static symbols reduces the amount of diagnostic information
-# available for oops. Not recommended for normal module usage.
-#
-# This code requires the modules use MODULE_PARM and EXPORT_.
-# Do not strip modules that have not been converted to use
-# MODULE_PARM or are using the old method of exporting symbols.
-# In particular do not use on modules prior to 2.1.20 (approx).
-#
-# The objects are stripped in /tmp, only if the strip works is
-# the original overwritten. If the command line to strip the
-# symbols becomes too long, the strip is done in multiple passes.
-# Running strip_module twice on the same object is safe (and a
-# waste of time).
-#
-
-sizeofptr="/tmp/$$.sizeofptr"
-echo 'int main() { return sizeof(void *); }' | gcc -xc - -o $sizeofptr
-$sizeofptr
-export SIZEOF_POINTER=$?
-rm -f $sizeofptr
-
-cat > /tmp/$$.awk <<\EOF
-BEGIN {
- strip = "/usr/bin/objcopy";
- nm = "/usr/bin/nm";
- cp = "/bin/cp";
- mv = "/bin/mv";
- rm = "/bin/rm";
- tmp = "/tmp";
- command_size = 400; # arbitrary but safe
-
- getline < "/proc/self/stat";
- pid = $1;
- tmpcopy = tmp "/" pid ".object";
- nmout = tmp "/" pid ".nmout";
-
- for (i = 1; i < ARGC; ++i)
- strip_module(ARGV[i]);
-
- do_command(rm " -f " tmpcopy " " nmout);
-
- exit(0);
-}
-
-function strip_module(object,
- keep_symbol, to_strip, symbol, command, changed) {
- do_command(cp " -a " object " " tmpcopy);
- do_command(nm " " tmpcopy " > " nmout);
- # delete array_name sometimes breaks, internal error, play safe
- for (symbol in keep_symbol)
- delete keep_symbol[symbol];
- for (symbol in to_strip)
- delete to_strip[symbol];
- new_module_format = 0;
- ptrskip = 2 + 2 * ENVIRON["SIZEOF_POINTER"];
- while ((getline < nmout) > 0) {
- $0 = substr($0, ptrskip);
- # b static variable, uninitialised
- # d static variable, initialised
- # r static array, initialised
- # t static label/procedures
- if ($1 ~ /[bdrt]/)
- to_strip[$2] = "";
- else if ($2 ~ /R __ksymtab_/)
- keep_symbol[substr($2, 11)] = "";
- else if ($0 ~ /R __module_parm_/)
- keep_symbol[substr($2, 15)] = "";
- else if ($0 ~ /D __parm_/)
- keep_symbol[substr($2, 8)] = "";
- else if ($3 ~ /__ksymtab/) {
- keep_symbol[$5] = "";
- }
- else if ($1 != "?")
- keep_symbol[$2] = "";
- if ($2 ~ /__module/)
- new_module_format = 1;
- }
- close(nmout);
- command = "";
- changed = 0;
- failure = 0;
- if (new_module_format) {
- for (symbol in to_strip) {
- if (!(symbol in keep_symbol)) {
- changed = 1;
- if (length(command) > command_size) {
- failure = failure || do_command(strip command " " tmpcopy);
- command = "";
- }
- command = command " --strip-symbol=" symbol;
- }
- }
- }
- if (command != "") {
- changed = 1;
- failure = failure || do_command(strip command " " tmpcopy);
- }
- if (changed && !failure)
- do_command(mv " " tmpcopy " " object);
-}
-
-function do_command(command) {
- if ((ret = system(command)) != 0) {
- giveup("command \"" command "\" failed " ret, ret);
- return 1;
- }
- return 0;
-}
-
-function giveup(message, ret) {
- print "strip_module: " message > "/dev/stderr";
-# exit(ret);
-}
-EOF
-
-awk -f /tmp/$$.awk "$@"
-ret=$?
-rm -f /tmp/$$.awk
-exit $ret
diff --git a/kernel/update_kernel b/kernel/update_kernel
deleted file mode 100755
index a32878339..000000000
--- a/kernel/update_kernel
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/perl
-
-# this script takes kernels rpms from RPMS/ and create various files in all_kernels/
-# for each rpms in RPMS, it does:
-# RPMS/kernel-VER-*.rpm ->
-# all.kernels/VER/all_modules.tar (used for all.rdz)
-# all.kernels/VER/*.mar (used for other rdz)
-# all.kernels/VER/modules.cz (used for stage2)
-# all.kernels/VER/modules.dep
-# all.kernels/VER/vmlinuz
-#
-# if RPMS is empty, this script tries to find kernels in $main_repository
-
-use MDK::Common;
-use list_modules;
-
-my $main_repository = '/export/media/main';
-my $rpm = 'rpm --nosignature';
-
-
-my $MOVE = $ARGV[0] eq '--move' && shift;
-
-@ARGV <= 1 or die "usage: ./update_kernel [--move] [<kernel rpm>]\n";
-
-eval { rm_rf('all.kernels') }; #- remove old things
-mkdir 'all.kernels';
-
-my $main = chomp_(cat_('RPMS/.main'));
-my $main_BOOT = chomp_(cat_('RPMS/.main-BOOT'));
-
-if (@ARGV) {
- install_kernel($ARGV[0]);
-} elsif (! -d 'RPMS') {
- update_kernel_from_repository($main_repository, '2.6', 0);
- update_kernel_from_repository($main_repository, '2.6', 1);
- install_kernel(glob("$main_repository/kernel-xbox*"), 1) if arch() =~ /i.86/;
-}
-
-extract_kernel($_) foreach glob("RPMS/*.rpm");
-
-sub system_verbose { print join(' ', @_), "\n"; system(@_) }
-sub sys { &system_verbose; $? and die }
-
-sub rpm2version {
- my ($kernel_rpm) = @_;
- `$rpm -qpl $kernel_rpm` =~ m!/boot/vmlinuz-(.*)! && $1 or die "can't find vmlinuz in $kernel_rpm\n";
-}
-
-sub update_kernel_from_repository {
- my ($repository, $main_ver, $is_BOOT) = @_;
- my $rpm_wildcard = 'kernel-' . ($is_BOOT ? 'BOOT-' : (arch() =~ /i.86/ ? 'i586-up-1GB-' : '')) . $main_ver . '*.rpm';
- my @kernels = glob("$repository/$rpm_wildcard");
-
- install_kernel($_, 1) foreach @kernels;
-}
-
-sub install_kernel {
- my ($kernel_rpm) = @_;
- my $basename = basename($kernel_rpm);
- warn "Installing rpm $basename in RPMS\n";
- mkdir 'RPMS';
- cp_af($kernel_rpm, "RPMS/$basename");
-
- if (!$main) {
- $main = rpm2version($kernel_rpm);
- output('RPMS/.main', "$main\n");
- }
- if (!$main_BOOT && $kernel_rpm =~ /BOOT/) {
- $main_BOOT = rpm2version($kernel_rpm);
- output('RPMS/.main-BOOT', "$main_BOOT\n");
- }
-}
-
-sub extract_kernel {
- my ($kernel_rpm) = @_;
-
- my $kern_ver = rpm2version($kernel_rpm);
- my $dir = "all.kernels/$kern_ver";
-
- warn "Extracting kernel $kern_ver\n";
-
- eval { rm_rf($dir) };
- mkdir_p("$dir/modules");
- sys("rpm2cpio $kernel_rpm | (cd $dir ; cpio -id)");
-
- rename "$dir/boot/vmlinuz-$kern_ver", "$dir/vmlinuz" or die "can't find vmlinuz\n";
-
- sys("find $dir -name '*.gz' | xargs gunzip");
-
- my $ext = module_extension($kern_ver);
-
- open(my $F, "find $dir -name '*.$ext' |");
- my $file; while ($file = <$F>) {
- chomp($file);
- rename $file, "$dir/modules/" . basename($file) or warn "conflict for $file\n";
- }
-
- if (kernel_is_26($kern_ver)) {
- warn "no stripping on 2.6 since it breaks modules\n";
- } else {
- print STDERR "stripping $kern_ver: ";
- sys("./strip_modules $dir/modules/*.$ext");
- print STDERR "done\n";
- }
-
- sys('perl', 'modules.pl', 'remove_unneeded_modules', $kern_ver) if $kern_ver !~ /BOOT/;
-
- sys('perl', 'modules.pl', 'make_modules_per_image', $kern_ver);
- sys('perl', 'modules.pl', 'make_modules_description', $kern_ver) if $kern_ver eq $main;
-
- if (!$MOVE) {
- print STDERR "packdrake $kern_ver: ";
- sys("cd $dir/modules ; ls *.$ext | packdrake -b9s ../modules.cz 400000");
- print STDERR "done\n";
- }
-
- eval { rm_rf("$dir$_") } foreach qw(/boot /lib /usr /modules);
-}