4d34924649610405dd709d81010ae90ba4d2dc23
[openwrt/staging/yousong.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-imx
94 TITLE:=Freescale i.MX AHCI SATA support
95 DEPENDS:=@TARGET_imx6
96 KCONFIG:=\
97 CONFIG_AHCI_IMX \
98 CONFIG_SATA_AHCI_PLATFORM \
99 CONFIG_PATA_IMX=n
100 FILES:=$(LINUX_DIR)/drivers/ata/ahci_imx.ko
101 AUTOLOAD:=$(call AutoLoad,41,ahci_imx,1)
102 $(call AddDepends/ata)
103 endef
104
105 define KernelPackage/ata-imx/description
106 SATA support for the Freescale i.MX6 SoC's onboard AHCI SATA
107 endef
108
109 $(eval $(call KernelPackage,ata-imx))
110
111
112 define KernelPackage/ata-marvell-sata
113 TITLE:=Marvell Serial ATA support
114 KCONFIG:=CONFIG_SATA_MV
115 FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko
116 AUTOLOAD:=$(call AutoLoad,41,sata_mv,1)
117 $(call AddDepends/ata)
118 endef
119
120 define KernelPackage/ata-marvell-sata/description
121 SATA support for marvell chipsets
122 endef
123
124 $(eval $(call KernelPackage,ata-marvell-sata))
125
126
127 define KernelPackage/ata-nvidia-sata
128 TITLE:=Nvidia Serial ATA support
129 KCONFIG:=CONFIG_SATA_NV
130 FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.ko
131 AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
132 $(call AddDepends/ata)
133 endef
134
135 $(eval $(call KernelPackage,ata-nvidia-sata))
136
137
138 define KernelPackage/ata-pdc202xx-old
139 SUBMENU:=$(BLOCK_MENU)
140 TITLE:=Older Promise PATA controller support
141 DEPENDS:=kmod-ata-core
142 KCONFIG:= \
143 CONFIG_ATA_SFF=y \
144 CONFIG_PATA_PDC_OLD
145 FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.ko
146 AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1)
147 endef
148
149 define KernelPackage/ata-pdc202xx-old/description
150 This option enables support for the Promise 20246, 20262, 20263,
151 20265 and 20267 adapters
152 endef
153
154 $(eval $(call KernelPackage,ata-pdc202xx-old))
155
156
157 define KernelPackage/ata-piix
158 TITLE:=Intel PIIX PATA/SATA support
159 KCONFIG:=CONFIG_ATA_PIIX
160 FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.ko
161 AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
162 $(call AddDepends/ata)
163 endef
164
165 define KernelPackage/ata-piix/description
166 SATA support for Intel ICH5/6/7/8 series host controllers and
167 PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers
168 endef
169
170 $(eval $(call KernelPackage,ata-piix))
171
172
173 define KernelPackage/ata-sil
174 TITLE:=Silicon Image SATA support
175 KCONFIG:=CONFIG_SATA_SIL
176 FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.ko
177 AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
178 $(call AddDepends/ata)
179 endef
180
181 define KernelPackage/ata-sil/description
182 Support for Silicon Image Serial ATA controllers
183 endef
184
185 $(eval $(call KernelPackage,ata-sil))
186
187
188 define KernelPackage/ata-sil24
189 TITLE:=Silicon Image 3124/3132 SATA support
190 KCONFIG:=CONFIG_SATA_SIL24
191 FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.ko
192 AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
193 $(call AddDepends/ata)
194 endef
195
196 define KernelPackage/ata-sil24/description
197 Support for Silicon Image 3124/3132 Serial ATA controllers
198 endef
199
200 $(eval $(call KernelPackage,ata-sil24))
201
202
203 define KernelPackage/ata-via-sata
204 TITLE:=VIA SATA support
205 KCONFIG:=CONFIG_SATA_VIA
206 FILES:=$(LINUX_DIR)/drivers/ata/sata_via.ko
207 AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
208 $(call AddDepends/ata)
209 endef
210
211 define KernelPackage/ata-via-sata/description
212 This option enables support for VIA Serial ATA
213 endef
214
215 $(eval $(call KernelPackage,ata-via-sata))
216
217
218 define KernelPackage/block2mtd
219 SUBMENU:=$(BLOCK_MENU)
220 TITLE:=Block device MTD emulation
221 KCONFIG:=CONFIG_MTD_BLOCK2MTD
222 FILES:=$(LINUX_DIR)/drivers/mtd/devices/block2mtd.ko
223 endef
224
225 $(eval $(call KernelPackage,block2mtd))
226
227
228 define KernelPackage/dm
229 SUBMENU:=$(BLOCK_MENU)
230 TITLE:=Device Mapper
231 DEPENDS:=+kmod-crypto-manager
232 # All the "=n" are unnecessary, they're only there
233 # to stop the config from asking the question.
234 # MIRROR is M because I've needed it for pvmove.
235 KCONFIG:= \
236 CONFIG_BLK_DEV_MD=n \
237 CONFIG_DM_DEBUG=n \
238 CONFIG_DM_UEVENT=n \
239 CONFIG_DM_DELAY=n \
240 CONFIG_DM_LOG_WRITES=n \
241 CONFIG_DM_MQ_DEFAULT=n \
242 CONFIG_DM_MULTIPATH=n \
243 CONFIG_DM_ZERO=n \
244 CONFIG_DM_SNAPSHOT=n \
245 CONFIG_DM_LOG_USERSPACE=n \
246 CONFIG_MD=y \
247 CONFIG_BLK_DEV_DM \
248 CONFIG_DM_CRYPT \
249 CONFIG_DM_MIRROR
250 FILES:=$(LINUX_DIR)/drivers/md/dm-*.ko
251 AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt)
252 endef
253
254 define KernelPackage/dm/description
255 Kernel module necessary for LVM2 support
256 endef
257
258 $(eval $(call KernelPackage,dm))
259
260
261 define KernelPackage/md-mod
262 SUBMENU:=$(BLOCK_MENU)
263 TITLE:=MD RAID
264 KCONFIG:= \
265 CONFIG_MD=y \
266 CONFIG_BLK_DEV_MD=m \
267 CONFIG_MD_AUTODETECT=y \
268 CONFIG_MD_FAULTY=n
269 FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko
270 AUTOLOAD:=$(call AutoLoad,27,md-mod)
271 endef
272
273 define KernelPackage/md-mod/description
274 Kernel RAID md module (md-mod.ko).
275 You will need to select at least one RAID level module below.
276 endef
277
278 $(eval $(call KernelPackage,md-mod))
279
280
281 define KernelPackage/md/Depends
282 SUBMENU:=$(BLOCK_MENU)
283 DEPENDS:=kmod-md-mod $(1)
284 endef
285
286
287 define KernelPackage/md-linear
288 $(call KernelPackage/md/Depends,)
289 TITLE:=RAID Linear Module
290 KCONFIG:=CONFIG_MD_LINEAR
291 FILES:=$(LINUX_DIR)/drivers/md/linear.ko
292 AUTOLOAD:=$(call AutoLoad,28,linear)
293 endef
294
295 define KernelPackage/md-linear/description
296 RAID "Linear" or "Append" driver module (linear.ko)
297 endef
298
299 $(eval $(call KernelPackage,md-linear))
300
301
302 define KernelPackage/md-raid0
303 $(call KernelPackage/md/Depends,)
304 TITLE:=RAID0 Module
305 KCONFIG:=CONFIG_MD_RAID0
306 FILES:=$(LINUX_DIR)/drivers/md/raid0.ko
307 AUTOLOAD:=$(call AutoLoad,28,raid0)
308 endef
309
310 define KernelPackage/md-raid0/description
311 RAID Level 0 (Striping) driver module (raid0.ko)
312 endef
313
314 $(eval $(call KernelPackage,md-raid0))
315
316
317 define KernelPackage/md-raid1
318 $(call KernelPackage/md/Depends,)
319 TITLE:=RAID1 Module
320 KCONFIG:=CONFIG_MD_RAID1
321 FILES:=$(LINUX_DIR)/drivers/md/raid1.ko
322 AUTOLOAD:=$(call AutoLoad,28,raid1)
323 endef
324
325 define KernelPackage/md-raid1/description
326 RAID Level 1 (Mirroring) driver (raid1.ko)
327 endef
328
329 $(eval $(call KernelPackage,md-raid1))
330
331
332 define KernelPackage/md-raid10
333 $(call KernelPackage/md/Depends,)
334 TITLE:=RAID10 Module
335 KCONFIG:=CONFIG_MD_RAID10
336 FILES:=$(LINUX_DIR)/drivers/md/raid10.ko
337 AUTOLOAD:=$(call AutoLoad,28,raid10)
338 endef
339
340 define KernelPackage/md-raid10/description
341 RAID Level 10 (Mirroring+Striping) driver module (raid10.ko)
342 endef
343
344 $(eval $(call KernelPackage,md-raid10))
345
346
347 define KernelPackage/md-raid456
348 $(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +LINUX_4_4:kmod-lib-crc32c)
349 TITLE:=RAID Level 456 Driver
350 KCONFIG:= \
351 CONFIG_ASYNC_CORE \
352 CONFIG_ASYNC_MEMCPY \
353 CONFIG_ASYNC_XOR \
354 CONFIG_ASYNC_PQ \
355 CONFIG_ASYNC_RAID6_RECOV \
356 CONFIG_ASYNC_RAID6_TEST=n \
357 CONFIG_MD_RAID456 \
358 CONFIG_MULTICORE_RAID456=n
359 FILES:= \
360 $(LINUX_DIR)/crypto/async_tx/async_tx.ko \
361 $(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \
362 $(LINUX_DIR)/crypto/async_tx/async_xor.ko \
363 $(LINUX_DIR)/crypto/async_tx/async_pq.ko \
364 $(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \
365 $(LINUX_DIR)/drivers/md/raid456.ko
366 AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456)
367 endef
368
369 define KernelPackage/md-raid456/description
370 RAID Level 4,5,6 kernel module (raid456.ko)
371
372 Includes the following modules required by
373 raid456.ko:
374 xor.ko
375 async_tx.ko
376 async_xor.ko
377 async_memcpy.ko
378 async_pq.ko
379 async_raid5_recov.ko
380 raid6_pq.ko
381 endef
382
383 $(eval $(call KernelPackage,md-raid456))
384
385
386 define KernelPackage/md-multipath
387 $(call KernelPackage/md/Depends,)
388 TITLE:=MD Multipath Module
389 KCONFIG:=CONFIG_MD_MULTIPATH
390 FILES:=$(LINUX_DIR)/drivers/md/multipath.ko
391 AUTOLOAD:=$(call AutoLoad,29,multipath)
392 endef
393
394 define KernelPackage/md-multipath/description
395 Multipath driver module (multipath.ko)
396 endef
397
398 $(eval $(call KernelPackage,md-multipath))
399
400
401 define KernelPackage/libsas
402 SUBMENU:=$(BLOCK_MENU)
403 DEPENDS:=@TARGET_x86
404 TITLE:=SAS Domain Transport Attributes
405 KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
406 CONFIG_SCSI_SAS_ATTRS \
407 CONFIG_SCSI_SAS_ATA=y \
408 CONFIG_SCSI_SAS_HOST_SMP=y \
409 CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
410 FILES:= \
411 $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \
412 $(LINUX_DIR)/drivers/scsi/libsas/libsas.ko
413 AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
414 endef
415
416 define KernelPackage/libsas/description
417 SAS Domain Transport Attributes support
418 endef
419
420 $(eval $(call KernelPackage,libsas,1))
421
422
423 define KernelPackage/loop
424 SUBMENU:=$(BLOCK_MENU)
425 TITLE:=Loopback device support
426 KCONFIG:= \
427 CONFIG_BLK_DEV_LOOP \
428 CONFIG_BLK_DEV_CRYPTOLOOP=n
429 FILES:=$(LINUX_DIR)/drivers/block/loop.ko
430 AUTOLOAD:=$(call AutoLoad,30,loop)
431 endef
432
433 define KernelPackage/loop/description
434 Kernel module for loopback device support
435 endef
436
437 $(eval $(call KernelPackage,loop))
438
439
440 define KernelPackage/mvsas
441 SUBMENU:=$(BLOCK_MENU)
442 TITLE:=Marvell 88SE6440 SAS/SATA driver
443 DEPENDS:=@TARGET_x86 +kmod-libsas
444 KCONFIG:= \
445 CONFIG_SCSI_MVSAS \
446 CONFIG_SCSI_MVSAS_TASKLET=n
447 FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko
448 AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
449 endef
450
451 define KernelPackage/mvsas/description
452 Kernel support for the Marvell SAS SCSI adapters
453 endef
454
455 $(eval $(call KernelPackage,mvsas))
456
457
458 define KernelPackage/nbd
459 SUBMENU:=$(BLOCK_MENU)
460 TITLE:=Network block device support
461 KCONFIG:=CONFIG_BLK_DEV_NBD
462 FILES:=$(LINUX_DIR)/drivers/block/nbd.ko
463 AUTOLOAD:=$(call AutoLoad,30,nbd)
464 endef
465
466 define KernelPackage/nbd/description
467 Kernel module for network block device support
468 endef
469
470 $(eval $(call KernelPackage,nbd))
471
472
473 define KernelPackage/scsi-core
474 SUBMENU:=$(BLOCK_MENU)
475 TITLE:=SCSI device support
476 KCONFIG:= \
477 CONFIG_SCSI \
478 CONFIG_BLK_DEV_SD
479 FILES:= \
480 $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \
481 $(LINUX_DIR)/drivers/scsi/sd_mod.ko
482 AUTOLOAD:=$(call AutoLoad,40,scsi_mod sd_mod,1)
483 endef
484
485 $(eval $(call KernelPackage,scsi-core))
486
487
488 define KernelPackage/scsi-generic
489 SUBMENU:=$(BLOCK_MENU)
490 TITLE:=Kernel support for SCSI generic
491 DEPENDS:=+kmod-scsi-core
492 KCONFIG:= \
493 CONFIG_CHR_DEV_SG
494 FILES:= \
495 $(LINUX_DIR)/drivers/scsi/sg.ko
496 AUTOLOAD:=$(call AutoLoad,65,sg)
497 endef
498
499 $(eval $(call KernelPackage,scsi-generic))
500
501
502 define KernelPackage/scsi-cdrom
503 SUBMENU:=$(BLOCK_MENU)
504 TITLE:=Kernel support for CD / DVD drives
505 DEPENDS:=+kmod-scsi-core
506 KCONFIG:= \
507 CONFIG_BLK_DEV_SR \
508 CONFIG_BLK_DEV_SR_VENDOR=n
509 FILES:= \
510 $(LINUX_DIR)/drivers/cdrom/cdrom.ko \
511 $(LINUX_DIR)/drivers/scsi/sr_mod.ko
512 AUTOLOAD:=$(call AutoLoad,45,sr_mod)
513 endef
514
515 $(eval $(call KernelPackage,scsi-cdrom))
516
517
518 define KernelPackage/scsi-tape
519 SUBMENU:=$(BLOCK_MENU)
520 TITLE:=Kernel support for scsi tape drives
521 DEPENDS:=+kmod-scsi-core
522 KCONFIG:= \
523 CONFIG_CHR_DEV_ST
524 FILES:= \
525 $(LINUX_DIR)/drivers/scsi/st.ko
526 AUTOLOAD:=$(call AutoLoad,45,st)
527 endef
528
529 $(eval $(call KernelPackage,scsi-tape))