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