kernel: crypto: fix spelling
[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))))
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)
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-wq
66 TITLE:=CryptoAPI work queue handling
67 KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
68 FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
69 AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
70 $(call AddDepends/crypto)
71 endef
72 $(eval $(call KernelPackage,crypto-wq))
73
74 define KernelPackage/crypto-rng
75 TITLE:=CryptoAPI random number generation
76 KCONFIG:=CONFIG_CRYPTO_RNG2
77 FILES:= \
78 $(LINUX_DIR)/crypto/rng.ko \
79 $(LINUX_DIR)/crypto/krng.ko
80 AUTOLOAD:=$(call AutoLoad,09,rng krng)
81 $(call AddDepends/crypto)
82 endef
83 $(eval $(call KernelPackage,crypto-rng))
84
85 define KernelPackage/crypto-iv
86 TITLE:=CryptoAPI initialization vectors
87 DEPENDS:=+kmod-crypto-manager +kmod-crypto-rng +kmod-crypto-wq
88 KCONFIG:= CONFIG_CRYPTO_BLKCIPHER2
89 FILES:= \
90 $(LINUX_DIR)/crypto/eseqiv.ko \
91 $(LINUX_DIR)/crypto/chainiv.ko
92 AUTOLOAD:=$(call AutoLoad,10,eseqiv chainiv)
93 $(call AddDepends/crypto)
94 endef
95 $(eval $(call KernelPackage,crypto-iv))
96
97 define KernelPackage/crypto-hw-padlock
98 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
99 DEPENDS:=+kmod-crypto-aes
100 KCONFIG:= \
101 CONFIG_CRYPTO_DEV_PADLOCK \
102 CONFIG_CRYPTO_DEV_PADLOCK_AES \
103 CONFIG_CRYPTO_DEV_PADLOCK_SHA
104 FILES:= \
105 $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
106 $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
107 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
108 $(call AddDepends/crypto)
109 endef
110
111 $(eval $(call KernelPackage,crypto-hw-padlock))
112
113
114 define KernelPackage/crypto-hw-geode
115 TITLE:=AMD Geode hardware crypto module
116 KCONFIG:= \
117 CONFIG_CRYPTO_DEV_GEODE
118 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
119 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
120 $(call AddDepends/crypto)
121 endef
122
123 $(eval $(call KernelPackage,crypto-hw-geode))
124
125
126 define KernelPackage/crypto-hw-hifn-795x
127 TITLE:=HIFN 795x crypto accelerator
128 DEPENDS:=@!TARGET_ubicom32
129 KCONFIG:= \
130 CONFIG_HW_RANDOM=y \
131 CONFIG_CRYPTO_DEV_HIFN_795X \
132 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
133 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
134 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
135 $(call AddDepends/crypto,+kmod-crypto-des)
136 endef
137
138 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
139
140
141 define KernelPackage/crypto-hw-ixp4xx
142 TITLE:=Intel IXP4xx hardware crypto module
143 DEPENDS:=@TARGET_ixp4xx
144 KCONFIG:= \
145 CONFIG_CRYPTO_DEV_IXP4XX
146 FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko
147 AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
148 $(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des)
149 endef
150
151 define KernelPackage/crypto-hw-ixp4xx/description
152 Kernel support for the Intel IXP4xx HW crypto engine.
153 endef
154
155 $(eval $(call KernelPackage,crypto-hw-ixp4xx))
156
157
158 define KernelPackage/crypto-hw-ppc4xx
159 TITLE:=AMCC PPC4xx hardware crypto module
160 DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
161 KCONFIG:= \
162 CONFIG_CRYPTO_DEV_PPC4XX
163 FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
164 AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
165 $(call AddDepends/crypto)
166 endef
167
168 define KernelPackage/crypto-hw-ppc4xx/description
169 Kernel support for the AMCC PPC4xx HW crypto engine.
170 endef
171
172 $(eval $(call KernelPackage,crypto-hw-ppc4xx))
173
174
175 define KernelPackage/crypto-aes
176 TITLE:=AES cipher CryptoAPI module
177 KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
178 FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
179 AUTOLOAD:=$(call AutoLoad,09,aes_generic)
180 $(call AddDepends/crypto)
181 endef
182
183 define KernelPackage/crypto-aes/x86
184 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
185 AUTOLOAD:=$(call AutoLoad,09,aes_generic aes-i586)
186 endef
187
188 $(eval $(call KernelPackage,crypto-aes))
189
190
191 define KernelPackage/crypto-arc4
192 TITLE:=ARC4 (RC4) cipher CryptoAPI module
193 KCONFIG:=CONFIG_CRYPTO_ARC4
194 FILES:=$(LINUX_DIR)/crypto/arc4.ko
195 AUTOLOAD:=$(call AutoLoad,09,arc4)
196 $(call AddDepends/crypto)
197 endef
198
199 $(eval $(call KernelPackage,crypto-arc4))
200
201
202 define KernelPackage/crypto-authenc
203 TITLE:=Combined mode wrapper for IPsec
204 DEPENDS:=+kmod-crypto-manager
205 KCONFIG:=CONFIG_CRYPTO_AUTHENC
206 FILES:=$(LINUX_DIR)/crypto/authenc.ko
207 AUTOLOAD:=$(call AutoLoad,09,authenc)
208 $(call AddDepends/crypto)
209 endef
210
211 $(eval $(call KernelPackage,crypto-authenc))
212
213 define KernelPackage/crypto-cbc
214 TITLE:=Cipher Block Chaining CryptoAPI module
215 DEPENDS:=+kmod-crypto-manager
216 KCONFIG:=CONFIG_CRYPTO_CBC
217 FILES:=$(LINUX_DIR)/crypto/cbc.ko
218 AUTOLOAD:=$(call AutoLoad,09,cbc)
219 $(call AddDepends/crypto)
220 endef
221
222 $(eval $(call KernelPackage,crypto-cbc))
223
224 define KernelPackage/crypto-des
225 TITLE:=DES/3DES cipher CryptoAPI module
226 KCONFIG:=CONFIG_CRYPTO_DES
227 FILES:=$(LINUX_DIR)/crypto/des_generic.ko
228 AUTOLOAD:=$(call AutoLoad,09,des_generic)
229 $(call AddDepends/crypto)
230 endef
231
232 $(eval $(call KernelPackage,crypto-des))
233
234 define KernelPackage/crypto-deflate
235 TITLE:=Deflate compression CryptoAPI module
236 DEPENDS:=+kmod-zlib
237 KCONFIG:=CONFIG_CRYPTO_DEFLATE
238 FILES:=$(LINUX_DIR)/crypto/deflate.ko
239 AUTOLOAD:=$(call AutoLoad,09,deflate)
240 $(call AddDepends/crypto)
241 endef
242
243 $(eval $(call KernelPackage,crypto-deflate))
244
245 define KernelPackage/crypto-ecb
246 TITLE:=Electronic CodeBook CryptoAPI module
247 DEPENDS:=+kmod-crypto-manager
248 KCONFIG:=CONFIG_CRYPTO_ECB
249 FILES:=$(LINUX_DIR)/crypto/ecb.ko
250 AUTOLOAD:=$(call AutoLoad,09,ecb)
251 $(call AddDepends/crypto)
252 endef
253
254 $(eval $(call KernelPackage,crypto-ecb))
255
256
257 define KernelPackage/crypto-hmac
258 TITLE:=HMAC digest CryptoAPI module
259 DEPENDS:=+kmod-crypto-hash
260 KCONFIG:=CONFIG_CRYPTO_HMAC
261 FILES:=$(LINUX_DIR)/crypto/hmac.ko
262 DEPENDS:=+kmod-crypto-manager
263 AUTOLOAD:=$(call AutoLoad,09,hmac)
264 $(call AddDepends/crypto)
265 endef
266
267 $(eval $(call KernelPackage,crypto-hmac))
268
269
270 define KernelPackage/crypto-md5
271 TITLE:=MD5 digest CryptoAPI module
272 DEPENDS:=+kmod-crypto-hash
273 KCONFIG:=CONFIG_CRYPTO_MD5
274 FILES:=$(LINUX_DIR)/crypto/md5.ko
275 AUTOLOAD:=$(call AutoLoad,09,md5)
276 $(call AddDepends/crypto)
277 endef
278
279 $(eval $(call KernelPackage,crypto-md5))
280
281
282 define KernelPackage/crypto-michael-mic
283 TITLE:=Michael MIC keyed digest CryptoAPI module
284 DEPENDS:=+kmod-crypto-hash
285 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
286 FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
287 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
288 $(call AddDepends/crypto)
289 endef
290
291 $(eval $(call KernelPackage,crypto-michael-mic))
292
293
294 define KernelPackage/crypto-sha1
295 TITLE:=SHA1 digest CryptoAPI module
296 DEPENDS:=+kmod-crypto-hash
297 KCONFIG:=CONFIG_CRYPTO_SHA1
298 FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
299 AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
300 $(call AddDepends/crypto)
301 endef
302
303 $(eval $(call KernelPackage,crypto-sha1))
304
305
306 define KernelPackage/crypto-misc
307 TITLE:=Other CryptoAPI modules
308 DEPENDS:=+kmod-crypto-manager
309 KCONFIG:= \
310 CONFIG_CRYPTO_ANUBIS \
311 CONFIG_CRYPTO_BLOWFISH \
312 CONFIG_CRYPTO_CAMELLIA \
313 CONFIG_CRYPTO_CAST5 \
314 CONFIG_CRYPTO_CAST6 \
315 CONFIG_CRYPTO_CRC32C \
316 CONFIG_CRYPTO_FCRYPT \
317 CONFIG_CRYPTO_KHAZAD \
318 CONFIG_CRYPTO_MD4 \
319 CONFIG_CRYPTO_SERPENT \
320 CONFIG_CRYPTO_SHA256 \
321 CONFIG_CRYPTO_SHA512 \
322 CONFIG_CRYPTO_TEA \
323 CONFIG_CRYPTO_TGR192 \
324 CONFIG_CRYPTO_TWOFISH \
325 CONFIG_CRYPTO_TWOFISH_COMMON \
326 CONFIG_CRYPTO_TWOFISH_586 \
327 CONFIG_CRYPTO_WP512
328 FILES:= \
329 $(LINUX_DIR)/crypto/anubis.ko \
330 $(LINUX_DIR)/crypto/blowfish.ko \
331 $(LINUX_DIR)/crypto/camellia.ko \
332 $(LINUX_DIR)/crypto/cast5.ko \
333 $(LINUX_DIR)/crypto/cast6.ko \
334 $(if $(findstring y,$(CONFIG_CRYPTO_CRC32C)),,$(LINUX_DIR)/crypto/crc32c.ko) \
335 $(LINUX_DIR)/crypto/fcrypt.ko \
336 $(LINUX_DIR)/crypto/khazad.ko \
337 $(LINUX_DIR)/crypto/md4.ko \
338 $(LINUX_DIR)/crypto/serpent.ko \
339 $(LINUX_DIR)/crypto/sha256_generic.ko \
340 $(LINUX_DIR)/crypto/sha512_generic.ko \
341 $(LINUX_DIR)/crypto/tea.ko \
342 $(LINUX_DIR)/crypto/tgr192.ko \
343 $(LINUX_DIR)/crypto/twofish_common.ko \
344 $(LINUX_DIR)/crypto/wp512.ko
345 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.35)),1)
346 FILES += $(LINUX_DIR)/crypto/twofish.ko
347 else
348 FILES += $(LINUX_DIR)/crypto/twofish_generic.ko
349 endif
350 $(call AddDepends/crypto)
351 endef
352
353
354 define KernelPackage/crypto-misc/x86
355 FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
356 endef
357
358 $(eval $(call KernelPackage,crypto-misc))
359
360
361 define KernelPackage/crypto-ocf
362 TITLE:=OCF modules
363 DEPENDS:=+@OPENSSL_ENGINE @!TARGET_uml +kmod-crypto-manager
364 KCONFIG:= \
365 CONFIG_OCF_OCF \
366 CONFIG_OCF_CRYPTODEV \
367 CONFIG_OCF_CRYPTOSOFT \
368 CONFIG_OCF_FIPS=y \
369 CONFIG_OCF_RANDOMHARVEST=y
370 FILES:= \
371 $(LINUX_DIR)/crypto/ocf/ocf.ko \
372 $(LINUX_DIR)/crypto/ocf/cryptodev.ko \
373 $(LINUX_DIR)/crypto/ocf/cryptosoft.ko
374 AUTOLOAD:=$(call AutoLoad,09, \
375 ocf \
376 cryptodev \
377 cryptosoft \
378 )
379 $(call AddDepends/crypto)
380 endef
381
382 $(eval $(call KernelPackage,crypto-ocf))
383
384
385 define KernelPackage/crypto-ocf-hifn7751
386 TITLE:=OCF support for Hifn 6500/7751/7811/795x, Invertex AEON and NetSec 7751 devices
387 DEPENDS:=+@OPENSSL_ENGINE @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
388 KCONFIG:=CONFIG_OCF_HIFN
389 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifn7751.ko
390 AUTOLOAD:=$(call AutoLoad,10,hifn7751)
391 $(call AddDepends/crypto)
392 endef
393
394 $(eval $(call KernelPackage,crypto-ocf-hifn7751))
395
396
397 define KernelPackage/crypto-ocf-hifnhipp
398 TITLE:=OCF support for Hifn 7855/8155 devices
399 DEPENDS:=+@OPENSSL_ENGINE @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
400 KCONFIG:=CONFIG_OCF_HIFNHIPP
401 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifnHIPP.ko
402 AUTOLOAD:=$(call AutoLoad,10,hifnHIPP)
403 $(call AddDepends/crypto)
404 endef
405
406 $(eval $(call KernelPackage,crypto-ocf-hifnhipp))
407
408
409 define KernelPackage/crypto-null
410 TITLE:=Null CryptoAPI module
411 KCONFIG:=CONFIG_CRYPTO_NULL
412 FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
413 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
414 $(call AddDepends/crypto)
415 endef
416
417 $(eval $(call KernelPackage,crypto-null))
418
419
420 define KernelPackage/crypto-test
421 TITLE:=Test CryptoAPI module
422 KCONFIG:=CONFIG_CRYPTO_TEST
423 FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
424 $(call AddDepends/crypto)
425 endef
426
427 $(eval $(call KernelPackage,crypto-test))
428
429
430 define KernelPackage/crypto-xts
431 TITLE:=XTS cipher CryptoAPI module
432 DEPENDS:=+kmod-crypto-manager
433 KCONFIG:= \
434 CONFIG_CRYPTO_GF128MUL \
435 CONFIG_CRYPTO_XTS
436 FILES:= \
437 $(LINUX_DIR)/crypto/xts.ko \
438 $(LINUX_DIR)/crypto/gf128mul.ko
439 AUTOLOAD:=$(call AutoLoad,09, \
440 gf128mul \
441 xts \
442 )
443 $(call AddDepends/crypto)
444 endef
445
446 $(eval $(call KernelPackage,crypto-xts))
447
448 define KernelPackage/crypto-mv-cesa
449 TITLE:=Marvell crypto engine
450 DEPENDS:=+kmod-crypto-manager +kmod-crypto-aes @TARGET_kirkwood||TARGET_orion
451 KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
452 FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
453 AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
454 $(call AddDepends/crypto)
455 endef
456
457 $(eval $(call KernelPackage,crypto-mv-cesa))
458
459
460 define KernelPackage/ocf-ubsec-ssb
461 TITLE:=BCM5365P IPSec Core driver
462 DEPENDS:=@TARGET_brcm47xx +kmod-crypto-ocf
463 KCONFIG:=CONFIG_OCF_UBSEC_SSB
464 FILES:=$(LINUX_DIR)/crypto/ocf/ubsec_ssb/ubsec_ssb.ko
465 AUTOLOAD:=$(call AutoLoad,10,ubsec_ssb)
466 $(call AddDepends/crypto)
467 endef
468
469 define KernelPackage/ocf-ubsec-ssb/description
470 This package contains the OCF driver for the BCM5365p IPSec Core
471 endef
472
473 $(eval $(call KernelPackage,ocf-ubsec-ssb))