the in-kernel driver should work flawlessly for some time now
[openwrt.git] / package / kernel / modules / crypto.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 CRYPTO_MENU:=Cryptographic API modules
9
10 # XXX: added workarounds for modules renamed in 2.6 series:
11 # - aes > aes_generic (2.6.24)
12 # - blkcipher -> crypto_blkcipher (2.6.25)
13 # - des > des_generic (2.6.24)
14 # - sha1 > sha1_generic (2.6.24)
15 # - sha256 > sha256_generic (2.6.24)
16 # - sha512 > sha512_generic (2.6.26)
17 CRYPTO_GENERIC:=_generic
18 AES_SUFFIX:=$(CRYPTO_GENERIC)
19 DES_SUFFIX:=$(CRYPTO_GENERIC)
20 SHA1_SUFFIX:=$(CRYPTO_GENERIC)
21 SHA256_SUFFIX:=$(CRYPTO_GENERIC)
22 SHA512_SUFFIX:=$(CRYPTO_GENERIC)
23
24 CRYPTO_MODULES = \
25 ALGAPI2=crypto_algapi \
26 AEAD2=aead \
27 $(if $(filter 1,$(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.36)),PCOMP2,PCOMP)=pcompress \
28 BLKCIPHER2=crypto_blkcipher \
29 HASH2=crypto_hash \
30 MANAGER2=cryptomgr \
31 ECB=ecb
32
33 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
34 crypto_file=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko)
35 crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
36
37 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
38 # always set, even if no hash modules are selected
39 define KernelPackage/crypto-core
40 SUBMENU:=$(CRYPTO_MENU)
41 TITLE:=Core CryptoAPI modules
42 KCONFIG:= \
43 CONFIG_CRYPTO=y \
44 CONFIG_CRYPTO_HW=y \
45 CONFIG_CRYPTO_HMAC \
46 $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
47 FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
48 AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call crypto_name,$(mod))))
49 endef
50 $(eval $(call KernelPackage,crypto-core))
51
52
53 define AddDepends/crypto
54 SUBMENU:=$(CRYPTO_MENU)
55 DEPENDS+=kmod-crypto-core $(1)
56 endef
57
58
59 define KernelPackage/crypto-hw-padlock
60 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
61 DEPENDS:=+kmod-crypto-aes
62 KCONFIG:= \
63 CONFIG_CRYPTO_DEV_PADLOCK \
64 CONFIG_CRYPTO_DEV_PADLOCK_AES \
65 CONFIG_CRYPTO_DEV_PADLOCK_SHA
66 FILES:= \
67 $(LINUX_DIR)/drivers/crypto/padlock-aes.ko \
68 $(LINUX_DIR)/drivers/crypto/padlock-sha.ko
69 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
70 $(call AddDepends/crypto)
71 endef
72
73 $(eval $(call KernelPackage,crypto-hw-padlock))
74
75
76 define KernelPackage/crypto-hw-geode
77 TITLE:=AMD Geode hardware crypto module
78 KCONFIG:= \
79 CONFIG_CRYPTO_DEV_GEODE
80 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
81 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
82 $(call AddDepends/crypto)
83 endef
84
85 $(eval $(call KernelPackage,crypto-hw-geode))
86
87
88 define KernelPackage/crypto-hw-hifn-795x
89 TITLE:=HIFN 795x crypto accelerator
90 DEPENDS:=@!TARGET_ubicom32
91 KCONFIG:= \
92 CONFIG_HW_RANDOM=y \
93 CONFIG_CRYPTO_DEV_HIFN_795X \
94 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
95 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.ko
96 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
97 $(call AddDepends/crypto,+kmod-crypto-des)
98 endef
99
100 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
101
102
103 define KernelPackage/crypto-hw-ixp4xx
104 TITLE:=Intel IXP4xx hardware crypto module
105 DEPENDS:=@TARGET_ixp4xx
106 KCONFIG:= \
107 CONFIG_CRYPTO_DEV_IXP4XX
108 FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko
109 AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
110 $(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des)
111 endef
112
113 define KernelPackage/crypto-hw-ixp4xx/description
114 Kernel support for the Intel IXP4xx HW crypto engine.
115 endef
116
117 $(eval $(call KernelPackage,crypto-hw-ixp4xx))
118
119
120 define KernelPackage/crypto-hw-ppc4xx
121 TITLE:=AMCC PPC4xx hardware crypto module
122 DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
123 KCONFIG:= \
124 CONFIG_CRYPTO_DEV_PPC4XX
125 FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
126 AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
127 $(call AddDepends/crypto)
128 endef
129
130 define KernelPackage/crypto-hw-ppc4xx/description
131 Kernel support for the AMCC PPC4xx HW crypto engine.
132 endef
133
134 $(eval $(call KernelPackage,crypto-hw-ppc4xx))
135
136
137 define KernelPackage/crypto-aes
138 TITLE:=AES cipher CryptoAPI module
139 KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
140 FILES:=$(LINUX_DIR)/crypto/aes$(AES_SUFFIX).ko
141 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX))
142 $(call AddDepends/crypto)
143 endef
144
145 define KernelPackage/crypto-aes/x86
146 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
147 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX) aes-i586)
148 endef
149
150 $(eval $(call KernelPackage,crypto-aes))
151
152
153 define KernelPackage/crypto-arc4
154 TITLE:=ARC4 (RC4) cipher CryptoAPI module
155 KCONFIG:=CONFIG_CRYPTO_ARC4
156 FILES:=$(LINUX_DIR)/crypto/arc4.ko
157 AUTOLOAD:=$(call AutoLoad,09,arc4)
158 $(call AddDepends/crypto)
159 endef
160
161 $(eval $(call KernelPackage,crypto-arc4))
162
163
164 define KernelPackage/crypto-authenc
165 TITLE:=Combined mode wrapper for IPsec
166 KCONFIG:=CONFIG_CRYPTO_AUTHENC
167 FILES:=$(LINUX_DIR)/crypto/authenc.ko
168 AUTOLOAD:=$(call AutoLoad,09,authenc)
169 $(call AddDepends/crypto)
170 endef
171
172 $(eval $(call KernelPackage,crypto-authenc))
173
174 define KernelPackage/crypto-cbc
175 TITLE:=Cipher Block Chaining CryptoAPI module
176 KCONFIG:=CONFIG_CRYPTO_CBC
177 FILES:=$(LINUX_DIR)/crypto/cbc.ko
178 AUTOLOAD:=$(call AutoLoad,09,cbc)
179 $(call AddDepends/crypto)
180 endef
181
182 $(eval $(call KernelPackage,crypto-cbc))
183
184 define KernelPackage/crypto-des
185 TITLE:=DES/3DES cipher CryptoAPI module
186 KCONFIG:=CONFIG_CRYPTO_DES
187 FILES:=$(LINUX_DIR)/crypto/des$(DES_SUFFIX).ko
188 AUTOLOAD:=$(call AutoLoad,09,des$(DES_SUFFIX))
189 $(call AddDepends/crypto)
190 endef
191
192 $(eval $(call KernelPackage,crypto-des))
193
194 define KernelPackage/crypto-deflate
195 TITLE:=Deflate compression CryptoAPI module
196 KCONFIG:=CONFIG_CRYPTO_DEFLATE
197 FILES:=$(LINUX_DIR)/crypto/deflate.ko
198 AUTOLOAD:=$(call AutoLoad,09,deflate)
199 $(call AddDepends/crypto)
200 endef
201
202 $(eval $(call KernelPackage,crypto-deflate))
203
204
205 define KernelPackage/crypto-hmac
206 TITLE:=HMAC digest CryptoAPI module
207 KCONFIG:=CONFIG_CRYPTO_HMAC
208 FILES:=$(LINUX_DIR)/crypto/hmac.ko
209 AUTOLOAD:=$(call AutoLoad,09,hmac)
210 $(call AddDepends/crypto)
211 endef
212
213 $(eval $(call KernelPackage,crypto-hmac))
214
215
216 define KernelPackage/crypto-md5
217 TITLE:=MD5 digest CryptoAPI module
218 KCONFIG:=CONFIG_CRYPTO_MD5
219 FILES:=$(LINUX_DIR)/crypto/md5.ko
220 AUTOLOAD:=$(call AutoLoad,09,md5)
221 $(call AddDepends/crypto)
222 endef
223
224 $(eval $(call KernelPackage,crypto-md5))
225
226
227 define KernelPackage/crypto-michael-mic
228 TITLE:=Michael MIC keyed digest CryptoAPI module
229 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
230 FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
231 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
232 $(call AddDepends/crypto)
233 endef
234
235 $(eval $(call KernelPackage,crypto-michael-mic))
236
237
238 define KernelPackage/crypto-sha1
239 TITLE:=SHA1 digest CryptoAPI module
240 KCONFIG:=CONFIG_CRYPTO_SHA1
241 FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).ko
242 AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
243 $(call AddDepends/crypto)
244 endef
245
246 $(eval $(call KernelPackage,crypto-sha1))
247
248
249 define KernelPackage/crypto-misc
250 TITLE:=Other CryptoAPI modules
251 KCONFIG:= \
252 CONFIG_CRYPTO_ANUBIS \
253 CONFIG_CRYPTO_BLOWFISH \
254 CONFIG_CRYPTO_CAMELLIA \
255 CONFIG_CRYPTO_CAST5 \
256 CONFIG_CRYPTO_CAST6 \
257 CONFIG_CRYPTO_CRC32C \
258 CONFIG_CRYPTO_FCRYPT \
259 CONFIG_CRYPTO_KHAZAD \
260 CONFIG_CRYPTO_MD4 \
261 CONFIG_CRYPTO_SERPENT \
262 CONFIG_CRYPTO_SHA256 \
263 CONFIG_CRYPTO_SHA512 \
264 CONFIG_CRYPTO_TEA \
265 CONFIG_CRYPTO_TGR192 \
266 CONFIG_CRYPTO_TWOFISH \
267 CONFIG_CRYPTO_TWOFISH_COMMON \
268 CONFIG_CRYPTO_TWOFISH_586 \
269 CONFIG_CRYPTO_WP512
270 FILES:= \
271 $(LINUX_DIR)/crypto/anubis.ko \
272 $(LINUX_DIR)/crypto/blowfish.ko \
273 $(LINUX_DIR)/crypto/cast5.ko \
274 $(LINUX_DIR)/crypto/cast6.ko \
275 $(LINUX_DIR)/crypto/khazad.ko \
276 $(LINUX_DIR)/crypto/md4.ko \
277 $(LINUX_DIR)/crypto/serpent.ko \
278 $(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).ko \
279 $(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).ko \
280 $(LINUX_DIR)/crypto/tea.ko \
281 $(if $(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.35)),,$(LINUX_DIR)/crypto/twofish.ko) \
282 $(if $(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.36)),,$(LINUX_DIR)/crypto/twofish_generic.ko) \
283 $(LINUX_DIR)/crypto/wp512.ko
284 $(call AddDepends/crypto)
285 endef
286
287 define KernelPackage/crypto-misc/2.6
288 FILES+= \
289 $(LINUX_DIR)/crypto/camellia.ko \
290 $(if $(findstring y,$(CONFIG_CRYPTO_CRC32C)),,$(LINUX_DIR)/crypto/crc32c.ko) \
291 $(LINUX_DIR)/crypto/fcrypt.ko \
292 $(LINUX_DIR)/crypto/tgr192.ko \
293 $(LINUX_DIR)/crypto/twofish_common.ko
294 endef
295
296 define KernelPackage/crypto-misc/x86
297 FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
298 endef
299
300 $(eval $(call KernelPackage,crypto-misc))
301
302
303 define KernelPackage/crypto-ocf
304 TITLE:=OCF modules
305 DEPENDS:=+@OPENSSL_ENGINE @!TARGET_uml
306 KCONFIG:= \
307 CONFIG_OCF_OCF \
308 CONFIG_OCF_CRYPTODEV \
309 CONFIG_OCF_CRYPTOSOFT \
310 CONFIG_OCF_FIPS=y \
311 CONFIG_OCF_RANDOMHARVEST=y
312 FILES:= \
313 $(LINUX_DIR)/crypto/ocf/ocf.ko \
314 $(LINUX_DIR)/crypto/ocf/cryptodev.ko \
315 $(LINUX_DIR)/crypto/ocf/cryptosoft.ko
316 AUTOLOAD:=$(call AutoLoad,09, \
317 ocf \
318 cryptodev \
319 cryptosoft \
320 )
321 $(call AddDepends/crypto)
322 endef
323
324 $(eval $(call KernelPackage,crypto-ocf))
325
326
327 define KernelPackage/crypto-ocf-hifn7751
328 TITLE:=OCF support for Hifn 6500/7751/7811/795x, Invertex AEON and NetSec 7751 devices
329 DEPENDS:=+@OPENSSL_ENGINE @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
330 KCONFIG:=CONFIG_OCF_HIFN
331 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifn7751.ko
332 AUTOLOAD:=$(call AutoLoad,10,hifn7751)
333 $(call AddDepends/crypto)
334 endef
335
336 $(eval $(call KernelPackage,crypto-ocf-hifn7751))
337
338
339 define KernelPackage/crypto-ocf-hifnhipp
340 TITLE:=OCF support for Hifn 7855/8155 devices
341 DEPENDS:=+@OPENSSL_ENGINE @PCI_SUPPORT @!TARGET_uml kmod-crypto-ocf
342 KCONFIG:=CONFIG_OCF_HIFNHIPP
343 FILES:=$(LINUX_DIR)/crypto/ocf/hifn/hifnHIPP.ko
344 AUTOLOAD:=$(call AutoLoad,10,hifnhipp)
345 $(call AddDepends/crypto)
346 endef
347
348 $(eval $(call KernelPackage,crypto-ocf-hifnhipp))
349
350
351 define KernelPackage/crypto-null
352 TITLE:=Null CryptoAPI module
353 KCONFIG:=CONFIG_CRYPTO_NULL
354 FILES:=$(LINUX_DIR)/crypto/crypto_null.ko
355 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
356 $(call AddDepends/crypto)
357 endef
358
359 $(eval $(call KernelPackage,crypto-null))
360
361
362 define KernelPackage/crypto-test
363 TITLE:=Test CryptoAPI module
364 KCONFIG:=CONFIG_CRYPTO_TEST
365 FILES:=$(LINUX_DIR)/crypto/tcrypt.ko
366 $(call AddDepends/crypto)
367 endef
368
369 $(eval $(call KernelPackage,crypto-test))
370
371
372 define KernelPackage/crypto-xts
373 TITLE:=XTS cipher CryptoAPI module
374 KCONFIG:= \
375 CONFIG_CRYPTO_GF128MUL \
376 CONFIG_CRYPTO_XTS
377 FILES:= \
378 $(LINUX_DIR)/crypto/xts.ko \
379 $(LINUX_DIR)/crypto/gf128mul.ko
380 AUTOLOAD:=$(call AutoLoad,09, \
381 gf128mul \
382 xts \
383 )
384 $(call AddDepends/crypto)
385 endef
386
387 $(eval $(call KernelPackage,crypto-xts))
388
389 define KernelPackage/crypto-mv-cesa
390 TITLE:=Marvell crypto engine
391 KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
392 FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
393 AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
394 SUBMENU:=Cryptographic API modules
395 DEPENDS:=kmod-crypto-core @TARGET_kirkwood||TARGET_orion
396 endef
397
398 $(eval $(call KernelPackage,crypto-mv-cesa))
This page took 0.057993 seconds and 5 git commands to generate.