1 |
package list_modules; # $Id: list_modules.pm 268192 2010-05-04 09:37:32Z pterjan $ |
2 |
|
3 |
use MDK::Common; |
4 |
|
5 |
our @ISA = qw(Exporter); |
6 |
our @EXPORT = qw(load_dependencies dependencies_closure category2modules module2category sub_categories); |
7 |
|
8 |
# the categories have 2 purposes |
9 |
# - choosing modules to include on stage1's (cf update_kernel and mdk-stage1/pci-resource/update-pci-ids.pl) |
10 |
# - performing a load_category or probe_category (detect_devices.pm and many files in perl-install) |
11 |
|
12 |
our %l = ( |
13 |
################################################################################ |
14 |
network => |
15 |
{ |
16 |
atm => [ qw(ambassador eni firestream fore_200e he horizon idt77252 iphase lanai nicstar solos-pci zatm) ], |
17 |
main => [ |
18 |
if_(arch() =~ /ppc/, qw(bmac fec_mpc52xx ibm_emac mace oaknet sungem)), |
19 |
if_(arch() =~ /^sparc/, qw(sunbmac sunhme sunqe)), |
20 |
if_(arch() !~ /alpha|sparc/, |
21 |
qw(3c501 3c503 3c505 3c507 3c509 3c515 3c990 3c990fx), |
22 |
qw(82596 ac3200 acenic aironet4500_card amd8111e at1700 atl2 atp), |
23 |
qw(bcm4400 cassini cs89x0 cx82310_eth de600 de620), |
24 |
qw(depca dmfe e2100 eepro eexpress enic eth16i), |
25 |
qw(ewrk3 hp hp-plus hp100), |
26 |
qw(iph5526), #- fibre channel |
27 |
qw(jme lance ne ni5010 ni52 ni65 nvnet), |
28 |
qw(prism2_plx qlge r6040 rcpci rhineget), |
29 |
qw(sb1000 sc92031 smc-ultra smc9194 smsc9420 smsc95xx), |
30 |
qw(tc35815 tlan uli526x vmxnet3), |
31 |
), |
32 |
if_(arch() !~ /alpha/, |
33 |
qw(b44 com20020-pci de2104x), |
34 |
qw(defxx), # most unused |
35 |
qw(dgrs e100 eepro100 epic100 fealnx hamachi natsemi), |
36 |
qw(ne2k-pci pcnet32 plip sis900 skfp starfire tulip), |
37 |
qw(typhoon via-rhine winbond-840 forcedeth), |
38 |
qw(sungem sunhme), # drivers for ultrasparc, but compiled in ix86 kernels... |
39 |
), |
40 |
qw(3c59x 8139too 8139cp cpmac niu sundance), #rtl8139 |
41 |
# add all phys |
42 |
qw(amd at803x bcm87xx broadcom cicada davicom et1011c icplus lxt marvell micrel), |
43 |
qw(national qsemi realtek smsc ste10Xp vitesse), |
44 |
], |
45 |
firewire => [ qw(eth1394 pcilynx) ], |
46 |
gigabit => [ |
47 |
qw(alx atl1 atl1c atl1e at91_ether be2net bna bnx2 bnx2x cxgb cxgb3 cxgb4 dl2k e1000 e1000e et131x igb ipg ixgb ixgbe), |
48 |
qw(macb mvmdio myri_sbus myri10ge netxen_nic ns83820 pch_gbe qla3xxx r8169 s2io sfc sxg_nic), |
49 |
qw(sis190 sk98lin skge sky2 slicoss spidernet stmmac tehuti tg3 via-velocity vxge yellowfin), |
50 |
qw(bcm5820 bcm5700), #- encrypted |
51 |
], |
52 |
|
53 |
raw => [ |
54 |
qw(ppp_generic ppp_async ppp_deflate bsd_comp), |
55 |
], |
56 |
pcmcia => [ |
57 |
qw(3c574_cs 3c589_cs axnet_cs fmvj18x_cs), |
58 |
qw(ibmtr_cs libertas_cs nmclan_cs pcnet_cs smc91c92_cs), |
59 |
qw(xirc2ps_cs xircom_cb xircom_tulip_cb), |
60 |
], |
61 |
#- generic NIC detection for USB seems broken (class, subclass, |
62 |
#- protocol reported are not accurate) so we match network adapters against |
63 |
#- known drivers :-( |
64 |
usb => [ |
65 |
qw(asix catc cdc_ether cdc_mbim dm9601 kaweth mcs7830 pegasus rtl8150 smsc75xx smsc95xx usbnet), |
66 |
], |
67 |
wireless => [ |
68 |
qw(acx-pci acx-usb adm8211 agnx airo airo_cs aironet4500_cs), |
69 |
qw(aironet_cs ar5523 ar9170usb arlan arusb_lnx at76c50x_usb ath5k ath6kl ath6kl_usb ath9k ath9k_htc), |
70 |
qw(ath_pci atmel_cs atmel_pci b43 b43legacy bcm43xx bcm_wimax brcm80211 brcmsmac brcmfmac carl9170 com20020_cs), |
71 |
qw(dyc_ar5 hostap_cs hostap_pci hostap_plx i2400m_usb ipw2100), |
72 |
qw(ipw2200 ipw3945 iwl3945 iwl4965 iwlagn iwldvm iwlwifi madwifi_pci), |
73 |
qw(mwifiex_usb mwl8k ndiswrapper netwave_cs orinoco orinoco_cs), |
74 |
qw(orinoco_nortel orinoco_pci orinoco_plx orinoco_tmd orinoco_usb p54pci), |
75 |
qw(p54usb prism2_cs prism2_pci prism2_usb prism54 qmi_wwan r8180), |
76 |
qw(r8187se r8192_pci r8192s_usb r8192u_usb r8712u rtl8723ae ray_cs rndis_wlan rt2400 rt2400pci rt2500), |
77 |
qw(rt2500pci rt2500usb rt2570 rt2800pci rt2800usb rt2860 rt2860sta rt2870), |
78 |
qw(rt3070sta rt61 rt61pci rt73 rt73usb rtl8180 rtl8187 rtl8187se rtusb ), |
79 |
qw(rtl8192se rtl8192cu rtl8192de spectrum_cs usb8xxx usbvnet_rfmd vt6655_stage vt6656_stage vt_ar5k w35und), |
80 |
qw(wavelan_cs wl wl3501_cs wvlan_cs zd1201 zd1211rw), |
81 |
if_(arch() =~ /ppc/, qw(airport)), |
82 |
], |
83 |
isdn => [ |
84 |
qw(avmfritz c4 cdc-acm b1pci divas hfc4s8s_l1 hfc_usb hfc4s8s_l1 hisax hisax_st5481 hisax_fcpcipnp hysdn sedlfax t1pci tpam w6692pci), |
85 |
qw(avmfritz hfcpci hfcmulti hfcsusb mISDNinfineon netjet), # mISDN |
86 |
qw(fcpci fcdsl fcdsl fcdsl2 fcdslsl fcdslslusb fcdslusb fcdslusba fcusb fcusb2 fxusb fxusb_CZ) |
87 |
], |
88 |
cellular => [ |
89 |
qw(hso nozomi option sierra), |
90 |
], |
91 |
modem => [ |
92 |
qw(ltmodem mwave sm56 ft1000), |
93 |
], |
94 |
slmodem => [ |
95 |
qw(slamr slusb snd-ali5451 snd-atiixp-modem snd-intel8x0m snd-via82xx-modem), |
96 |
], |
97 |
wan => [ qw(c101 cosa cyclomx cycx_drv dlci dscc4 farsync hdlc hostess_sv11 lapbether lmc n2 pc300 pci200syn sbni sdla sdladrv sealevel syncppp wanxl z85230) ], |
98 |
usb_dsl => [ qw(cxacru speedtch ueagle-atm usbatm xusbatm) ], |
99 |
virtual => [ qw(virtio_net xen-netfront) ], |
100 |
}, |
101 |
|
102 |
################################################################################ |
103 |
disk => |
104 |
{ |
105 |
# ide drivers compiled as modules: |
106 |
ide => [ |
107 |
qw(aec62xx ali14xx alim15x3 amd74xx atiixp cmd64x cy82c693 cs5520 cs5530 cs5535 cs5536), |
108 |
qw(delkin_cb dtc2278 hpt34x hpt366 ns87415 ht6560b it8172 it8213 it821x jmicron), |
109 |
qw(opti621 pdc202xx_new pdc202xx_old piix qd65xx rz1000 sc1200 serverworks siimage sis5513 slc90e66), |
110 |
qw(tc86c001 triflex trm290 tx4938ide tx4939ide umc8672 via82cxxx ide-pci-generic ide-generic), |
111 |
], |
112 |
scsi => [ |
113 |
if_(arch() =~ /ppc/, qw(mesh mac53c94)), |
114 |
if_(arch() =~ /^sparc/, qw(qlogicpti)), |
115 |
if_(arch() !~ /alpha|sparc/, |
116 |
'53c7,8xx', |
117 |
qw(a100u2w advansys aha152x aha1542 aha1740 AM53C974 atp870u), |
118 |
qw(be2iscsi bfa BusLogic dc395x dc395x_trm dmx3191d dtc eata eata_dma), |
119 |
qw(eata_pio fdomain g_NCR5380 in2000 initio mpt2sas mpt3sas mvsas NCR53c406a), |
120 |
qw(nsp32 pas16 pci2220i pm8001 psi240i qla1280 qla2x00 qla2xxx), |
121 |
qw(qlogicfas qlogicfc seagate shasta sim710 stex sym53c416), |
122 |
qw(t128 tmscsim u14-34f ultrastor vmw_pvscsi wd7000), |
123 |
), |
124 |
qw(aic7xxx aic7xxx_old aic79xx pci2000 qlogicfas408 sym53c8xx lpfc lpfcdd), # ncr53c8xx |
125 |
], |
126 |
sata => [ |
127 |
# note that ata_piix manage RAID devices on ICH6R |
128 |
qw(ahci aic94xx ata_adma ata_piix pata_pdc2027x pdc_adma), |
129 |
qw(sata_fsl sata_inic162x sata_mv sata_nv sata_promise), |
130 |
qw(sata_qstor sata_sil sata_sil24 sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc sx8), |
131 |
# new drivers: old ide drivers ported over libata: |
132 |
qw(ata_generic mv-ahci pata_ali pata_amd pata_artop pata_atiixp pata_atp867x), |
133 |
qw(pata_bf54x pata_cmd640 pata_cmd64x pata_cs5520 pata_cs5530), |
134 |
qw(pata_cs5535 pata_cs5536 pata_cypress pata_efar pata_hpt366), |
135 |
qw(pata_hpt37x pata_hpt3x2n pata_hpt3x3 pata_isapnp pata_it8172), |
136 |
qw(pata_it8213 pata_it821x pata_jmicron pata_legacy pata_marvell), |
137 |
qw(pata_mpiix pata_netcell pata_ninja32 pata_ns87410), |
138 |
qw(pata_ns87415 pata_oldpiix pata_opti pata_optidma), |
139 |
qw(pata_pdc2027x pata_pdc202xx_old pata_piccolo pata_platform pata_qdi), |
140 |
qw(pata_radisys pata_rdc pata_rz1000 pata_sc1200 pata_sch), |
141 |
qw(pata_serverworks pata_sil680 pata_sis pata_sl82c105), |
142 |
qw(pata_triflex pata_via pata_winbond), |
143 |
if_(arch() =~ /ppc/, 'sata_fsl'), |
144 |
qw(pata_acpi), |
145 |
], |
146 |
hardware_raid => [ |
147 |
if_(arch() =~ /^sparc/, qw(pluto)), |
148 |
if_(arch() !~ /alpha|sparc/, |
149 |
# 3w-xxxx drives ATA-RAID, 3w-9xxx and arcmsr drive SATA-RAID |
150 |
qw(3w-9xxx 3w-sas 3w-xxxx a320raid aacraid arcmsr cciss cpqarray), |
151 |
qw(cpqfc csiostor DAC960 dpt_i2o gdth hpsa hptiop i2o_block imm ipr ips isci), |
152 |
qw(it8212 it821x iteraid megaide megaraid megaraid_mbox), |
153 |
qw(megaraid_sas mptfc mptsas mptscsih mptspi pdc-ultra pmcraid ppa), |
154 |
qw(qla2100 qla2200 qla2300 qla2322 qla4xxx qla6312 qla6322), |
155 |
), |
156 |
], |
157 |
virtual => [ qw(hv_storvsc virtio_blk virtio_scsi xenblk xen-blkfront) ], |
158 |
pcmcia => [ qw(aha152x_cs fdomain_cs nsp_cs qlogic_cs ide-cs pata_pcmcia sym53c500_cs) ], |
159 |
raw => [ qw(ide-gd_mod sd_mod) ], |
160 |
usb => [ qw(keucr uas ums-alauda ums-cypress ums-datafab ums-eneub6250 ums-freecom ums-isd200), |
161 |
qw(ums-jumpshot ums-karma ums-onetouch ums-realtek ums-sddr09 ums-sddr55 ums-usbat usb-storage) ], |
162 |
firewire => [ qw(sbp2) ], |
163 |
cdrom => [ qw(ide-cd_mod sr_mod) ], |
164 |
card_reader => [ qw(sdhci sdhci-pci tifm_sd tifm_7xx1) ], |
165 |
}, |
166 |
|
167 |
################################################################################ |
168 |
|
169 |
bus => |
170 |
{ |
171 |
usb => [ qw(bcma-hcd c67x00 ehci-hcd ehci-pci ehci-platform fhci hwa-hc |
172 |
imx21-hcd isp116x-hcd isp1362-hcd isp1760 ohci-hcd oxu210hp-hcd |
173 |
r8a66597-hcd renesas-usbhs sl811_cs sl811-hcd ssb-hcd u132-hcd |
174 |
uhci-hcd usb-ohci usb-uhci whci-hcd xhci-hcd) ], |
175 |
bluetooth => [ qw(ath3k bcm203x bfusb bluecard_cs bpa10x bt3c_cs btusb dtl1_cs) ], |
176 |
firewire => [ qw(ohci1394) ], |
177 |
i2c => [ |
178 |
qw(i2c-ali1535 i2c-ali1563 i2c-ali15x3 i2c-amd756 i2c-amd8111 i2c-i801 i2c-i810 i2c-nforce2), |
179 |
qw(i2c-piix4 i2c-prosavage i2c-savage4 i2c-sis5595 i2c-sis630 i2c-sis96x i2c-via i2c-viapro i2c-voodoo3), |
180 |
if_(arch() !~ /^ppc/, qw(i2c-hydra i2c-ibm_iic i2c-mpc)), |
181 |
], |
182 |
pcmcia => [ |
183 |
if_(arch() !~ /^sparc/, qw(au1x00_ss i82365 i82092 pd6729 tcic vrc4171_card vrc4173_cardu yenta_socket)), # cb_enabler |
184 |
], |
185 |
hid => [ qw(ff-memless hid hid-a4tech hid-apple hid-aureal hid-axff hid-belkin |
186 |
hid-cherry hid-chicony hid-cypress hid-dr hid-drff hid-elecom hid-emsff |
187 |
hid-ezkey hid-gaff hid-generic hid-gyration hid-holtek-kbd hid-holtekff |
188 |
hid-hyperv hid-icade hid-kensington hid-keytouch hid-kye hid-lcpower hid-lenovo-tpkbd |
189 |
hid-logitech hid-logitech-dj hid-magicmouse hid-microsoft hid-monterey |
190 |
hid-multilaser hid-multitouch hid-ntrig hid-ortek hid-petalynx hid-picolcd |
191 |
hid-pl hid-primax hid-prodikeys hid-roccat hid-roccat-arvo hid-roccat-common |
192 |
hid-roccat-isku hid-roccat-kone hid-roccat-koneplus hid-roccat-kovaplus hid-roccat-lua |
193 |
hid-roccat-pyra hid-roccat-savu hid-saitek hid-samsung hid-sensor-hub hid-sjoy hid-sony |
194 |
hid-speedlink hid-sunplus hid-tivo hid-tmff hid-topseed hid-twinhan |
195 |
hid-uclogic hid-wacom hid-waltop hid-wiimote hid-zpff hid-zydacron) ], |
196 |
|
197 |
#serial_cs |
198 |
#ftl_cs 3c575_cb apa1480_cb epic_cb serial_cb tulip_cb iflash2+_mtd iflash2_mtd |
199 |
#cb_enabler |
200 |
}, |
201 |
|
202 |
fs => |
203 |
{ |
204 |
network => [ qw(af_packet nfs nfsv2 nfsv3 nfsv4 smbfs) ], |
205 |
cdrom => [ qw(isofs) ], |
206 |
loopback => [ qw(isofs loop squashfs) ], |
207 |
local => [ |
208 |
if_(arch() =~ /^ppc/, qw(hfs)), |
209 |
qw(btrfs ext3 ext4 jfs nilfs2 ntfs reiserfs vfat xfs), |
210 |
], |
211 |
various => [ qw(overlayfs romfs ufs fuse) ], |
212 |
|
213 |
}, |
214 |
|
215 |
################################################################################ |
216 |
multimedia => |
217 |
{ |
218 |
sound => [ |
219 |
if_(arch() =~ /ppc/, qw(dmasound_pmac snd-aoa snd-powermac)), |
220 |
if_(arch() =~ /sparc/, qw(snd-sun-amd7930 snd-sun-cs4231 snd-sun-dbri)), |
221 |
if_(arch() !~ /^sparc/, |
222 |
qw(ad1816 ad1848 ad1889 ali5455 audigy audio awe_wave cmpci cs4232 cs4281 cs46xx cx88-alsa), |
223 |
qw(emu10k1 es1370 es1371 esssolo1 forte gus i810_audio ice1712 kahlua mad16 maestro), |
224 |
qw(maestro3 mpu401 msnd_pinnacle nm256_audio nvaudio opl3 opl3sa opl3sa2 pas2 pss), |
225 |
qw(rme96xx sam9407 sb sgalaxy snd-ad1816a snd-ad1848 snd-ad1889 snd-ali5451 snd-als100 snd-als300), |
226 |
qw(snd-als4000 snd-atiixp snd-au8810 snd-au8820 snd-au8830 snd-audigyls snd-aw2 snd-azt2316 snd-azt2320 snd-azt3328 snd-azx), |
227 |
qw(snd-asihpi snd-at73c213 snd-bt87x snd-ca0106 snd-cmi8330 snd-cmi8788 snd-cmipci), |
228 |
qw(snd-cs4231 snd-cs4232 snd-cs4236 snd-cs4281 snd-cs46xx snd-cs5530 snd-cs5535audio), |
229 |
qw(snd_ctxfi), |
230 |
qw(snd-darla20 snd-darla24 snd-dt019x snd-echo3g snd-emu10k1 snd-emu10k1x), |
231 |
qw(snd-ens1370 snd-ens1371 snd-es1688 snd-es18xx snd-es1938 snd-es1968 snd-es968), |
232 |
qw(snd-fm801 snd-gina20 snd-gina24 snd-gina3g), |
233 |
qw(snd-gusclassic snd-gusextreme snd-gusmax), |
234 |
qw(snd-hda-intel snd-hdsp snd-hdspm snd-ice1712 snd-ice1724), |
235 |
qw(snd-indi snd-indigo snd-indigodj snd-indigodjx snd-indigoio snd-indigoiox snd-intel8x0 snd-interwave), |
236 |
qw(snd-interwave-stb snd-korg1212 snd-layla20 snd-layla24 snd-layla3g snd-lola snd-lx6464es), |
237 |
qw(snd-maestro3 snd-mia snd-mixart snd-mona snd-mpu401 snd-nm256), |
238 |
qw(snd-opl3sa2 snd-opti92x-ad1848 snd-opti92x-cs4231 snd-opti93x snd-oxygen snd-pcsp snd-pcxhr snd-riptide snd-rme32), |
239 |
qw(snd-rme96 snd-rme9652 snd-sb16 snd-sb8 snd-sbawe snd-sc6000 snd-sgalaxy snd-sis7019 snd-sonicvibes), |
240 |
qw(snd-sscape snd-trident snd-via82xx snd-virtuoso snd-vx222 snd-vxp440 snd-vxpocket snd-wavefront), |
241 |
qw(snd-ymfpci sonicvibes sscape trident via82cxxx_audio wavefront ymfpci), |
242 |
), |
243 |
], |
244 |
tv => [ qw(bt878 bttv cx23885 cx25821 cx8800 cx8802 cx88-blackbird dpc7146), |
245 |
qw(ivtv mxb pvrusb2 saa7134 saa7164 zr36067) ], |
246 |
dvb => [ |
247 |
qw(b2c2-flexcop-pci b2c2-flexcop-usb budget budget-av), |
248 |
qw(budget-ci cinergyT2 dm1105 dvb-dibusb dvb-ttpci), |
249 |
qw(dvb-ttusb-budget dvb-usb-a800 dvb-usb-af9015 dvb-usb-ce6230), |
250 |
qw(dvb-usb-cinergyT2 dvb-usb-cxusb dvb-usb-dib0700), |
251 |
qw(dvb-usb-dibusb-mb dvb-usb-dibusb-mc dvb-usb-digitv), |
252 |
qw(dvb-usb-dtt200u dvb-usb-dtv5100 dvb-usb-ec168 dvb-usb-friio dvb-usb-gp8ps), |
253 |
qw(dvb-usb-nova-t-usb2 dvb-usb-ttusb2 dvb-usb-umt-010), |
254 |
qw(dvb-usb-vp702x dvb-usb-vp7045 earth-pt1 firedtv hexium_gemini), |
255 |
qw(hexium_orion pluto2 skystar2 smsusb ttusb_dec), |
256 |
], |
257 |
photo => [ qw(dc2xx mdc800) ], |
258 |
radio => [ qw(radio-gemtek-pci radio-maestro radio-maxiradio radio-miropcm20 radio-usb-si470x) ], |
259 |
scanner => [ qw(scanner microtek) ], |
260 |
firewire => [ qw(snd-firewire-speakers snd-isight snd-scs1x) ], |
261 |
gameport => [ qw(cs461x ns558 emu10k1-gp fm801-gp lightning ns558 vortex) ], |
262 |
usb_sound => [ qw(audio dabusb dsbr100 snd-usb-audio snd-usb-6fire snd-usb-caiaq snd-usb-usx2y usb-midi) ], |
263 |
webcam => [ |
264 |
qw(cafe_ccic cpia2 cpia_usb cyber2000fb em28xx et61x251 gspca), |
265 |
qw(gspca_benq gspca_conex gspca_cpia1 gspca_etoms |
266 |
gspca_finepix gspca_gl860 gspca_jeilinj gspca_jl2005bcd |
267 |
gspca_kinect gspca_konica gspca_m5602 gspca_mars |
268 |
gspca_mr97310a gspca_nw80x gspca_ov519 gspca_ov534 |
269 |
gspca_ov534_9 gspca_pac207 gspca_pac7302 gspca_pac7311 |
270 |
gspca_se401 gspca_sn9c2028 gspca_sn9c20x gspca_sonixb |
271 |
gspca_sonixj gspca_spca1528 gspca_spca500 gspca_spca501 |
272 |
gspca_spca505 gspca_spca506 gspca_spca508 gspca_spca561 |
273 |
gspca_sq905 gspca_sq905c gspca_sq930x gspca_stk014 |
274 |
gspca_stv0680 gspca_stv06xx gspca_sunplus gspca_t613 |
275 |
gspca_topro gspca_tv8532 gspca_vc032x gspca_vicam |
276 |
gspca_xirlink_cit gspca_zc3xx), |
277 |
qw(ibmcam konicawc mod_quickcam ov511 ov511-alt ov518_decomp), |
278 |
qw(ov51x-jpeg ovfx2 pwc qc-usb-messenger quickcam quickcam_messenger), |
279 |
# both STV06xx & stv06xx b/c drivers/media/video/gspca/stv06xx/stv06xx.h |
280 |
# wrongly use upcase letters: |
281 |
qw(se401 sn9c102 STV06xx stv06xx stv680 tcm825x ultracam), |
282 |
qw(usbvideo usbvision vicam w9968cf zc0301 zc3xx), |
283 |
], |
284 |
}, |
285 |
|
286 |
# USB input stuff get automagically loaded by hotplug and thus |
287 |
# magically work through /dev/input/mice multiplexing: |
288 |
input => { |
289 |
joystick => [ |
290 |
qw(iforce xpad), |
291 |
# there're more drivers in drivers/input/joystick but they support non USB or PCI devices |
292 |
# and thus cannot be detected but by slow (and maybe dangerous?) load_category: |
293 |
qw(a3d adi analog cobra db9 gamecon gf2k grip grip_mp guillemot interact), |
294 |
qw(joydump magellan sidewinder spaceball spaceorb stinger tmdc turbografx warrior) |
295 |
], |
296 |
remote => [ qw(ati_remote) ], |
297 |
# USB tablets and touchscreens: |
298 |
tablet => [ qw(acecad aiptek wacom kbtab) ], |
299 |
touchscreen => [ qw(ads7846_ts gunze hp680_ts_input itmtouch mk712 mtouch usbtouchscreen) ], |
300 |
}, |
301 |
|
302 |
various => |
303 |
# just here for classification, unused categories (nor auto-detect, nor load_thiskind) |
304 |
{ |
305 |
raid => [ |
306 |
qw(dm-crypt dm-log dm-log-userspace dm-mirror dm-mod dm-multipath dm-queue-length dm-raid dm-region-hash dm-round-robin), |
307 |
qw(dm-service-time dm-snapshot dm-zero faulty linear lvm-mod md-mod multipath md-mod raid0 raid10 raid1 raid456), |
308 |
# needed by raid456 and dm-raid 456 target |
309 |
qw(async_memcpy async_pq async_raid6_recov async_tx async_xor raid6_pq xor), |
310 |
], |
311 |
mouse => [ |
312 |
qw(atixlmouse busmouse generic_serial inport ioc3_serial logibm logibusmouse msbusmouse pcips2 qpmouse synclinkmp), |
313 |
if_(arch() =~ /ppc/, 'macserial'), |
314 |
qw(mousedev usbhid usbmouse synaptics_usb), |
315 |
], |
316 |
char => [ |
317 |
if_(arch() =~ /ia64/, qw(efivars)), |
318 |
qw(applicom n_r3964 nvram pc110pad ppdev), |
319 |
qw(wdt_pci i810-tco sx), #- what are these??? |
320 |
], |
321 |
crypto => [ |
322 |
qw(aes-i586 aes-x86_64 aes_generic aesni_intel amd768_rng amd7xx_tco cbc cryptd hw_random i810_rng leedslite padlock sha256_generic xts), |
323 |
], |
324 |
laptop => [ |
325 |
qw(i8k sonypi toshiba), |
326 |
], |
327 |
serial => [ |
328 |
qw(8250_pci 8250 epca esp isicom istallion jsm moxa mxser mxser_new stallion sx synclink synclinkmp), |
329 |
], |
330 |
other => [ |
331 |
qw(defxx ide-floppy ide-tape loop lp nbd sg st), |
332 |
qw(parport_pc parport_serial), |
333 |
qw(btaudio mmc_block), |
334 |
|
335 |
'cryptoloop', |
336 |
if_(arch() =~ /sparc/, 'openprom'), |
337 |
|
338 |
qw(crc32c crc32c-intel), |
339 |
|
340 |
qw(evdev), qw(usblp printer), 'floppy', 'microcode', |
341 |
|
342 |
#- these need checking |
343 |
qw(rrunner meye), |
344 |
|
345 |
qw(virtio virtio_balloon virtio_pci virtio_ring), |
346 |
qw(mei pch_phub), |
347 |
], |
348 |
agpgart => [ |
349 |
if_(arch() =~ /alpha/, qw(alpha-agp)), |
350 |
if_(arch() =~ /ia64/, qw(hp-agp i460-agp)), |
351 |
if_(arch() =~ /ppc/, qw(uninorth-agp)), |
352 |
|
353 |
qw(ali-agp amd64-agp amd-k7-agp ati-agp efficeon-agp intel-agp), |
354 |
qw(k7-agp mch-agp nvidia-agp sis-agp sworks-agp via-agp), |
355 |
], |
356 |
}, |
357 |
); |
358 |
|
359 |
my %moddeps; |
360 |
|
361 |
sub load_dependencies { |
362 |
my ($file, $o_root) = @_; |
363 |
|
364 |
%moddeps = (); |
365 |
foreach (cat_($o_root . $file)) { |
366 |
my ($m, $d) = split ':'; |
367 |
my $path = $m; |
368 |
my ($filename, @fdeps) = map { |
369 |
s![^ ]*/!!g; |
370 |
s!\.ko!!g; |
371 |
s!\.[gx]z!!g; |
372 |
$_; |
373 |
} $m, split(' ', $d); |
374 |
|
375 |
my ($modname, @deps) = map { filename2modname($_) } $filename, @fdeps; |
376 |
$moddeps{$modname}{deps} = \@deps; |
377 |
$moddeps{$modname}{filename} = $filename; |
378 |
if (!begins_with($path, "/")) { |
379 |
#- with newer module-init-tools, modules.dep can contain |
380 |
#- relative paths |
381 |
$path = dirname($file) . '/' . $path; |
382 |
} |
383 |
$moddeps{$modname}{path} = $path; |
384 |
} |
385 |
} |
386 |
|
387 |
sub dependencies_closure { |
388 |
my @l = map { dependencies_closure($_) } @{exists $moddeps{$_[0]} && $moddeps{$_[0]}{deps} || []}; |
389 |
(@l, $_[0]); |
390 |
} |
391 |
|
392 |
sub filename2modname { |
393 |
my ($modname) = @_; |
394 |
$modname =~ s/-/_/g; |
395 |
$modname; |
396 |
} |
397 |
|
398 |
sub load_default_moddeps() { |
399 |
require c; |
400 |
load_dependencies('/lib/modules/' . c::kernel_version() . '/modules.dep'); |
401 |
} |
402 |
|
403 |
sub modname2filename { |
404 |
load_default_moddeps() if !%moddeps; |
405 |
$moddeps{$_[0]}{filename}; |
406 |
} |
407 |
|
408 |
sub modname2path { |
409 |
load_default_moddeps() if !%moddeps; |
410 |
$moddeps{$_[0]}{path}; |
411 |
} |
412 |
|
413 |
sub category2modules { |
414 |
map { |
415 |
my ($t1, $t2s) = m|(.*)/(.*)|; |
416 |
my @sub = $t2s eq '*' ? keys %{$l{$t1}} : split('\|', $t2s); |
417 |
map { |
418 |
my $l = $l{$t1}{$_} or die "bad category $t1/$_\n" . backtrace(); |
419 |
map { filename2modname($_) } @$l; |
420 |
} @sub; |
421 |
} split(' ', $_[0]); |
422 |
} |
423 |
|
424 |
sub all_modules() { |
425 |
map { @$_ } map { values %$_ } values %l; |
426 |
} |
427 |
|
428 |
sub module2category { |
429 |
my ($module) = @_; |
430 |
$module = filename2modname($module); |
431 |
foreach my $t1 (keys %l) { |
432 |
my $h = $l{$t1}; |
433 |
foreach my $t2 (keys %$h) { |
434 |
$module eq filename2modname($_) and return "$t1/$t2" foreach @{$h->{$t2}}; |
435 |
} |
436 |
} |
437 |
return; |
438 |
} |
439 |
|
440 |
sub ethernet_categories() { |
441 |
'network/main|gigabit|pcmcia|usb|wireless|firewire'; |
442 |
} |
443 |
|
444 |
sub sub_categories { |
445 |
my ($t1) = @_; |
446 |
keys %{$l{$t1}}; |
447 |
} |
448 |
|
449 |
1; |