kernel: dm: add dm-raid for LVM raid
[oweals/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||TARGET_sunxi +kmod-scsi-core
29   KCONFIG:=CONFIG_ATA
30   FILES:=$(LINUX_DIR)/drivers/ata/libata.ko
31 ifneq ($(wildcard $(LINUX_DIR)/drivers/ata/libahci.ko),)
32   FILES+=$(LINUX_DIR)/drivers/ata/libahci.ko
33 endif
34 endef
35
36 $(eval $(call KernelPackage,ata-core))
37
38
39 define AddDepends/ata
40   SUBMENU:=$(BLOCK_MENU)
41   DEPENDS+=kmod-ata-core $(1)
42 endef
43
44
45 define KernelPackage/ata-ahci
46   TITLE:=AHCI Serial ATA support
47   KCONFIG:=CONFIG_SATA_AHCI
48   FILES:= \
49     $(LINUX_DIR)/drivers/ata/ahci.ko
50   AUTOLOAD:=$(call AutoLoad,41,libahci ahci,1)
51   $(call AddDepends/ata)
52 endef
53
54 define KernelPackage/ata-ahci/description
55  Support for AHCI Serial ATA controllers
56 endef
57
58 $(eval $(call KernelPackage,ata-ahci))
59
60
61 define KernelPackage/ata-ahci-platform
62   TITLE:=AHCI Serial ATA Platform support
63   KCONFIG:=CONFIG_SATA_AHCI_PLATFORM
64   FILES:= \
65     $(LINUX_DIR)/drivers/ata/ahci_platform.ko \
66     $(LINUX_DIR)/drivers/ata/libahci_platform.ko
67   AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1)
68   $(call AddDepends/ata,@TARGET_ipq806x||TARGET_sunxi)
69 endef
70
71 define KernelPackage/ata-ahci-platform/description
72  Platform support for AHCI Serial ATA controllers
73 endef
74
75 $(eval $(call KernelPackage,ata-ahci-platform))
76
77
78 define KernelPackage/ata-artop
79   TITLE:=ARTOP 6210/6260 PATA support
80   KCONFIG:=CONFIG_PATA_ARTOP
81   FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.ko
82   AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
83   $(call AddDepends/ata)
84 endef
85
86 define KernelPackage/ata-artop/description
87  PATA support for ARTOP 6210/6260 host controllers
88 endef
89
90 $(eval $(call KernelPackage,ata-artop))
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/dax
210   SUBMENU:=$(BLOCK_MENU)
211   TITLE:=DAX: direct access to differentiated memory
212   DEPENDS:=@!LINUX_4_9
213   KCONFIG:=CONFIG_DAX
214   FILES:=$(LINUX_DIR)/drivers/dax/dax.ko
215 endef
216
217 $(eval $(call KernelPackage,dax))
218
219
220 define KernelPackage/dm
221   SUBMENU:=$(BLOCK_MENU)
222   TITLE:=Device Mapper
223   DEPENDS:=+kmod-crypto-manager +!LINUX_4_9:kmod-dax
224   # All the "=n" are unnecessary, they're only there
225   # to stop the config from asking the question.
226   # MIRROR is M because I've needed it for pvmove.
227   KCONFIG:= \
228         CONFIG_BLK_DEV_MD=n \
229         CONFIG_DM_DEBUG=n \
230         CONFIG_DM_UEVENT=n \
231         CONFIG_DM_DELAY=n \
232         CONFIG_DM_LOG_WRITES=n \
233         CONFIG_DM_MQ_DEFAULT=n \
234         CONFIG_DM_MULTIPATH=n \
235         CONFIG_DM_ZERO=n \
236         CONFIG_DM_SNAPSHOT=n \
237         CONFIG_DM_LOG_USERSPACE=n \
238         CONFIG_MD=y \
239         CONFIG_BLK_DEV_DM \
240         CONFIG_DM_CRYPT \
241         CONFIG_DM_MIRROR
242   FILES:= \
243     $(LINUX_DIR)/drivers/md/dm-mod.ko \
244     $(LINUX_DIR)/drivers/md/dm-crypt.ko \
245     $(LINUX_DIR)/drivers/md/dm-log.ko \
246     $(LINUX_DIR)/drivers/md/dm-mirror.ko \
247     $(LINUX_DIR)/drivers/md/dm-region-hash.ko
248   AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt)
249 endef
250
251 define KernelPackage/dm/description
252  Kernel module necessary for LVM2 support
253 endef
254
255 $(eval $(call KernelPackage,dm))
256
257 define KernelPackage/dm-raid
258   SUBMENU:=$(BLOCK_MENU)
259   TITLE:=LVM2 raid support
260   DEPENDS:=+kmod-dm +kmod-md-mod \
261            +kmod-md-raid0 +kmod-md-raid1 +kmod-md-raid10 +kmod-md-raid456
262   KCONFIG:= \
263         CONFIG_DM_RAID
264   FILES:=$(LINUX_DIR)/drivers/md/dm-raid.ko
265   AUTOLOAD:=$(call AutoLoad,31,dm-raid)
266 endef
267
268 define KernelPackage/dm-raid/description
269  Kernel module necessary for LVM2 raid support
270 endef
271
272 $(eval $(call KernelPackage,dm-raid))
273
274
275 define KernelPackage/md-mod
276   SUBMENU:=$(BLOCK_MENU)
277   TITLE:=MD RAID
278   KCONFIG:= \
279        CONFIG_MD=y \
280        CONFIG_BLK_DEV_MD=m \
281        CONFIG_MD_AUTODETECT=y \
282        CONFIG_MD_FAULTY=n
283   FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko
284   AUTOLOAD:=$(call AutoLoad,27,md-mod)
285 endef
286
287 define KernelPackage/md-mod/description
288  Kernel RAID md module (md-mod.ko).
289  You will need to select at least one RAID level module below.
290 endef
291
292 $(eval $(call KernelPackage,md-mod))
293
294
295 define KernelPackage/md/Depends
296   SUBMENU:=$(BLOCK_MENU)
297   DEPENDS:=kmod-md-mod $(1)
298 endef
299
300
301 define KernelPackage/md-linear
302 $(call KernelPackage/md/Depends,)
303   TITLE:=RAID Linear Module
304   KCONFIG:=CONFIG_MD_LINEAR
305   FILES:=$(LINUX_DIR)/drivers/md/linear.ko
306   AUTOLOAD:=$(call AutoLoad,28,linear)
307 endef
308
309 define KernelPackage/md-linear/description
310  RAID "Linear" or "Append" driver module (linear.ko)
311 endef
312
313 $(eval $(call KernelPackage,md-linear))
314
315
316 define KernelPackage/md-raid0
317 $(call KernelPackage/md/Depends,)
318   TITLE:=RAID0 Module
319   KCONFIG:=CONFIG_MD_RAID0
320   FILES:=$(LINUX_DIR)/drivers/md/raid0.ko
321   AUTOLOAD:=$(call AutoLoad,28,raid0)
322 endef
323
324 define KernelPackage/md-raid0/description
325  RAID Level 0 (Striping) driver module (raid0.ko)
326 endef
327
328 $(eval $(call KernelPackage,md-raid0))
329
330
331 define KernelPackage/md-raid1
332 $(call KernelPackage/md/Depends,)
333   TITLE:=RAID1 Module
334   KCONFIG:=CONFIG_MD_RAID1
335   FILES:=$(LINUX_DIR)/drivers/md/raid1.ko
336   AUTOLOAD:=$(call AutoLoad,28,raid1)
337 endef
338
339 define KernelPackage/md-raid1/description
340  RAID Level 1 (Mirroring) driver (raid1.ko)
341 endef
342
343 $(eval $(call KernelPackage,md-raid1))
344
345
346 define KernelPackage/md-raid10
347 $(call KernelPackage/md/Depends,)
348   TITLE:=RAID10 Module
349   KCONFIG:=CONFIG_MD_RAID10
350   FILES:=$(LINUX_DIR)/drivers/md/raid10.ko
351   AUTOLOAD:=$(call AutoLoad,28,raid10)
352 endef
353
354 define KernelPackage/md-raid10/description
355  RAID Level 10 (Mirroring+Striping) driver module (raid10.ko)
356 endef
357
358 $(eval $(call KernelPackage,md-raid10))
359
360
361 define KernelPackage/md-raid456
362 $(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +kmod-lib-crc32c)
363   TITLE:=RAID Level 456 Driver
364   KCONFIG:= \
365        CONFIG_ASYNC_CORE \
366        CONFIG_ASYNC_MEMCPY \
367        CONFIG_ASYNC_XOR \
368        CONFIG_ASYNC_PQ \
369        CONFIG_ASYNC_RAID6_RECOV \
370        CONFIG_ASYNC_RAID6_TEST=n \
371        CONFIG_MD_RAID456 \
372        CONFIG_MULTICORE_RAID456=n
373   FILES:= \
374         $(LINUX_DIR)/crypto/async_tx/async_tx.ko \
375         $(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \
376         $(LINUX_DIR)/crypto/async_tx/async_xor.ko \
377         $(LINUX_DIR)/crypto/async_tx/async_pq.ko \
378         $(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \
379         $(LINUX_DIR)/drivers/md/raid456.ko
380   AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456)
381 endef
382
383 define KernelPackage/md-raid456/description
384  RAID Level 4,5,6 kernel module (raid456.ko)
385
386  Includes the following modules required by
387  raid456.ko:
388     xor.ko
389     async_tx.ko
390     async_xor.ko
391     async_memcpy.ko
392     async_pq.ko
393     async_raid5_recov.ko
394     raid6_pq.ko
395 endef
396
397 $(eval $(call KernelPackage,md-raid456))
398
399
400 define KernelPackage/md-multipath
401 $(call KernelPackage/md/Depends,)
402   TITLE:=MD Multipath Module
403   KCONFIG:=CONFIG_MD_MULTIPATH
404   FILES:=$(LINUX_DIR)/drivers/md/multipath.ko
405   AUTOLOAD:=$(call AutoLoad,29,multipath)
406 endef
407
408 define KernelPackage/md-multipath/description
409  Multipath driver module (multipath.ko)
410 endef
411
412 $(eval $(call KernelPackage,md-multipath))
413
414
415 define KernelPackage/libsas
416   SUBMENU:=$(BLOCK_MENU)
417   DEPENDS:=@TARGET_x86
418   TITLE:=SAS Domain Transport Attributes
419   KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
420         CONFIG_SCSI_SAS_ATTRS \
421         CONFIG_SCSI_SAS_ATA=y \
422         CONFIG_SCSI_SAS_HOST_SMP=y \
423         CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
424   FILES:= \
425         $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \
426         $(LINUX_DIR)/drivers/scsi/libsas/libsas.ko
427   AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
428 endef
429
430 define KernelPackage/libsas/description
431  SAS Domain Transport Attributes support
432 endef
433
434 $(eval $(call KernelPackage,libsas,1))
435
436
437 define KernelPackage/loop
438   SUBMENU:=$(BLOCK_MENU)
439   TITLE:=Loopback device support
440   KCONFIG:= \
441         CONFIG_BLK_DEV_LOOP \
442         CONFIG_BLK_DEV_CRYPTOLOOP=n
443   FILES:=$(LINUX_DIR)/drivers/block/loop.ko
444   AUTOLOAD:=$(call AutoLoad,30,loop)
445 endef
446
447 define KernelPackage/loop/description
448  Kernel module for loopback device support
449 endef
450
451 $(eval $(call KernelPackage,loop))
452
453
454 define KernelPackage/mvsas
455   SUBMENU:=$(BLOCK_MENU)
456   TITLE:=Marvell 88SE6440 SAS/SATA driver
457   DEPENDS:=@TARGET_x86 +kmod-libsas
458   KCONFIG:= \
459         CONFIG_SCSI_MVSAS \
460         CONFIG_SCSI_MVSAS_TASKLET=n
461   FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko
462   AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
463 endef
464
465 define KernelPackage/mvsas/description
466  Kernel support for the Marvell SAS SCSI adapters
467 endef
468
469 $(eval $(call KernelPackage,mvsas))
470
471
472 define KernelPackage/nbd
473   SUBMENU:=$(BLOCK_MENU)
474   TITLE:=Network block device support
475   KCONFIG:=CONFIG_BLK_DEV_NBD
476   FILES:=$(LINUX_DIR)/drivers/block/nbd.ko
477   AUTOLOAD:=$(call AutoLoad,30,nbd)
478 endef
479
480 define KernelPackage/nbd/description
481  Kernel module for network block device support
482 endef
483
484 $(eval $(call KernelPackage,nbd))
485
486
487 define KernelPackage/scsi-core
488   SUBMENU:=$(BLOCK_MENU)
489   TITLE:=SCSI device support
490   KCONFIG:= \
491         CONFIG_SCSI \
492         CONFIG_BLK_DEV_SD
493   FILES:= \
494         $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \
495         $(LINUX_DIR)/drivers/scsi/sd_mod.ko
496   AUTOLOAD:=$(call AutoLoad,40,scsi_mod sd_mod,1)
497 endef
498
499 $(eval $(call KernelPackage,scsi-core))
500
501
502 define KernelPackage/scsi-generic
503   SUBMENU:=$(BLOCK_MENU)
504   TITLE:=Kernel support for SCSI generic
505   DEPENDS:=+kmod-scsi-core
506   KCONFIG:= \
507         CONFIG_CHR_DEV_SG
508   FILES:= \
509         $(LINUX_DIR)/drivers/scsi/sg.ko
510   AUTOLOAD:=$(call AutoLoad,65,sg)
511 endef
512
513 $(eval $(call KernelPackage,scsi-generic))
514
515
516 define KernelPackage/scsi-cdrom
517   SUBMENU:=$(BLOCK_MENU)
518   TITLE:=Kernel support for CD / DVD drives
519   DEPENDS:=+kmod-scsi-core
520   KCONFIG:= \
521     CONFIG_BLK_DEV_SR \
522     CONFIG_BLK_DEV_SR_VENDOR=n
523   FILES:= \
524     $(LINUX_DIR)/drivers/cdrom/cdrom.ko \
525     $(LINUX_DIR)/drivers/scsi/sr_mod.ko
526   AUTOLOAD:=$(call AutoLoad,45,sr_mod)
527 endef
528
529 $(eval $(call KernelPackage,scsi-cdrom))
530
531
532 define KernelPackage/scsi-tape
533   SUBMENU:=$(BLOCK_MENU)
534   TITLE:=Kernel support for scsi tape drives
535   DEPENDS:=+kmod-scsi-core
536   KCONFIG:= \
537     CONFIG_CHR_DEV_ST
538   FILES:= \
539     $(LINUX_DIR)/drivers/scsi/st.ko
540   AUTOLOAD:=$(call AutoLoad,45,st)
541 endef
542
543 $(eval $(call KernelPackage,scsi-tape))