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