[ixp4xx] move crypto module to target specific modules.mk
[openwrt/svn-archive/archive.git] / package / kernel / modules / crypto.mk
1 #
2 # Copyright (C) 2006-2011 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 CRYPTO_MENU:=Cryptographic API modules
9
10 CRYPTO_MODULES = ALGAPI2=crypto_algapi
11
12 CRYPTOMGR_MODULES = \
13 AEAD2=aead \
14 MANAGER2=cryptomgr \
15 BLKCIPHER2=crypto_blkcipher
16
17 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
18 crypto_file=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko)
19 crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
20
21 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
22 # always set, even if no hash modules are selected
23 define KernelPackage/crypto-core
24 SUBMENU:=$(CRYPTO_MENU)
25 TITLE:=Core CryptoAPI modules
26 KCONFIG:= \
27 CONFIG_CRYPTO=y \
28 CONFIG_CRYPTO_HW=y \
29 CONFIG_CRYPTO_ALGAPI \
30 $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
31 FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
32 AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call crypto_name,$(mod))),1)
33 endef
34 $(eval $(call KernelPackage,crypto-core))
35
36
37 define AddDepends/crypto
38 SUBMENU:=$(CRYPTO_MENU)
39 DEPENDS+=kmod-crypto-core $(1)
40 endef
41
42 define KernelPackage/crypto-hash
43 TITLE:=CryptoAPI hash support
44 KCONFIG:=CONFIG_CRYPTO_HASH2
45 FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
46 AUTOLOAD:=$(call AutoLoad,02,crypto_hash,1)
47 $(call AddDepends/crypto)
48 endef
49 $(eval $(call KernelPackage,crypto-hash))
50
51 define KernelPackage/crypto-manager
52 TITLE:=CryptoAPI algorithm manager
53 DEPENDS:=+kmod-crypto-hash
54 KCONFIG:= \
55 CONFIG_CRYPTO_AEAD \
56 CONFIG_CRYPTO_BLKCIPHER \
57 CONFIG_CRYPTO_MANAGER \
58 $(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
59 FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
60 AUTOLOAD:=$(call AutoLoad,03,$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_name,$(mod))))
61 $(call AddDepends/crypto)
62 endef
63 $(eval $(call KernelPackage,crypto-manager))
64
65 define KernelPackage/crypto-user
66 TITLE:=CryptoAPI userspace interface
67 DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
68 KCONFIG:= \
69 CONFIG_CRYPTO_USER_API \
70 CONFIG_CRYPTO_USER_API_HASH \
71 CONFIG_CRYPTO_USER_API_SKCIPHER
72 FILES:= \
73 $(LINUX_DIR)/crypto/af_alg.ko \
74 $(LINUX_DIR)/crypto/algif_hash.ko \
75 $(LINUX_DIR)/crypto/algif_skcipher.ko
76 AUTOLOAD:=$(call AutoLoad,09,af_alg algif_hash algif_skcipher)
77 $(call AddDepends/crypto)
78 endef
79 $(eval $(call KernelPackage,crypto-user))
80
81 define KernelPackage/crypto-wq
82 TITLE:=CryptoAPI work queue handling
83 KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
84 FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
85 AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
86 $(call AddDepends/crypto)
87 endef
88 $(eval $(call KernelPackage,crypto-wq))
89
90 define KernelPackage/crypto-rng
91 TITLE:=CryptoAPI random number generation
92 KCONFIG:=CONFIG_CRYPTO_RNG2
93 FILES:= \
94 $(LINUX_DIR)/crypto/rng.ko \
95 $(LINUX_DIR)/crypto/krng.ko
96 AUTOLOAD:=$(call AutoLoad,09,rng krng)
97 $(call AddDepends/crypto)
98 endef
99 $(eval $(call KernelPackage,crypto-rng))
100
101 define KernelPackage/crypto-iv
102 TITLE:=CryptoAPI initialization vectors
103 DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
104 KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
105 FILES:= \
106 $(LINUX_DIR)/crypto/eseqiv.ko \
107 $(LINUX_DIR)/crypto/chainiv.ko
108 AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
109 $(call AddDepends/crypto)
110 endef
111 $(eval $(call KernelPackage,crypto-iv))
112
113 define KernelPackage/crypto-hw-padlock
114 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
115 DEPENDS:=+kmod-crypto-aes
116 KCONFIG:= \
117 CONFIG_CRYPTO_DEV_PADLOCK \
118 CONFIG_CRYPTO_DEV_PADLOCK_AES \
119 CONFIG_CRYPTO_DEV_PADLOCK_SHA
120 FILES:= \
121 $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
122 $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
123 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
124 $(call AddDepends/crypto)
125 endef
126
127 $(eval $(call KernelPackage,crypto-hw-padlock))
128
129
130 define KernelPackage/crypto-hw-geode
131 TITLE:=AMD Geode hardware crypto module
132 KCONFIG:= \
133 CONFIG_CRYPTO_DEV_GEODE
134 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
135 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
136 $(call AddDepends/crypto)
137 endef
138
139 $(eval $(call KernelPackage,crypto-hw-geode))
140
141
142 define KernelPackage/crypto-hw-hifn-795x
143 TITLE:=HIFN 795x crypto accelerator
144 DEPENDS:=@!TARGET_ubicom32
145 KCONFIG:= \
146 CONFIG_HW_RANDOM=y \
147 CONFIG_CRYPTO_DEV_HIFN_795X \
148 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
149 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
150 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
151 $(call AddDepends/crypto,+kmod-crypto-des)
152 endef
153
154 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
155
156
157 define KernelPackage/crypto-hw-ppc4xx
158 TITLE:=AMCC PPC4xx hardware crypto module
159 DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
160 KCONFIG:= \
161 CONFIG_CRYPTO_DEV_PPC4XX
162 FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
163 AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
164 $(call AddDepends/crypto)
165 endef
166
167 define KernelPackage/crypto-hw-ppc4xx/description
168 Kernel support for the AMCC PPC4xx HW crypto engine.
169 endef
170
171 $(eval $(call KernelPackage,crypto-hw-ppc4xx))
172
173
174 define KernelPackage/crypto-aes
175 TITLE:=AES cipher CryptoAPI module
176 KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
177 FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
178 AUTOLOAD:=$(call AutoLoad,09,aes_generic)
179 $(call AddDepends/crypto)
180 endef
181
182 define KernelPackage/crypto-aes/x86
183 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
184 AUTOLOAD:=$(call AutoLoad,09,aes_generic aes-i586)
185 endef
186
187 $(eval $(call KernelPackage,crypto-aes))
188
189
190 define KernelPackage/crypto-arc4
191 TITLE:=ARC4 (RC4) cipher CryptoAPI module
192 KCONFIG:=CONFIG_CRYPTO_ARC4
193 FILES:=$(LINUX_DIR)/crypto/arc4.ko
194 AUTOLOAD:=$(call AutoLoad,09,arc4)
195 $(call AddDepends/crypto)
196 endef
197
198 $(eval $(call KernelPackage,crypto-arc4))
199
200
201 define KernelPackage/crypto-authenc
202 TITLE:=Combined mode wrapper for IPsec
203 DEPENDS:=+kmod-crypto-manager
204 KCONFIG:=CONFIG_CRYPTO_AUTHENC
205 FILES:=$(LINUX_DIR)/crypto/authenc.ko
206 AUTOLOAD:=$(call AutoLoad,09,authenc)
207 $(call AddDepends/crypto)
208 endef
209
210 $(eval $(call KernelPackage,crypto-authenc))
211
212 define KernelPackage/crypto-cbc
213 TITLE:=Cipher Block Chaining CryptoAPI module
214 DEPENDS:=+kmod-crypto-manager
215 KCONFIG:=CONFIG_CRYPTO_CBC
216 FILES:=$(LINUX_DIR)/crypto/cbc.ko
217 AUTOLOAD:=$(call AutoLoad,09,cbc)
218 $(call AddDepends/crypto)
219 endef
220
221 $(eval $(call KernelPackage,crypto-cbc))
222
223 define KernelPackage/crypto-crc32c
224 TITLE:=CRC32c CRC module
225 DEPENDS:=+kmod-crypto-hash
226 KCONFIG:=CONFIG_CRYPTO_CRC32C
227 FILES:=$(LINUX_DIR)/crypto/crc32c.ko
228 AUTOLOAD:=$(call AutoLoad,04,crc32c,1)
229 $(call AddDepends/crypto)
230 endef
231
232 $(eval $(call KernelPackage,crypto-crc32c))
233
234 define KernelPackage/crypto-des
235 TITLE:=DES/3DES cipher CryptoAPI module
236 KCONFIG:=CONFIG_CRYPTO_DES
237 FILES:=$(LINUX_DIR)/crypto/des_generic.ko
238 AUTOLOAD:=$(call AutoLoad,09,des_generic)
239 $(call AddDepends/crypto)
240 endef
241
242 $(eval $(call KernelPackage,crypto-des))
243
244 define KernelPackage/crypto-deflate
245 TITLE:=Deflate compression CryptoAPI module
246 DEPENDS:=+kmod-lib-zlib
247 KCONFIG:=CONFIG_CRYPTO_DEFLATE
248 FILES:=$(LINUX_DIR)/crypto/deflate.ko
249 AUTOLOAD:=$(call AutoLoad,09,deflate)
250 $(call AddDepends/crypto)
251 endef
252
253 $(eval $(call KernelPackage,crypto-deflate))
254
255 define KernelPackage/crypto-ecb
256 TITLE:=Electronic CodeBook CryptoAPI module
257 DEPENDS:=+kmod-crypto-manager
258 KCONFIG:=CONFIG_CRYPTO_ECB
259 FILES:=$(LINUX_DIR)/crypto/ecb.ko
260 AUTOLOAD:=$(call AutoLoad,09,ecb)
261 $(call AddDepends/crypto)
262 endef
263
264 $(eval $(call KernelPackage,crypto-ecb))
265
266
267 define KernelPackage/crypto-hmac
268 TITLE:=HMAC digest CryptoAPI module
269 DEPENDS:=+kmod-crypto-hash
270 KCONFIG:=CONFIG_CRYPTO_HMAC
271 FILES:=$(LINUX_DIR)/crypto/hmac.ko
272 DEPENDS:=+kmod-crypto-manager
273 AUTOLOAD:=$(call AutoLoad,09,hmac)
274 $(call AddDepends/crypto)
275 endef
276
277 $(eval $(call KernelPackage,crypto-hmac))
278
279
280 define KernelPackage/crypto-md4
281 TITLE:=MD4 digest CryptoAPI module
282 DEPENDS:=+kmod-crypto-hash
283 KCONFIG:=CONFIG_CRYPTO_MD4
284 FILES:=$(LINUX_DIR)/crypto/md4.ko
285 AUTOLOAD:=$(call AutoLoad,09,md4)
286 $(call AddDepends/crypto)
287 endef
288
289 $(eval $(call KernelPackage,crypto-md4))
290
291
292 define KernelPackage/crypto-md5
293 TITLE:=MD5 digest CryptoAPI module
294 DEPENDS:=+kmod-crypto-hash
295 KCONFIG:=CONFIG_CRYPTO_MD5
296 FILES:=$(LINUX_DIR)/crypto/md5.ko
297 AUTOLOAD:=$(call AutoLoad,09,md5)
298 $(call AddDepends/crypto)
299 endef
300
301 $(eval $(call KernelPackage,crypto-md5))
302
303
304 define KernelPackage/crypto-michael-mic
305 TITLE:=Michael MIC keyed digest CryptoAPI module
306 DEPENDS:=+kmod-crypto-hash
307 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
308 FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
309 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
310 $(call AddDepends/crypto)
311 endef
312
313 $(eval $(call KernelPackage,crypto-michael-mic))
314
315
316 define KernelPackage/crypto-sha1
317 TITLE:=SHA1 digest CryptoAPI module
318 DEPENDS:=+kmod-crypto-hash
319 KCONFIG:=CONFIG_CRYPTO_SHA1
320 FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
321 AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
322 $(call AddDepends/crypto)
323 endef
324
325 $(eval $(call KernelPackage,crypto-sha1))
326
327
328 define KernelPackage/crypto-misc
329 TITLE:=Other CryptoAPI modules
330 DEPENDS:=+kmod-crypto-manager
331 KCONFIG:= \
332 CONFIG_CRYPTO_ANUBIS \
333 CONFIG_CRYPTO_BLOWFISH \
334 CONFIG_CRYPTO_CAMELLIA \
335 CONFIG_CRYPTO_CAST5 \
336 CONFIG_CRYPTO_CAST6 \
337 CONFIG_CRYPTO_FCRYPT \
338 CONFIG_CRYPTO_KHAZAD \
339 CONFIG_CRYPTO_SERPENT \
340 CONFIG_CRYPTO_SHA256 \
341 CONFIG_CRYPTO_SHA512 \
342 CONFIG_CRYPTO_TEA \
343 CONFIG_CRYPTO_TGR192 \
344 CONFIG_CRYPTO_TWOFISH \
345 CONFIG_CRYPTO_TWOFISH_COMMON \
346 CONFIG_CRYPTO_TWOFISH_586 \
347 CONFIG_CRYPTO_WP512
348 FILES:= \
349 $(LINUX_DIR)/crypto/anubis.ko \
350 $(LINUX_DIR)/crypto/camellia.ko \
351 $(LINUX_DIR)/crypto/cast5.ko \
352 $(LINUX_DIR)/crypto/cast6.ko \
353 $(LINUX_DIR)/crypto/fcrypt.ko \
354 $(LINUX_DIR)/crypto/khazad.ko \
355 $(LINUX_DIR)/crypto/sha256_generic.ko \
356 $(LINUX_DIR)/crypto/sha512_generic.ko \
357 $(LINUX_DIR)/crypto/tea.ko \
358 $(LINUX_DIR)/crypto/tgr192.ko \
359 $(LINUX_DIR)/crypto/twofish_common.ko \
360 $(LINUX_DIR)/crypto/wp512.ko \
361 $(LINUX_DIR)/crypto/twofish_generic.ko
362 FILES += \
363 $(LINUX_DIR)/crypto/blowfish_common.ko \
364 $(LINUX_DIR)/crypto/blowfish_generic.ko \
365 $(LINUX_DIR)/crypto/serpent_generic.ko
366 $(call AddDepends/crypto)
367 endef
368
369
370 define KernelPackage/crypto-misc/x86
371 FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
372 endef
373
374 $(eval $(call KernelPackage,crypto-misc))
375
376
377 define KernelPackage/crypto-ocf
378 TITLE:=OCF modules
379 DEPENDS:=+@OPENSSL_ENGINE_CRYPTO @!TARGET_uml +kmod-crypto-manager
380 KCONFIG:= \
381 CONFIG_OCF_OCF \
382 CONFIG_OCF_CRYPTODEV \
383 CONFIG_OCF_CRYPTOSOFT \
384 CONFIG_OCF_FIPS=y \
385 CONFIG_OCF_RANDOMHARVEST=y
386 FILES:= \
387 $(LINUX_DIR)/crypto/ocf/ocf.ko \
388 $(LINUX_DIR)/crypto/ocf/cryptodev.ko \
389 $(LINUX_DIR)/crypto/ocf/cryptosoft.ko
390 AUTOLOAD:=$(call AutoLoad,09, \
391 ocf \
392 cryptodev \
393 cryptosoft \
394 )
395 $(call AddDepends/crypto)
396 endef
397
398 $(eval $(call KernelPackage,crypto-ocf))
399
400
401 define KernelPackage/crypto-ocf-hifn7751
402 TITLE:=OCF support for Hifn 6500/7751/7811/795x, Invertex AEON and NetSec 7751 devices
403 DEPENDS:=+@OPENSSL_ENGINE_CRYPTO @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
404 KCONFIG:=CONFIG_OCF_HIFN
405 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifn7751.ko
406 AUTOLOAD:=$(call AutoLoad,10,hifn7751)
407 $(call AddDepends/crypto)
408 endef
409
410 $(eval $(call KernelPackage,crypto-ocf-hifn7751))
411
412
413 define KernelPackage/crypto-ocf-hifnhipp
414 TITLE:=OCF support for Hifn 7855/8155 devices
415 DEPENDS:=+@OPENSSL_ENGINE_CRYPTO @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
416 KCONFIG:=CONFIG_OCF_HIFNHIPP
417 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifnHIPP.ko
418 AUTOLOAD:=$(call AutoLoad,10,hifnHIPP)
419 $(call AddDepends/crypto)
420 endef
421
422 $(eval $(call KernelPackage,crypto-ocf-hifnhipp))
423
424
425 define KernelPackage/crypto-null
426 TITLE:=Null CryptoAPI module
427 KCONFIG:=CONFIG_CRYPTO_NULL
428 FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
429 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
430 $(call AddDepends/crypto)
431 endef
432
433 $(eval $(call KernelPackage,crypto-null))
434
435
436 define KernelPackage/crypto-test
437 TITLE:=Test CryptoAPI module
438 KCONFIG:=CONFIG_CRYPTO_TEST
439 FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
440 $(call AddDepends/crypto)
441 endef
442
443 $(eval $(call KernelPackage,crypto-test))
444
445
446 define KernelPackage/crypto-xts
447 TITLE:=XTS cipher CryptoAPI module
448 DEPENDS:=+kmod-crypto-manager
449 KCONFIG:= \
450 CONFIG_CRYPTO_GF128MUL \
451 CONFIG_CRYPTO_XTS
452 FILES:= \
453 $(LINUX_DIR)/crypto/xts.ko \
454 $(LINUX_DIR)/crypto/gf128mul.ko
455 AUTOLOAD:=$(call AutoLoad,09, \
456 gf128mul \
457 xts \
458 )
459 $(call AddDepends/crypto)
460 endef
461
462 $(eval $(call KernelPackage,crypto-xts))
463
464 define KernelPackage/crypto-mv-cesa
465 TITLE:=Marvell crypto engine
466 DEPENDS:=+kmod-crypto-manager +kmod-crypto-aes @TARGET_kirkwood||TARGET_orion
467 KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
468 FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
469 AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
470 $(call AddDepends/crypto)
471 endef
472
473 $(eval $(call KernelPackage,crypto-mv-cesa))
474
475
476 define KernelPackage/ocf-ubsec-ssb
477 TITLE:=BCM5365P IPSec Core driver
478 DEPENDS:=@TARGET_brcm47xx +kmod-crypto-ocf
479 KCONFIG:=CONFIG_OCF_UBSEC_SSB
480 FILES:=$(LINUX_DIR)/crypto/ocf/ubsec_ssb/ubsec_ssb.ko
481 AUTOLOAD:=$(call AutoLoad,10,ubsec_ssb)
482 $(call AddDepends/crypto)
483 endef
484
485 define KernelPackage/ocf-ubsec-ssb/description
486 This package contains the OCF driver for the BCM5365p IPSec Core
487 endef
488
489 $(eval $(call KernelPackage,ocf-ubsec-ssb))