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