package/kernel: move block2mtd to block.mk
[openwrt/openwrt.git] / package / kernel / modules / block.mk
1 #
2 # Copyright (C) 2006-2010 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.$(LINUX_KMOD_SUFFIX)
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 @LINUX_2_6 +kmod-scsi-core @(!TARGET_ubicom32||!TARGET_etrax||!TARGET_x86)
29 KCONFIG:=CONFIG_ATA
30 FILES:=$(LINUX_DIR)/drivers/ata/libata.$(LINUX_KMOD_SUFFIX)
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+=!TARGET_x86:kmod-ata-core $(1)
40 endef
41
42
43 define KernelPackage/ata-ahci
44 $(call AddDepends/ata)
45 TITLE:=AHCI Serial ATA support
46 KCONFIG:=CONFIG_SATA_AHCI
47 FILES:=$(LINUX_DIR)/drivers/ata/ahci.$(LINUX_KMOD_SUFFIX)
48 AUTOLOAD:=$(call AutoLoad,41,ahci,1)
49 endef
50
51 define KernelPackage/ata-ahci/description
52 Support for AHCI Serial ATA controllers.
53 endef
54
55 $(eval $(call KernelPackage,ata-ahci))
56
57
58 define KernelPackage/ata-artop
59 $(call AddDepends/ata,)
60 TITLE:=ARTOP 6210/6260 PATA support
61 KCONFIG:=CONFIG_PATA_ARTOP
62 FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.$(LINUX_KMOD_SUFFIX)
63 AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
64 endef
65
66 define KernelPackage/ata-artop/description
67 PATA support for ARTOP 6210/6260 host controllers.
68 endef
69
70 $(eval $(call KernelPackage,ata-artop))
71
72
73 define KernelPackage/ata-nvidia-sata
74 $(call AddDepends/ata,)
75 TITLE:=Nvidia Serial ATA support
76 KCONFIG:=CONFIG_SATA_NV
77 FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.$(LINUX_KMOD_SUFFIX)
78 AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
79 endef
80
81 $(eval $(call KernelPackage,ata-nvidia-sata))
82
83
84 define KernelPackage/ata-pdc202xx-old
85 SUBMENU:=$(BLOCK_MENU)
86 TITLE:=Older Promise PATA controller support
87 DEPENDS:=kmod-ata-core
88 KCONFIG:= \
89 CONFIG_ATA_SFF=y \
90 CONFIG_PATA_PDC_OLD
91 FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.$(LINUX_KMOD_SUFFIX)
92 AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1)
93 endef
94
95 define KernelPackage/ata-pdc202xx-old/description
96 This option enables support for the Promise 20246, 20262, 20263,
97 20265 and 20267 adapters.
98 endef
99
100 $(eval $(call KernelPackage,ata-pdc202xx-old))
101
102
103 define KernelPackage/ata-piix
104 $(call AddDepends/ata,)
105 TITLE:=Intel PIIX PATA/SATA support
106 KCONFIG:=CONFIG_ATA_PIIX
107 FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.$(LINUX_KMOD_SUFFIX)
108 AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
109 endef
110
111 define KernelPackage/ata-piix/description
112 SATA support for Intel ICH5/6/7/8 series host controllers and
113 PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers.
114 endef
115
116 $(eval $(call KernelPackage,ata-piix))
117
118
119 define KernelPackage/ata-sil
120 $(call AddDepends/ata,)
121 TITLE:=Silicon Image SATA support
122 KCONFIG:=CONFIG_SATA_SIL
123 FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.$(LINUX_KMOD_SUFFIX)
124 AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
125 endef
126
127 define KernelPackage/ata-sil/description
128 Support for Silicon Image Serial ATA controllers.
129 endef
130
131 $(eval $(call KernelPackage,ata-sil))
132
133
134 define KernelPackage/ata-sil24
135 $(call AddDepends/ata,)
136 TITLE:=Silicon Image 3124/3132 SATA support
137 KCONFIG:=CONFIG_SATA_SIL24
138 FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.$(LINUX_KMOD_SUFFIX)
139 AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
140 endef
141
142 define KernelPackage/ata-sil24/description
143 Support for Silicon Image 3124/3132 Serial ATA controllers.
144 endef
145
146 $(eval $(call KernelPackage,ata-sil24))
147
148
149 define KernelPackage/ata-via-sata
150 $(call AddDepends/ata,)
151 TITLE:=VIA SATA support
152 KCONFIG:=CONFIG_SATA_VIA
153 FILES:=$(LINUX_DIR)/drivers/ata/sata_via.$(LINUX_KMOD_SUFFIX)
154 AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
155 endef
156
157 define KernelPackage/ata-via-sata/description
158 This option enables support for VIA Serial ATA.
159 endef
160
161 $(eval $(call KernelPackage,ata-via-sata))
162
163
164 define KernelPackage/block2mtd
165 SUBMENU:=$(BLOCK_MENU)
166 TITLE:=Block device MTD emulation
167 KCONFIG:=CONFIG_MTD_BLOCK2MTD
168 FILES:=$(LINUX_DIR)/drivers/mtd/devices/block2mtd.$(LINUX_KMOD_SUFFIX)
169 endef
170
171 $(eval $(call KernelPackage,block2mtd))
172
173
174 define KernelPackage/dm
175 SUBMENU:=$(BLOCK_MENU)
176 TITLE:=Device Mapper
177 # All the "=n" are unnecessary, they're only there
178 # to stop the config from asking the question.
179 # MIRROR is M because I've needed it for pvmove.
180 KCONFIG:= \
181 CONFIG_BLK_DEV_MD=n \
182 CONFIG_DM_DEBUG=n \
183 CONFIG_DM_CRYPT=n \
184 CONFIG_DM_UEVENT=n \
185 CONFIG_DM_DELAY=n \
186 CONFIG_DM_MULTIPATH=n \
187 CONFIG_DM_ZERO=n \
188 CONFIG_DM_SNAPSHOT=n \
189 CONFIG_DM_LOG_USERSPACE=n \
190 CONFIG_MD=y \
191 CONFIG_BLK_DEV_DM \
192 CONFIG_DM_MIRROR
193 FILES:=$(LINUX_DIR)/drivers/md/dm-*.$(LINUX_KMOD_SUFFIX)
194 AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror)
195 endef
196
197 define KernelPackage/dm/description
198 Kernel module necessary for LVM2 support
199 endef
200
201 $(eval $(call KernelPackage,dm))
202
203
204 define KernelPackage/ide-core
205 SUBMENU:=$(BLOCK_MENU)
206 TITLE:=IDE (ATA/ATAPI) device support
207 DEPENDS:=@PCI_SUPPORT
208 KCONFIG:= \
209 CONFIG_IDE \
210 CONFIG_BLK_DEV_IDE \
211 CONFIG_BLK_DEV_IDEDISK \
212 CONFIG_IDE_GD \
213 CONFIG_IDE_GD_ATA=y \
214 CONFIG_IDE_GD_ATAPI=n \
215 CONFIG_BLK_DEV_IDEDMA_PCI=y \
216 CONFIG_BLK_DEV_IDEPCI=y
217 FILES:= \
218 $(LINUX_DIR)/drivers/ide/ide-core.$(LINUX_KMOD_SUFFIX)
219 AUTOLOAD:= \
220 $(call AutoLoad,20,ide-core,1)
221 endef
222
223 define KernelPackage/ide-core/2.4
224 FILES+= \
225 $(LINUX_DIR)/drivers/ide/ide-detect.$(LINUX_KMOD_SUFFIX) \
226 $(LINUX_DIR)/drivers/ide/ide-disk.$(LINUX_KMOD_SUFFIX)
227 AUTOLOAD+= \
228 $(call AutoLoad,35,ide-detect,1) \
229 $(call AutoLoad,40,ide-disk,1)
230 endef
231
232 define KernelPackage/ide-core/2.6
233 FILES+= \
234 $(LINUX_DIR)/drivers/ide/ide-gd_mod.$(LINUX_KMOD_SUFFIX)
235 AUTOLOAD+= \
236 $(call AutoLoad,40,ide-gd_mod,1)
237 endef
238
239 define KernelPackage/ide-core/description
240 Kernel support for IDE, useful for usb mass storage devices (e.g. on WL-HDD)
241 Includes:
242 - ide-core
243 - ide-detect
244 - ide-gd_mod (or ide-disk)
245 endef
246
247 $(eval $(call KernelPackage,ide-core))
248
249
250 define AddDepends/ide
251 SUBMENU:=$(BLOCK_MENU)
252 DEPENDS:=kmod-ide-core $(1)
253 endef
254
255
256 define KernelPackage/ide-generic
257 $(call AddDepends/ide,@PCI_SUPPORT)
258 SUBMENU:=$(BLOCK_MENU)
259 TITLE:=Kernel support for generic PCI IDE chipsets
260 KCONFIG:=CONFIG_BLK_DEV_GENERIC
261 endef
262
263 define KernelPackage/ide-generic/2.4
264 FILES+= \
265 $(LINUX_DIR)/drivers/ide/pci/generic.$(LINUX_KMOD_SUFFIX)
266 AUTOLOAD+= \
267 $(call AutoLoad,30,generic,1)
268 endef
269
270 define KernelPackage/ide-generic/2.6
271 FILES+= \
272 $(LINUX_DIR)/drivers/ide/ide-pci-generic.$(LINUX_KMOD_SUFFIX)
273 AUTOLOAD+= \
274 $(call AutoLoad,30,ide-pci-generic,1)
275 endef
276
277 $(eval $(call KernelPackage,ide-generic))
278
279
280 define KernelPackage/ide-generic-old
281 $(call AddDepends/ide,@LINUX_2_6)
282 SUBMENU:=$(BLOCK_MENU)
283 TITLE:=Kernel support for generic (legacy) IDE chipsets
284 KCONFIG:=CONFIG_IDE_GENERIC
285 FILES:=$(LINUX_DIR)/drivers/ide/ide-generic.$(LINUX_KMOD_SUFFIX)
286 AUTOLOAD:=$(call AutoLoad,30,ide-generic,1)
287 endef
288
289 $(eval $(call KernelPackage,ide-generic-old))
290
291
292 define KernelPackage/ide-aec62xx
293 $(call AddDepends/ide,@PCI_SUPPORT)
294 TITLE:=Acard AEC62xx IDE driver
295 KCONFIG:=CONFIG_BLK_DEV_AEC62XX
296 FILES:=$(LINUX_DIR)/drivers/ide/aec62xx.$(LINUX_KMOD_SUFFIX)
297 AUTOLOAD:=$(call AutoLoad,30,aec62xx,1)
298 endef
299
300 define KernelPackage/ide-aec62xx/2.4
301 FILES:=$(LINUX_DIR)/drivers/ide/pci/aec62xx.$(LINUX_KMOD_SUFFIX)
302 endef
303
304 define KernelPackage/ide-aec62xx/description
305 Support for Acard AEC62xx (Artop ATP8xx) IDE controllers.
306 endef
307
308 $(eval $(call KernelPackage,ide-aec62xx,1))
309
310
311 define KernelPackage/ide-pdc202xx
312 $(call AddDepends/ide,@PCI_SUPPORT)
313 TITLE:=Promise PDC202xx IDE driver
314 KCONFIG:=CONFIG_BLK_DEV_PDC202XX_OLD
315 FILES:=$(LINUX_DIR)/drivers/ide/pdc202xx_old.$(LINUX_KMOD_SUFFIX)
316 AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old,1)
317 endef
318
319 define KernelPackage/ide-pdc202xx/2.4
320 FILES:=$(LINUX_DIR)/drivers/ide/pci/pdc202xx_old.$(LINUX_KMOD_SUFFIX)
321 endef
322
323 define KernelPackage/ide-pdc202xx/description
324 Support for the Promise Ultra 33/66/100 (PDC202{46|62|65|67|68}) IDE
325 controllers.
326 endef
327
328 $(eval $(call KernelPackage,ide-pdc202xx))
329
330
331 define KernelPackage/ide-it821x
332 $(call AddDepends/ide,@PCI_SUPPORT)
333 TITLE:=ITE IT821x IDE driver
334 KCONFIG:=CONFIG_BLK_DEV_IT821X
335 FILES=$(LINUX_DIR)/drivers/ide/it821x.$(LINUX_KMOD_SUFFIX)
336 AUTOLOAD:=$(call AutoLoad,30,it821x,1)
337 endef
338
339 define KernelPackage/ide-it821x/description
340 Kernel module for the ITE IDE821x IDE controllers.
341 endef
342
343 $(eval $(call KernelPackage,ide-it821x))
344
345
346 define KernelPackage/libsas
347 SUBMENU:=$(BLOCK_MENU)
348 TITLE:=SAS Domain Transport Attributes
349 DEPENDS:=@TARGET_x86
350 KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
351 CONFIG_SCSI_SAS_ATTRS \
352 CONFIG_SCSI_SAS_ATA=y \
353 CONFIG_SCSI_SAS_HOST_SMP=y \
354 CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
355 FILES:= \
356 $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.$(LINUX_KMOD_SUFFIX) \
357 $(LINUX_DIR)/drivers/scsi/libsas/libsas.$(LINUX_KMOD_SUFFIX)
358 AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
359 endef
360
361 define KernelPackage/libsas/description
362 SAS Domain Transport Attributes support.
363 endef
364
365 $(eval $(call KernelPackage,libsas,1))
366
367
368 define KernelPackage/loop
369 SUBMENU:=$(BLOCK_MENU)
370 TITLE:=Loopback device support
371 KCONFIG:= \
372 CONFIG_BLK_DEV_LOOP \
373 CONFIG_BLK_DEV_CRYPTOLOOP=n
374 FILES:=$(LINUX_DIR)/drivers/block/loop.$(LINUX_KMOD_SUFFIX)
375 AUTOLOAD:=$(call AutoLoad,30,loop)
376 endef
377
378 define KernelPackage/loop/description
379 Kernel module for loopback device support
380 endef
381
382 $(eval $(call KernelPackage,loop))
383
384
385 define KernelPackage/mvsas
386 SUBMENU:=$(BLOCK_MENU)
387 TITLE:=Marvell 88SE6440 SAS/SATA driver
388 DEPENDS:=@TARGET_x86 +kmod-libsas
389 KCONFIG:=CONFIG_SCSI_MVSAS
390 ifneq ($(CONFIG_LINUX_2_6_25)$(CONFIG_LINUX_2_6_30),)
391 FILES:=$(LINUX_DIR)/drivers/scsi/mvsas.$(LINUX_KMOD_SUFFIX)
392 else
393 FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.$(LINUX_KMOD_SUFFIX)
394 endif
395 AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
396 endef
397
398 define KernelPackage/mvsas/description
399 Kernel support for the Marvell SAS SCSI adapters
400 endef
401
402 $(eval $(call KernelPackage,mvsas))
403
404
405 define KernelPackage/nbd
406 SUBMENU:=$(BLOCK_MENU)
407 TITLE:=Network block device support
408 KCONFIG:=CONFIG_BLK_DEV_NBD
409 FILES:=$(LINUX_DIR)/drivers/block/nbd.$(LINUX_KMOD_SUFFIX)
410 AUTOLOAD:=$(call AutoLoad,30,nbd)
411 endef
412
413 define KernelPackage/nbd/description
414 Kernel module for network block device support
415 endef
416
417 $(eval $(call KernelPackage,nbd))
418
419
420 define KernelPackage/scsi-core
421 SUBMENU:=$(BLOCK_MENU)
422 TITLE:=SCSI device support
423 DEPENDS:=@!TARGET_x86
424 KCONFIG:= \
425 CONFIG_SCSI \
426 CONFIG_BLK_DEV_SD
427 FILES:= \
428 $(if $(findstring y,$(CONFIG_SCSI)),,$(LINUX_DIR)/drivers/scsi/scsi_mod.$(LINUX_KMOD_SUFFIX)) \
429 $(LINUX_DIR)/drivers/scsi/sd_mod.$(LINUX_KMOD_SUFFIX)
430 AUTOLOAD:=$(call AutoLoad,20,scsi_mod,1) $(call AutoLoad,40,sd_mod,1)
431 endef
432
433 $(eval $(call KernelPackage,scsi-core))
434
435
436 define KernelPackage/scsi-generic
437 SUBMENU:=$(BLOCK_MENU)
438 TITLE:=Kernel support for SCSI generic
439 KCONFIG:= \
440 CONFIG_CHR_DEV_SG
441 FILES:= \
442 $(LINUX_DIR)/drivers/scsi/sg.$(LINUX_KMOD_SUFFIX)
443 AUTOLOAD:=$(call AutoLoad,65,sg)
444 endef
445
446 $(eval $(call KernelPackage,scsi-generic))