c5fcb9a6e86cbeb5fead2ed1873aa865bf181a3e
[openwrt.git] / package / kernel / linux / modules / block.mk
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 BLOCK_MENU:=Block Devices
9
10 define KernelPackage/aoe
11   SUBMENU:=$(BLOCK_MENU)
12   TITLE:=ATA over Ethernet support
13   KCONFIG:=CONFIG_ATA_OVER_ETH
14   FILES:=$(LINUX_DIR)/drivers/block/aoe/aoe.ko
15   AUTOLOAD:=$(call AutoLoad,30,aoe)
16 endef
17
18 define KernelPackage/aoe/description
19  Kernel support for ATA over Ethernet
20 endef
21
22 $(eval $(call KernelPackage,aoe))
23
24
25 define KernelPackage/ata-core
26   SUBMENU:=$(BLOCK_MENU)
27   TITLE:=Serial and Parallel ATA support
28   DEPENDS:=@PCI_SUPPORT +kmod-scsi-core
29   KCONFIG:=CONFIG_ATA
30   FILES:=$(LINUX_DIR)/drivers/ata/libata.ko
31   AUTOLOAD:=$(call AutoLoad,21,libata,1)
32 endef
33
34 $(eval $(call KernelPackage,ata-core))
35
36
37 define AddDepends/ata
38   SUBMENU:=$(BLOCK_MENU)
39   DEPENDS+=kmod-ata-core $(1)
40 endef
41
42
43 define KernelPackage/ata-ahci
44   TITLE:=AHCI Serial ATA support
45   KCONFIG:=CONFIG_SATA_AHCI
46   FILES:= \
47     $(LINUX_DIR)/drivers/ata/ahci.ko \
48     $(LINUX_DIR)/drivers/ata/libahci.ko
49   AUTOLOAD:=$(call AutoLoad,41,libahci ahci,1)
50   $(call AddDepends/ata)
51 endef
52
53 define KernelPackage/ata-ahci/description
54  Support for AHCI Serial ATA controllers
55 endef
56
57 $(eval $(call KernelPackage,ata-ahci))
58
59
60 define KernelPackage/ata-artop
61   TITLE:=ARTOP 6210/6260 PATA support
62   KCONFIG:=CONFIG_PATA_ARTOP
63   FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.ko
64   AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
65   $(call AddDepends/ata)
66 endef
67
68 define KernelPackage/ata-artop/description
69  PATA support for ARTOP 6210/6260 host controllers
70 endef
71
72 $(eval $(call KernelPackage,ata-artop))
73
74
75 define KernelPackage/ata-imx
76   TITLE:=Freescale i.MX6 AHCI SATA support
77   KCONFIG:=\
78         CONFIG_AHCI_IMX \
79         CONFIG_SATA_AHCI_PLATFORM \
80         CONFIG_PATA_IMX=n
81   FILES:=$(LINUX_DIR)/drivers/ata/ahci_imx.ko
82   AUTOLOAD:=$(call AutoLoad,41,ahci_imx,1)
83   $(call AddDepends/ata)
84 endef
85
86 define KernelPackage/ata-imx/description
87  SATA support for the Freescale i.MX6 SoC's onboard AHCI SATA
88 endef
89
90 $(eval $(call KernelPackage,ata-imx))
91
92
93 define KernelPackage/ata-marvell-sata
94   TITLE:=Marvell Serial ATA support
95   KCONFIG:=CONFIG_SATA_MV
96   FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko
97   AUTOLOAD:=$(call AutoLoad,41,sata_mv,1)
98   $(call AddDepends/ata)
99 endef
100
101 define KernelPackage/ata-marvell-sata/description
102  SATA support for marvell chipsets
103 endef
104
105 $(eval $(call KernelPackage,ata-marvell-sata))
106
107
108 define KernelPackage/ata-nvidia-sata
109   TITLE:=Nvidia Serial ATA support
110   KCONFIG:=CONFIG_SATA_NV
111   FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.ko
112   AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
113   $(call AddDepends/ata)
114 endef
115
116 $(eval $(call KernelPackage,ata-nvidia-sata))
117
118
119 define KernelPackage/ata-pdc202xx-old
120   SUBMENU:=$(BLOCK_MENU)
121   TITLE:=Older Promise PATA controller support
122   DEPENDS:=kmod-ata-core
123   KCONFIG:= \
124        CONFIG_ATA_SFF=y \
125        CONFIG_PATA_PDC_OLD
126   FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.ko
127   AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1)
128 endef
129
130 define KernelPackage/ata-pdc202xx-old/description
131  This option enables support for the Promise 20246, 20262, 20263,
132  20265 and 20267 adapters
133 endef
134
135 $(eval $(call KernelPackage,ata-pdc202xx-old))
136
137
138 define KernelPackage/ata-piix
139   TITLE:=Intel PIIX PATA/SATA support
140   KCONFIG:=CONFIG_ATA_PIIX
141   FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.ko
142   AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
143   $(call AddDepends/ata)
144 endef
145
146 define KernelPackage/ata-piix/description
147  SATA support for Intel ICH5/6/7/8 series host controllers and
148  PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers
149 endef
150
151 $(eval $(call KernelPackage,ata-piix))
152
153
154 define KernelPackage/ata-sil
155   TITLE:=Silicon Image SATA support
156   KCONFIG:=CONFIG_SATA_SIL
157   FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.ko
158   AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
159   $(call AddDepends/ata)
160 endef
161
162 define KernelPackage/ata-sil/description
163  Support for Silicon Image Serial ATA controllers
164 endef
165
166 $(eval $(call KernelPackage,ata-sil))
167
168
169 define KernelPackage/ata-sil24
170   TITLE:=Silicon Image 3124/3132 SATA support
171   KCONFIG:=CONFIG_SATA_SIL24
172   FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.ko
173   AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
174   $(call AddDepends/ata)
175 endef
176
177 define KernelPackage/ata-sil24/description
178  Support for Silicon Image 3124/3132 Serial ATA controllers
179 endef
180
181 $(eval $(call KernelPackage,ata-sil24))
182
183
184 define KernelPackage/ata-via-sata
185   TITLE:=VIA SATA support
186   KCONFIG:=CONFIG_SATA_VIA
187   FILES:=$(LINUX_DIR)/drivers/ata/sata_via.ko
188   AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
189   $(call AddDepends/ata)
190 endef
191
192 define KernelPackage/ata-via-sata/description
193  This option enables support for VIA Serial ATA
194 endef
195
196 $(eval $(call KernelPackage,ata-via-sata))
197
198
199 define KernelPackage/block2mtd
200   SUBMENU:=$(BLOCK_MENU)
201   TITLE:=Block device MTD emulation
202   KCONFIG:=CONFIG_MTD_BLOCK2MTD
203   FILES:=$(LINUX_DIR)/drivers/mtd/devices/block2mtd.ko
204 endef
205
206 $(eval $(call KernelPackage,block2mtd))
207
208
209 define KernelPackage/dm
210   SUBMENU:=$(BLOCK_MENU)
211   TITLE:=Device Mapper
212   DEPENDS:=+kmod-crypto-manager
213   # All the "=n" are unnecessary, they're only there
214   # to stop the config from asking the question.
215   # MIRROR is M because I've needed it for pvmove.
216   KCONFIG:= \
217         CONFIG_BLK_DEV_MD=n \
218         CONFIG_DM_DEBUG=n \
219         CONFIG_DM_UEVENT=n \
220         CONFIG_DM_DELAY=n \
221         CONFIG_DM_MULTIPATH=n \
222         CONFIG_DM_ZERO=n \
223         CONFIG_DM_SNAPSHOT=n \
224         CONFIG_DM_LOG_USERSPACE=n \
225         CONFIG_MD=y \
226         CONFIG_BLK_DEV_DM \
227         CONFIG_DM_CRYPT \
228         CONFIG_DM_MIRROR
229   FILES:=$(LINUX_DIR)/drivers/md/dm-*.ko
230   AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt)
231 endef
232
233 define KernelPackage/dm/description
234  Kernel module necessary for LVM2 support
235 endef
236
237 $(eval $(call KernelPackage,dm))
238
239
240 define KernelPackage/md-mod
241   SUBMENU:=$(BLOCK_MENU)
242   TITLE:=MD RAID
243   KCONFIG:= \
244        CONFIG_MD=y \
245        CONFIG_BLK_DEV_MD=m \
246        CONFIG_MD_AUTODETECT=y \
247        CONFIG_MD_FAULTY=n
248   FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko
249   AUTOLOAD:=$(call AutoLoad,27,md-mod)
250 endef
251
252 define KernelPackage/md-mod/description
253  Kernel RAID md module (md-mod.ko).
254  You will need to select at least one RAID level module below.
255 endef
256
257 $(eval $(call KernelPackage,md-mod))
258
259
260 define KernelPackage/md/Depends
261   SUBMENU:=$(BLOCK_MENU)
262   DEPENDS:=kmod-md-mod $(1)
263 endef
264
265
266 define KernelPackage/md-linear
267 $(call KernelPackage/md/Depends,)
268   TITLE:=RAID Linear Module
269   KCONFIG:=CONFIG_MD_LINEAR
270   FILES:=$(LINUX_DIR)/drivers/md/linear.ko
271   AUTOLOAD:=$(call AutoLoad,28,linear)
272 endef
273
274 define KernelPackage/md-linear/description
275  RAID "Linear" or "Append" driver module (linear.ko)
276 endef
277
278 $(eval $(call KernelPackage,md-linear))
279
280
281 define KernelPackage/md-raid0
282 $(call KernelPackage/md/Depends,)
283   TITLE:=RAID0 Module
284   KCONFIG:=CONFIG_MD_RAID0
285   FILES:=$(LINUX_DIR)/drivers/md/raid0.ko
286   AUTOLOAD:=$(call AutoLoad,28,raid0)
287 endef
288
289 define KernelPackage/md-raid0/description
290  RAID Level 0 (Striping) driver module (raid0.ko)
291 endef
292
293 $(eval $(call KernelPackage,md-raid0))
294
295
296 define KernelPackage/md-raid1
297 $(call KernelPackage/md/Depends,)
298   TITLE:=RAID1 Module
299   KCONFIG:=CONFIG_MD_RAID1
300   FILES:=$(LINUX_DIR)/drivers/md/raid1.ko
301   AUTOLOAD:=$(call AutoLoad,28,raid1)
302 endef
303
304 define KernelPackage/md-raid1/description
305  RAID Level 1 (Mirroring) driver (raid1.ko)
306 endef
307
308 $(eval $(call KernelPackage,md-raid1))
309
310
311 define KernelPackage/md-raid10
312 $(call KernelPackage/md/Depends,)
313   TITLE:=RAID10 Module
314   KCONFIG:=CONFIG_MD_RAID10
315   FILES:=$(LINUX_DIR)/drivers/md/raid10.ko
316   AUTOLOAD:=$(call AutoLoad,28,raid10)
317 endef
318
319 define KernelPackage/md-raid10/description
320  RAID Level 10 (Mirroring+Striping) driver module (raid10.ko)
321 endef
322
323 $(eval $(call KernelPackage,md-raid10))
324
325
326 define KernelPackage/md-raid456
327 $(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor)
328   TITLE:=RAID Level 456 Driver
329   KCONFIG:= \
330        CONFIG_ASYNC_CORE \
331        CONFIG_ASYNC_MEMCPY \
332        CONFIG_ASYNC_XOR \
333        CONFIG_ASYNC_PQ \
334        CONFIG_ASYNC_RAID6_RECOV \
335        CONFIG_ASYNC_RAID6_TEST=n \
336        CONFIG_MD_RAID456 \
337        CONFIG_MULTICORE_RAID456=n
338   FILES:= \
339         $(LINUX_DIR)/crypto/async_tx/async_tx.ko \
340         $(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \
341         $(LINUX_DIR)/crypto/async_tx/async_xor.ko \
342         $(LINUX_DIR)/crypto/async_tx/async_pq.ko \
343         $(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \
344         $(LINUX_DIR)/drivers/md/raid456.ko
345   AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456)
346 endef
347
348 define KernelPackage/md-raid456/description
349  RAID Level 4,5,6 kernel module (raid456.ko)
350
351  Includes the following modules required by
352  raid456.ko:
353     xor.ko
354     async_tx.ko
355     async_xor.ko
356     async_memcpy.ko
357     async_pq.ko
358     async_raid5_recov.ko
359     raid6_pq.ko
360 endef
361
362 $(eval $(call KernelPackage,md-raid456))
363
364
365 define KernelPackage/md-multipath
366 $(call KernelPackage/md/Depends,)
367   TITLE:=MD Multipath Module
368   KCONFIG:=CONFIG_MD_MULTIPATH
369   FILES:=$(LINUX_DIR)/drivers/md/multipath.ko
370   AUTOLOAD:=$(call AutoLoad,29,multipath)
371 endef
372
373 define KernelPackage/md-multipath/description
374  Multipath driver module (multipath.ko)
375 endef
376
377 $(eval $(call KernelPackage,md-multipath))
378
379
380 define KernelPackage/ide-core
381   SUBMENU:=$(BLOCK_MENU)
382   TITLE:=IDE (ATA/ATAPI) device support
383   DEPENDS:=@PCI_SUPPORT
384   KCONFIG:= \
385         CONFIG_IDE \
386         CONFIG_BLK_DEV_IDE \
387         CONFIG_BLK_DEV_IDEDISK \
388         CONFIG_IDE_GD \
389         CONFIG_IDE_GD_ATA=y \
390         CONFIG_IDE_GD_ATAPI=n \
391         CONFIG_IDEPCI_PCIBUS_ORDER=y \
392         CONFIG_BLK_DEV_IDEDMA_PCI=y \
393         CONFIG_BLK_DEV_IDEPCI=y
394   FILES:= \
395         $(LINUX_DIR)/drivers/ide/ide-core.ko \
396         $(LINUX_DIR)/drivers/ide/ide-gd_mod.ko
397   AUTOLOAD:= \
398         $(call AutoLoad,20,ide-core,1) \
399         $(call AutoLoad,40,ide-gd_mod,1)
400 endef
401
402 define KernelPackage/ide-core/description
403  Kernel support for IDE, useful for usb mass storage devices (e.g. on WL-HDD)
404  Includes:
405  - ide-core
406  - ide-gd_mod
407 endef
408
409 $(eval $(call KernelPackage,ide-core))
410
411
412 define AddDepends/ide
413   SUBMENU:=$(BLOCK_MENU)
414   DEPENDS+=kmod-ide-core $(1)
415 endef
416
417
418 define KernelPackage/ide-generic
419   SUBMENU:=$(BLOCK_MENU)
420   DEPENDS:=@PCI_SUPPORT
421   TITLE:=Kernel support for generic PCI IDE chipsets
422   KCONFIG:=CONFIG_BLK_DEV_GENERIC
423   FILES:=$(LINUX_DIR)/drivers/ide/ide-pci-generic.ko
424   AUTOLOAD:=$(call AutoLoad,30,ide-pci-generic,1)
425   $(call AddDepends/ide)
426 endef
427
428 $(eval $(call KernelPackage,ide-generic))
429
430
431 define KernelPackage/ide-generic-old
432   SUBMENU:=$(BLOCK_MENU)
433   TITLE:=Kernel support for generic (legacy) IDE chipsets
434   KCONFIG:=CONFIG_IDE_GENERIC
435   FILES:=$(LINUX_DIR)/drivers/ide/ide-generic.ko
436   AUTOLOAD:=$(call AutoLoad,30,ide-generic,1)
437   $(call AddDepends/ide)
438 endef
439
440 $(eval $(call KernelPackage,ide-generic-old))
441
442
443 define KernelPackage/ide-aec62xx
444   TITLE:=Acard AEC62xx IDE driver
445   DEPENDS:=@PCI_SUPPORT
446   KCONFIG:=CONFIG_BLK_DEV_AEC62XX
447   FILES:=$(LINUX_DIR)/drivers/ide/aec62xx.ko
448   AUTOLOAD:=$(call AutoLoad,30,aec62xx,1)
449   $(call AddDepends/ide)
450 endef
451
452 define KernelPackage/ide-aec62xx/description
453  Support for Acard AEC62xx (Artop ATP8xx) IDE controllers
454 endef
455
456 $(eval $(call KernelPackage,ide-aec62xx,1))
457
458
459 define KernelPackage/ide-pdc202xx
460   TITLE:=Promise PDC202xx IDE driver
461   DEPENDS:=@PCI_SUPPORT
462   KCONFIG:=CONFIG_BLK_DEV_PDC202XX_OLD
463   FILES:=$(LINUX_DIR)/drivers/ide/pdc202xx_old.ko
464   AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old,1)
465   $(call AddDepends/ide)
466 endef
467
468 define KernelPackage/ide-pdc202xx/description
469  Support for the Promise Ultra 33/66/100 (PDC202{46|62|65|67|68}) IDE
470  controllers.
471 endef
472
473 $(eval $(call KernelPackage,ide-pdc202xx))
474
475
476 define KernelPackage/ide-it821x
477   TITLE:=ITE IT821x IDE driver
478   DEPENDS:=@PCI_SUPPORT
479   KCONFIG:=CONFIG_BLK_DEV_IT821X
480   FILES=$(LINUX_DIR)/drivers/ide/it821x.ko
481   AUTOLOAD:=$(call AutoLoad,30,it821x,1)
482   $(call AddDepends/ide)
483 endef
484
485 define KernelPackage/ide-it821x/description
486  Kernel module for the ITE IDE821x IDE controllers
487 endef
488
489 $(eval $(call KernelPackage,ide-it821x))
490
491
492 define KernelPackage/libsas
493   SUBMENU:=$(BLOCK_MENU)
494   DEPENDS:=@TARGET_x86
495   TITLE:=SAS Domain Transport Attributes
496   KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
497         CONFIG_SCSI_SAS_ATTRS \
498         CONFIG_SCSI_SAS_ATA=y \
499         CONFIG_SCSI_SAS_HOST_SMP=y \
500         CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
501   FILES:= \
502         $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \
503         $(LINUX_DIR)/drivers/scsi/libsas/libsas.ko
504   AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
505 endef
506
507 define KernelPackage/libsas/description
508  SAS Domain Transport Attributes support
509 endef
510
511 $(eval $(call KernelPackage,libsas,1))
512
513
514 define KernelPackage/loop
515   SUBMENU:=$(BLOCK_MENU)
516   TITLE:=Loopback device support
517   KCONFIG:= \
518         CONFIG_BLK_DEV_LOOP \
519         CONFIG_BLK_DEV_CRYPTOLOOP=n
520   FILES:=$(LINUX_DIR)/drivers/block/loop.ko
521   AUTOLOAD:=$(call AutoLoad,30,loop)
522 endef
523
524 define KernelPackage/loop/description
525  Kernel module for loopback device support
526 endef
527
528 $(eval $(call KernelPackage,loop))
529
530
531 define KernelPackage/mvsas
532   SUBMENU:=$(BLOCK_MENU)
533   TITLE:=Marvell 88SE6440 SAS/SATA driver
534   DEPENDS:=@TARGET_x86 +kmod-libsas
535   KCONFIG:= \
536         CONFIG_SCSI_MVSAS \
537         CONFIG_SCSI_MVSAS_TASKLET=n
538   FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko
539   AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
540 endef
541
542 define KernelPackage/mvsas/description
543  Kernel support for the Marvell SAS SCSI adapters
544 endef
545
546 $(eval $(call KernelPackage,mvsas))
547
548
549 define KernelPackage/nbd
550   SUBMENU:=$(BLOCK_MENU)
551   TITLE:=Network block device support
552   KCONFIG:=CONFIG_BLK_DEV_NBD
553   FILES:=$(LINUX_DIR)/drivers/block/nbd.ko
554   AUTOLOAD:=$(call AutoLoad,30,nbd)
555 endef
556
557 define KernelPackage/nbd/description
558  Kernel module for network block device support
559 endef
560
561 $(eval $(call KernelPackage,nbd))
562
563
564 define KernelPackage/scsi-core
565   SUBMENU:=$(BLOCK_MENU)
566   TITLE:=SCSI device support
567   KCONFIG:= \
568         CONFIG_SCSI \
569         CONFIG_BLK_DEV_SD
570   FILES:= \
571         $(if $(findstring y,$(CONFIG_SCSI)),,$(LINUX_DIR)/drivers/scsi/scsi_mod.ko) \
572         $(LINUX_DIR)/drivers/scsi/sd_mod.ko
573   AUTOLOAD:=$(call AutoLoad,20,scsi_mod,1) $(call AutoLoad,40,sd_mod,1)
574 endef
575
576 $(eval $(call KernelPackage,scsi-core))
577
578
579 define KernelPackage/scsi-generic
580   SUBMENU:=$(BLOCK_MENU)
581   TITLE:=Kernel support for SCSI generic
582   DEPENDS:=+kmod-scsi-core
583   KCONFIG:= \
584         CONFIG_CHR_DEV_SG
585   FILES:= \
586         $(LINUX_DIR)/drivers/scsi/sg.ko
587   AUTOLOAD:=$(call AutoLoad,65,sg)
588 endef
589
590 $(eval $(call KernelPackage,scsi-generic))
591
592
593 define KernelPackage/scsi-cdrom
594   SUBMENU:=$(BLOCK_MENU)
595   TITLE:=Kernel support for CD / DVD drives
596   DEPENDS:=+kmod-scsi-core
597   KCONFIG:= \
598     CONFIG_BLK_DEV_SR \
599     CONFIG_BLK_DEV_SR_VENDOR=n
600   FILES:= \
601     $(LINUX_DIR)/drivers/cdrom/cdrom.ko \
602     $(LINUX_DIR)/drivers/scsi/sr_mod.ko
603   AUTOLOAD:=$(call AutoLoad,30,cdrom) $(call AutoLoad,45,sr_mod)
604 endef
605
606 $(eval $(call KernelPackage,scsi-cdrom))