block.mk 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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. BLOCK_MENU:=Block Devices
  8. define KernelPackage/aoe
  9. SUBMENU:=$(BLOCK_MENU)
  10. TITLE:=ATA over Ethernet support
  11. KCONFIG:=CONFIG_ATA_OVER_ETH
  12. FILES:=$(LINUX_DIR)/drivers/block/aoe/aoe.ko
  13. AUTOLOAD:=$(call AutoLoad,30,aoe)
  14. endef
  15. define KernelPackage/aoe/description
  16. Kernel support for ATA over Ethernet
  17. endef
  18. $(eval $(call KernelPackage,aoe))
  19. define KernelPackage/ata-core
  20. SUBMENU:=$(BLOCK_MENU)
  21. TITLE:=Serial and Parallel ATA support
  22. DEPENDS:=@PCI_SUPPORT||TARGET_sunxi +kmod-scsi-core
  23. KCONFIG:=CONFIG_ATA
  24. FILES:=$(LINUX_DIR)/drivers/ata/libata.ko
  25. ifneq ($(wildcard $(LINUX_DIR)/drivers/ata/libahci.ko),)
  26. FILES+=$(LINUX_DIR)/drivers/ata/libahci.ko
  27. endif
  28. endef
  29. $(eval $(call KernelPackage,ata-core))
  30. define AddDepends/ata
  31. SUBMENU:=$(BLOCK_MENU)
  32. DEPENDS+=kmod-ata-core $(1)
  33. endef
  34. define KernelPackage/ata-ahci
  35. TITLE:=AHCI Serial ATA support
  36. KCONFIG:=CONFIG_SATA_AHCI
  37. FILES:= \
  38. $(LINUX_DIR)/drivers/ata/ahci.ko
  39. AUTOLOAD:=$(call AutoLoad,41,libahci ahci,1)
  40. $(call AddDepends/ata)
  41. endef
  42. define KernelPackage/ata-ahci/description
  43. Support for AHCI Serial ATA controllers
  44. endef
  45. $(eval $(call KernelPackage,ata-ahci))
  46. define KernelPackage/ata-ahci-platform
  47. TITLE:=AHCI Serial ATA Platform support
  48. KCONFIG:=CONFIG_SATA_AHCI_PLATFORM
  49. FILES:= \
  50. $(LINUX_DIR)/drivers/ata/ahci_platform.ko \
  51. $(LINUX_DIR)/drivers/ata/libahci_platform.ko
  52. AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1)
  53. $(call AddDepends/ata,@TARGET_ipq806x||TARGET_sunxi)
  54. endef
  55. define KernelPackage/ata-ahci-platform/description
  56. Platform support for AHCI Serial ATA controllers
  57. endef
  58. $(eval $(call KernelPackage,ata-ahci-platform))
  59. define KernelPackage/ata-artop
  60. TITLE:=ARTOP 6210/6260 PATA support
  61. KCONFIG:=CONFIG_PATA_ARTOP
  62. FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.ko
  63. AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
  64. $(call AddDepends/ata)
  65. endef
  66. define KernelPackage/ata-artop/description
  67. PATA support for ARTOP 6210/6260 host controllers
  68. endef
  69. $(eval $(call KernelPackage,ata-artop))
  70. define KernelPackage/ata-imx
  71. TITLE:=Freescale i.MX AHCI SATA support
  72. DEPENDS:=@TARGET_imx6
  73. KCONFIG:=\
  74. CONFIG_AHCI_IMX \
  75. CONFIG_SATA_AHCI_PLATFORM \
  76. CONFIG_PATA_IMX=n
  77. FILES:=$(LINUX_DIR)/drivers/ata/ahci_imx.ko
  78. AUTOLOAD:=$(call AutoLoad,41,ahci_imx,1)
  79. $(call AddDepends/ata)
  80. endef
  81. define KernelPackage/ata-imx/description
  82. SATA support for the Freescale i.MX6 SoC's onboard AHCI SATA
  83. endef
  84. $(eval $(call KernelPackage,ata-imx))
  85. define KernelPackage/ata-marvell-sata
  86. TITLE:=Marvell Serial ATA support
  87. KCONFIG:=CONFIG_SATA_MV
  88. FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko
  89. AUTOLOAD:=$(call AutoLoad,41,sata_mv,1)
  90. $(call AddDepends/ata)
  91. endef
  92. define KernelPackage/ata-marvell-sata/description
  93. SATA support for marvell chipsets
  94. endef
  95. $(eval $(call KernelPackage,ata-marvell-sata))
  96. define KernelPackage/ata-nvidia-sata
  97. TITLE:=Nvidia Serial ATA support
  98. KCONFIG:=CONFIG_SATA_NV
  99. FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.ko
  100. AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
  101. $(call AddDepends/ata)
  102. endef
  103. $(eval $(call KernelPackage,ata-nvidia-sata))
  104. define KernelPackage/ata-pdc202xx-old
  105. SUBMENU:=$(BLOCK_MENU)
  106. TITLE:=Older Promise PATA controller support
  107. DEPENDS:=kmod-ata-core
  108. KCONFIG:= \
  109. CONFIG_ATA_SFF=y \
  110. CONFIG_PATA_PDC_OLD
  111. FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.ko
  112. AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1)
  113. endef
  114. define KernelPackage/ata-pdc202xx-old/description
  115. This option enables support for the Promise 20246, 20262, 20263,
  116. 20265 and 20267 adapters
  117. endef
  118. $(eval $(call KernelPackage,ata-pdc202xx-old))
  119. define KernelPackage/ata-piix
  120. TITLE:=Intel PIIX PATA/SATA support
  121. KCONFIG:=CONFIG_ATA_PIIX
  122. FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.ko
  123. AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
  124. $(call AddDepends/ata)
  125. endef
  126. define KernelPackage/ata-piix/description
  127. SATA support for Intel ICH5/6/7/8 series host controllers and
  128. PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers
  129. endef
  130. $(eval $(call KernelPackage,ata-piix))
  131. define KernelPackage/ata-sil
  132. TITLE:=Silicon Image SATA support
  133. KCONFIG:=CONFIG_SATA_SIL
  134. FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.ko
  135. AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
  136. $(call AddDepends/ata)
  137. endef
  138. define KernelPackage/ata-sil/description
  139. Support for Silicon Image Serial ATA controllers
  140. endef
  141. $(eval $(call KernelPackage,ata-sil))
  142. define KernelPackage/ata-sil24
  143. TITLE:=Silicon Image 3124/3132 SATA support
  144. KCONFIG:=CONFIG_SATA_SIL24
  145. FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.ko
  146. AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
  147. $(call AddDepends/ata)
  148. endef
  149. define KernelPackage/ata-sil24/description
  150. Support for Silicon Image 3124/3132 Serial ATA controllers
  151. endef
  152. $(eval $(call KernelPackage,ata-sil24))
  153. define KernelPackage/ata-via-sata
  154. TITLE:=VIA SATA support
  155. KCONFIG:=CONFIG_SATA_VIA
  156. FILES:=$(LINUX_DIR)/drivers/ata/sata_via.ko
  157. AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
  158. $(call AddDepends/ata)
  159. endef
  160. define KernelPackage/ata-via-sata/description
  161. This option enables support for VIA Serial ATA
  162. endef
  163. $(eval $(call KernelPackage,ata-via-sata))
  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.ko
  169. endef
  170. $(eval $(call KernelPackage,block2mtd))
  171. define KernelPackage/dm
  172. SUBMENU:=$(BLOCK_MENU)
  173. TITLE:=Device Mapper
  174. DEPENDS:=+kmod-crypto-manager
  175. # All the "=n" are unnecessary, they're only there
  176. # to stop the config from asking the question.
  177. # MIRROR is M because I've needed it for pvmove.
  178. KCONFIG:= \
  179. CONFIG_BLK_DEV_MD=n \
  180. CONFIG_DM_DEBUG=n \
  181. CONFIG_DM_UEVENT=n \
  182. CONFIG_DM_DELAY=n \
  183. CONFIG_DM_LOG_WRITES=n \
  184. CONFIG_DM_MQ_DEFAULT=n \
  185. CONFIG_DM_MULTIPATH=n \
  186. CONFIG_DM_ZERO=n \
  187. CONFIG_DM_SNAPSHOT=n \
  188. CONFIG_DM_LOG_USERSPACE=n \
  189. CONFIG_MD=y \
  190. CONFIG_BLK_DEV_DM \
  191. CONFIG_DM_CRYPT \
  192. CONFIG_DM_MIRROR
  193. FILES:=$(LINUX_DIR)/drivers/md/dm-*.ko
  194. AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt)
  195. endef
  196. define KernelPackage/dm/description
  197. Kernel module necessary for LVM2 support
  198. endef
  199. $(eval $(call KernelPackage,dm))
  200. define KernelPackage/md-mod
  201. SUBMENU:=$(BLOCK_MENU)
  202. TITLE:=MD RAID
  203. KCONFIG:= \
  204. CONFIG_MD=y \
  205. CONFIG_BLK_DEV_MD=m \
  206. CONFIG_MD_AUTODETECT=y \
  207. CONFIG_MD_FAULTY=n
  208. FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko
  209. AUTOLOAD:=$(call AutoLoad,27,md-mod)
  210. endef
  211. define KernelPackage/md-mod/description
  212. Kernel RAID md module (md-mod.ko).
  213. You will need to select at least one RAID level module below.
  214. endef
  215. $(eval $(call KernelPackage,md-mod))
  216. define KernelPackage/md/Depends
  217. SUBMENU:=$(BLOCK_MENU)
  218. DEPENDS:=kmod-md-mod $(1)
  219. endef
  220. define KernelPackage/md-linear
  221. $(call KernelPackage/md/Depends,)
  222. TITLE:=RAID Linear Module
  223. KCONFIG:=CONFIG_MD_LINEAR
  224. FILES:=$(LINUX_DIR)/drivers/md/linear.ko
  225. AUTOLOAD:=$(call AutoLoad,28,linear)
  226. endef
  227. define KernelPackage/md-linear/description
  228. RAID "Linear" or "Append" driver module (linear.ko)
  229. endef
  230. $(eval $(call KernelPackage,md-linear))
  231. define KernelPackage/md-raid0
  232. $(call KernelPackage/md/Depends,)
  233. TITLE:=RAID0 Module
  234. KCONFIG:=CONFIG_MD_RAID0
  235. FILES:=$(LINUX_DIR)/drivers/md/raid0.ko
  236. AUTOLOAD:=$(call AutoLoad,28,raid0)
  237. endef
  238. define KernelPackage/md-raid0/description
  239. RAID Level 0 (Striping) driver module (raid0.ko)
  240. endef
  241. $(eval $(call KernelPackage,md-raid0))
  242. define KernelPackage/md-raid1
  243. $(call KernelPackage/md/Depends,)
  244. TITLE:=RAID1 Module
  245. KCONFIG:=CONFIG_MD_RAID1
  246. FILES:=$(LINUX_DIR)/drivers/md/raid1.ko
  247. AUTOLOAD:=$(call AutoLoad,28,raid1)
  248. endef
  249. define KernelPackage/md-raid1/description
  250. RAID Level 1 (Mirroring) driver (raid1.ko)
  251. endef
  252. $(eval $(call KernelPackage,md-raid1))
  253. define KernelPackage/md-raid10
  254. $(call KernelPackage/md/Depends,)
  255. TITLE:=RAID10 Module
  256. KCONFIG:=CONFIG_MD_RAID10
  257. FILES:=$(LINUX_DIR)/drivers/md/raid10.ko
  258. AUTOLOAD:=$(call AutoLoad,28,raid10)
  259. endef
  260. define KernelPackage/md-raid10/description
  261. RAID Level 10 (Mirroring+Striping) driver module (raid10.ko)
  262. endef
  263. $(eval $(call KernelPackage,md-raid10))
  264. define KernelPackage/md-raid456
  265. $(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +LINUX_4_4:kmod-lib-crc32c)
  266. TITLE:=RAID Level 456 Driver
  267. KCONFIG:= \
  268. CONFIG_ASYNC_CORE \
  269. CONFIG_ASYNC_MEMCPY \
  270. CONFIG_ASYNC_XOR \
  271. CONFIG_ASYNC_PQ \
  272. CONFIG_ASYNC_RAID6_RECOV \
  273. CONFIG_ASYNC_RAID6_TEST=n \
  274. CONFIG_MD_RAID456 \
  275. CONFIG_MULTICORE_RAID456=n
  276. FILES:= \
  277. $(LINUX_DIR)/crypto/async_tx/async_tx.ko \
  278. $(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \
  279. $(LINUX_DIR)/crypto/async_tx/async_xor.ko \
  280. $(LINUX_DIR)/crypto/async_tx/async_pq.ko \
  281. $(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \
  282. $(LINUX_DIR)/drivers/md/raid456.ko
  283. AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456)
  284. endef
  285. define KernelPackage/md-raid456/description
  286. RAID Level 4,5,6 kernel module (raid456.ko)
  287. Includes the following modules required by
  288. raid456.ko:
  289. xor.ko
  290. async_tx.ko
  291. async_xor.ko
  292. async_memcpy.ko
  293. async_pq.ko
  294. async_raid5_recov.ko
  295. raid6_pq.ko
  296. endef
  297. $(eval $(call KernelPackage,md-raid456))
  298. define KernelPackage/md-multipath
  299. $(call KernelPackage/md/Depends,)
  300. TITLE:=MD Multipath Module
  301. KCONFIG:=CONFIG_MD_MULTIPATH
  302. FILES:=$(LINUX_DIR)/drivers/md/multipath.ko
  303. AUTOLOAD:=$(call AutoLoad,29,multipath)
  304. endef
  305. define KernelPackage/md-multipath/description
  306. Multipath driver module (multipath.ko)
  307. endef
  308. $(eval $(call KernelPackage,md-multipath))
  309. define KernelPackage/libsas
  310. SUBMENU:=$(BLOCK_MENU)
  311. DEPENDS:=@TARGET_x86
  312. TITLE:=SAS Domain Transport Attributes
  313. KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
  314. CONFIG_SCSI_SAS_ATTRS \
  315. CONFIG_SCSI_SAS_ATA=y \
  316. CONFIG_SCSI_SAS_HOST_SMP=y \
  317. CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
  318. FILES:= \
  319. $(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \
  320. $(LINUX_DIR)/drivers/scsi/libsas/libsas.ko
  321. AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
  322. endef
  323. define KernelPackage/libsas/description
  324. SAS Domain Transport Attributes support
  325. endef
  326. $(eval $(call KernelPackage,libsas,1))
  327. define KernelPackage/loop
  328. SUBMENU:=$(BLOCK_MENU)
  329. TITLE:=Loopback device support
  330. KCONFIG:= \
  331. CONFIG_BLK_DEV_LOOP \
  332. CONFIG_BLK_DEV_CRYPTOLOOP=n
  333. FILES:=$(LINUX_DIR)/drivers/block/loop.ko
  334. AUTOLOAD:=$(call AutoLoad,30,loop)
  335. endef
  336. define KernelPackage/loop/description
  337. Kernel module for loopback device support
  338. endef
  339. $(eval $(call KernelPackage,loop))
  340. define KernelPackage/mvsas
  341. SUBMENU:=$(BLOCK_MENU)
  342. TITLE:=Marvell 88SE6440 SAS/SATA driver
  343. DEPENDS:=@TARGET_x86 +kmod-libsas
  344. KCONFIG:= \
  345. CONFIG_SCSI_MVSAS \
  346. CONFIG_SCSI_MVSAS_TASKLET=n
  347. FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko
  348. AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
  349. endef
  350. define KernelPackage/mvsas/description
  351. Kernel support for the Marvell SAS SCSI adapters
  352. endef
  353. $(eval $(call KernelPackage,mvsas))
  354. define KernelPackage/nbd
  355. SUBMENU:=$(BLOCK_MENU)
  356. TITLE:=Network block device support
  357. KCONFIG:=CONFIG_BLK_DEV_NBD
  358. FILES:=$(LINUX_DIR)/drivers/block/nbd.ko
  359. AUTOLOAD:=$(call AutoLoad,30,nbd)
  360. endef
  361. define KernelPackage/nbd/description
  362. Kernel module for network block device support
  363. endef
  364. $(eval $(call KernelPackage,nbd))
  365. define KernelPackage/scsi-core
  366. SUBMENU:=$(BLOCK_MENU)
  367. TITLE:=SCSI device support
  368. KCONFIG:= \
  369. CONFIG_SCSI \
  370. CONFIG_BLK_DEV_SD
  371. FILES:= \
  372. $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \
  373. $(LINUX_DIR)/drivers/scsi/sd_mod.ko
  374. AUTOLOAD:=$(call AutoLoad,40,scsi_mod sd_mod,1)
  375. endef
  376. $(eval $(call KernelPackage,scsi-core))
  377. define KernelPackage/scsi-generic
  378. SUBMENU:=$(BLOCK_MENU)
  379. TITLE:=Kernel support for SCSI generic
  380. DEPENDS:=+kmod-scsi-core
  381. KCONFIG:= \
  382. CONFIG_CHR_DEV_SG
  383. FILES:= \
  384. $(LINUX_DIR)/drivers/scsi/sg.ko
  385. AUTOLOAD:=$(call AutoLoad,65,sg)
  386. endef
  387. $(eval $(call KernelPackage,scsi-generic))
  388. define KernelPackage/scsi-cdrom
  389. SUBMENU:=$(BLOCK_MENU)
  390. TITLE:=Kernel support for CD / DVD drives
  391. DEPENDS:=+kmod-scsi-core
  392. KCONFIG:= \
  393. CONFIG_BLK_DEV_SR \
  394. CONFIG_BLK_DEV_SR_VENDOR=n
  395. FILES:= \
  396. $(LINUX_DIR)/drivers/cdrom/cdrom.ko \
  397. $(LINUX_DIR)/drivers/scsi/sr_mod.ko
  398. AUTOLOAD:=$(call AutoLoad,45,sr_mod)
  399. endef
  400. $(eval $(call KernelPackage,scsi-cdrom))
  401. define KernelPackage/scsi-tape
  402. SUBMENU:=$(BLOCK_MENU)
  403. TITLE:=Kernel support for scsi tape drives
  404. DEPENDS:=+kmod-scsi-core
  405. KCONFIG:= \
  406. CONFIG_CHR_DEV_ST
  407. FILES:= \
  408. $(LINUX_DIR)/drivers/scsi/st.ko
  409. AUTOLOAD:=$(call AutoLoad,45,st)
  410. endef
  411. $(eval $(call KernelPackage,scsi-tape))