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