block.mk 12 KB

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