0b77c1da62f487f5bf900ad022c666789acdf2b0
[openwrt.git] / package / kernel / modules / crypto.mk
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 CRYPTO_MENU:=Cryptographic API modules
10
11 # XXX: added workarounds for modules renamed in 2.6 series:
12 # - aes > aes_generic (2.6.24)
13 # - blkcipher -> crypto_blkcipher (2.6.25)
14 # - des > des_generic (2.6.24)
15 # - sha1 > sha1_generic (2.6.24)
16 # - sha256 > sha256_generic (2.6.24)
17 # - sha512 > sha512_generic (2.6.26)
18 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.24)),1)
19 CRYPTO_GENERIC:=_generic
20 AES_SUFFIX:=$(CRYPTO_GENERIC)
21 DES_SUFFIX:=$(CRYPTO_GENERIC)
22 SHA1_SUFFIX:=$(CRYPTO_GENERIC)
23 SHA256_SUFFIX:=$(CRYPTO_GENERIC)
24 endif
25 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.25)),1)
26 CRYPTO_PREFIX:=crypto_
27 BLKCIPHER_PREFIX:=$(CRYPTO_PREFIX)
28 endif
29 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.26)),1)
30 SHA512_SUFFIX:=$(CRYPTO_GENERIC)
31 endif
32
33 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
34 # always set, even if no hash modules are selected
35 define KernelPackage/crypto-core
36 SUBMENU:=$(CRYPTO_MENU)
37 TITLE:=Core CryptoAPI modules
38 KCONFIG:= \
39 CONFIG_CRYPTO=y \
40 CONFIG_CRYPTO_ALGAPI \
41 CONFIG_CRYPTO_BLKCIPHER \
42 CONFIG_CRYPTO_CBC \
43 CONFIG_CRYPTO_DEFLATE \
44 CONFIG_CRYPTO_ECB \
45 CONFIG_CRYPTO_HASH \
46 CONFIG_CRYPTO_HMAC \
47 CONFIG_CRYPTO_MANAGER
48 FILES:= \
49 $(LINUX_DIR)/crypto/crypto_algapi.$(LINUX_KMOD_SUFFIX) \
50 $(LINUX_DIR)/crypto/$(BLKCIPHER_PREFIX)blkcipher.$(LINUX_KMOD_SUFFIX) \
51 $(LINUX_DIR)/crypto/cbc.$(LINUX_KMOD_SUFFIX) \
52 $(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX) \
53 $(LINUX_DIR)/crypto/ecb.$(LINUX_KMOD_SUFFIX) \
54 $(LINUX_DIR)/crypto/crypto_hash.$(LINUX_KMOD_SUFFIX) \
55 $(LINUX_DIR)/crypto/cryptomgr.$(LINUX_KMOD_SUFFIX)
56 AUTOLOAD:=$(call AutoLoad,01, \
57 crypto_algapi \
58 cryptomgr \
59 crypto_hash \
60 $(BLKCIPHER_PREFIX)blkcipher \
61 cbc \
62 ecb \
63 deflate \
64 )
65 endef
66
67 define KernelPackage/crypto-core/2.4
68 FILES:=$(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX)
69 AUTOLOAD:=$(call AutoLoad,01, deflate)
70 endef
71
72 $(eval $(call KernelPackage,crypto-core))
73
74
75 define KernelPackage/crypto-hw-padlock
76 SUBMENU:=$(CRYPTO_MENU)
77 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
78 DEPENDS:=+kmod-crypto-core
79 KCONFIG:= \
80 CONFIG_CRYPTO_DEV_PADLOCK \
81 CONFIG_CRYPTO_DEV_PADLOCK_AES \
82 CONFIG_CRYPTO_DEV_PADLOCK_SHA
83 FILES:= \
84 $(LINUX_DIR)/drivers/crypto/padlock-aes.$(LINUX_KMOD_SUFFIX) \
85 $(LINUX_DIR)/drivers/crypto/padlock-sha.$(LINUX_KMOD_SUFFIX)
86 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
87 endef
88
89 $(eval $(call KernelPackage,crypto-hw-padlock))
90
91
92 define KernelPackage/crypto-hw-geode
93 SUBMENU:=$(CRYPTO_MENU)
94 TITLE:=AMD Geode hardware crypto module
95 DEPENDS:=+kmod-crypto-core
96 KCONFIG:= \
97 CONFIG_CRYPTO_DEV_GEODE
98 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.$(LINUX_KMOD_SUFFIX)
99 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
100 endef
101
102 $(eval $(call KernelPackage,crypto-hw-geode))
103
104
105 define KernelPackage/crypto-hw-hifn-795x
106 SUBMENU:=$(CRYPTO_MENU)
107 TITLE:=HIFN 795x crypto accelerator
108 DEPENDS:=+kmod-crypto-core +kmod-crypto-des
109 KCONFIG:= \
110 CONFIG_CRYPTO_DEV_HIFN_795X \
111 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
112 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.$(LINUX_KMOD_SUFFIX)
113 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
114 endef
115
116 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
117
118
119 define KernelPackage/crypto-hw-ixp4xx
120 SUBMENU:=$(CRYPTO_MENU)
121 TITLE:=Intel IXP4xx hardware crypto module
122 DEPENDS:= \
123 @TARGET_ixp4xx +kmod-crypto-core +kmod-crypto-des +kmod-crypto-aead \
124 +kmod-crypto-authenc
125 KCONFIG:= CONFIG_CRYPTO_DEV_IXP4XX
126 FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.$(LINUX_KMOD_SUFFIX)
127 AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
128 endef
129
130 define KernelPackage/crypto-hw-ixp4xx/description
131 Kernel support for the Intel IXP4xx HW crypto engine.
132 endef
133
134 $(eval $(call KernelPackage,crypto-hw-ixp4xx))
135
136
137 define KernelPackage/crypto-aes
138 SUBMENU:=$(CRYPTO_MENU)
139 TITLE:=AES cipher CryptoAPI module
140 DEPENDS:=+kmod-crypto-core
141 KCONFIG:=CONFIG_CRYPTO_AES
142 FILES:=$(LINUX_DIR)/crypto/aes$(AES_SUFFIX).$(LINUX_KMOD_SUFFIX)
143 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX))
144 endef
145
146 define KernelPackage/crypto-aes/x86-2.6
147 KCONFIG+=CONFIG_CRYPTO_AES_586
148 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.$(LINUX_KMOD_SUFFIX)
149 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX) aes-i586)
150 endef
151
152 $(eval $(call KernelPackage,crypto-aes))
153
154
155 define KernelPackage/crypto-arc4
156 SUBMENU:=$(CRYPTO_MENU)
157 TITLE:=ARC4 (RC4) cipher CryptoAPI module
158 DEPENDS:=+kmod-crypto-core
159 KCONFIG:=CONFIG_CRYPTO_ARC4
160 FILES:=$(LINUX_DIR)/crypto/arc4.$(LINUX_KMOD_SUFFIX)
161 AUTOLOAD:=$(call AutoLoad,09,arc4)
162 endef
163
164 $(eval $(call KernelPackage,crypto-arc4))
165
166
167 define KernelPackage/crypto-aead
168 SUBMENU:=$(CRYPTO_MENU)
169 TITLE:=Authenticated Encryption with Associated Data
170 DEPENDS:=+kmod-crypto-core
171 KCONFIG:=CONFIG_CRYPTO_AEAD
172 FILES:=$(LINUX_DIR)/crypto/aead.$(LINUX_KMOD_SUFFIX)
173 AUTOLOAD:=$(call AutoLoad,09,aead)
174 endef
175
176 $(eval $(call KernelPackage,crypto-aead))
177
178 define KernelPackage/crypto-authenc
179 SUBMENU:=$(CRYPTO_MENU)
180 TITLE:=Combined mode wrapper for IPsec
181 DEPENDS:=+kmod-crypto-core +kmod-crypto-aead
182 KCONFIG:=CONFIG_CRYPTO_AUTHENC
183 FILES:=$(LINUX_DIR)/crypto/authenc.$(LINUX_KMOD_SUFFIX)
184 AUTOLOAD:=$(call AutoLoad,09,authenc)
185 endef
186
187 $(eval $(call KernelPackage,crypto-authenc))
188
189 define KernelPackage/crypto-des
190 SUBMENU:=$(CRYPTO_MENU)
191 TITLE:=DES/3DES cipher CryptoAPI module
192 DEPENDS:=+kmod-crypto-core
193 KCONFIG:=CONFIG_CRYPTO_DES
194 FILES:=$(LINUX_DIR)/crypto/des$(DES_SUFFIX).$(LINUX_KMOD_SUFFIX)
195 AUTOLOAD:=$(call AutoLoad,09,des$(DES_SUFFIX))
196 endef
197
198 $(eval $(call KernelPackage,crypto-des))
199
200
201 define KernelPackage/crypto-hmac
202 SUBMENU:=$(CRYPTO_MENU)
203 TITLE:=HMAC digest CryptoAPI module
204 DEPENDS:=+kmod-crypto-core
205 KCONFIG:=CONFIG_CRYPTO_HMAC
206 FILES:=$(LINUX_DIR)/crypto/hmac.$(LINUX_KMOD_SUFFIX)
207 AUTOLOAD:=$(call AutoLoad,09,hmac)
208 endef
209
210 $(eval $(call KernelPackage,crypto-hmac))
211
212
213 define KernelPackage/crypto-md5
214 SUBMENU:=$(CRYPTO_MENU)
215 TITLE:=MD5 digest CryptoAPI module
216 DEPENDS:=+kmod-crypto-core
217 KCONFIG:=CONFIG_CRYPTO_MD5
218 FILES:=$(LINUX_DIR)/crypto/md5.$(LINUX_KMOD_SUFFIX)
219 AUTOLOAD:=$(call AutoLoad,09,md5)
220 endef
221
222 $(eval $(call KernelPackage,crypto-md5))
223
224
225 define KernelPackage/crypto-michael-mic
226 SUBMENU:=$(CRYPTO_MENU)
227 TITLE:=Michael MIC keyed digest CryptoAPI module
228 DEPENDS:=+kmod-crypto-core
229 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
230 FILES:=$(LINUX_DIR)/crypto/michael_mic.$(LINUX_KMOD_SUFFIX)
231 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
232 endef
233
234 $(eval $(call KernelPackage,crypto-michael-mic))
235
236
237 define KernelPackage/crypto-sha1
238 SUBMENU:=$(CRYPTO_MENU)
239 TITLE:=SHA1 digest CryptoAPI module
240 DEPENDS:=+kmod-crypto-core
241 KCONFIG:=CONFIG_CRYPTO_SHA1
242 FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).$(LINUX_KMOD_SUFFIX)
243 AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
244 endef
245
246 $(eval $(call KernelPackage,crypto-sha1))
247
248
249 define KernelPackage/crypto-misc
250 SUBMENU:=$(CRYPTO_MENU)
251 TITLE:=Other CryptoAPI modules
252 DEPENDS:=+kmod-crypto-core
253 KCONFIG:= \
254 CONFIG_CRYPTO_ANUBIS \
255 CONFIG_CRYPTO_BLOWFISH \
256 CONFIG_CRYPTO_CAMELLIA \
257 CONFIG_CRYPTO_CAST5 \
258 CONFIG_CRYPTO_CAST6 \
259 CONFIG_CRYPTO_CRC32C \
260 CONFIG_CRYPTO_FCRYPT \
261 CONFIG_CRYPTO_KHAZAD \
262 CONFIG_CRYPTO_MD4 \
263 CONFIG_CRYPTO_SERPENT \
264 CONFIG_CRYPTO_SHA256 \
265 CONFIG_CRYPTO_SHA512 \
266 CONFIG_CRYPTO_TEA \
267 CONFIG_CRYPTO_TGR192 \
268 CONFIG_CRYPTO_TWOFISH \
269 CONFIG_CRYPTO_TWOFISH_586 \
270 CONFIG_CRYPTO_WP512
271 FILES:= \
272 $(LINUX_DIR)/crypto/anubis.$(LINUX_KMOD_SUFFIX) \
273 $(LINUX_DIR)/crypto/blowfish.$(LINUX_KMOD_SUFFIX) \
274 $(LINUX_DIR)/crypto/cast5.$(LINUX_KMOD_SUFFIX) \
275 $(LINUX_DIR)/crypto/cast6.$(LINUX_KMOD_SUFFIX) \
276 $(LINUX_DIR)/crypto/khazad.$(LINUX_KMOD_SUFFIX) \
277 $(LINUX_DIR)/crypto/md4.$(LINUX_KMOD_SUFFIX) \
278 $(LINUX_DIR)/crypto/serpent.$(LINUX_KMOD_SUFFIX) \
279 $(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).$(LINUX_KMOD_SUFFIX) \
280 $(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).$(LINUX_KMOD_SUFFIX) \
281 $(LINUX_DIR)/crypto/tea.$(LINUX_KMOD_SUFFIX) \
282 $(LINUX_DIR)/crypto/twofish.$(LINUX_KMOD_SUFFIX) \
283 $(LINUX_DIR)/crypto/wp512.$(LINUX_KMOD_SUFFIX)
284 endef
285
286 define KernelPackage/crypto-misc/2.6
287 FILES+= \
288 $(LINUX_DIR)/crypto/camellia.$(LINUX_KMOD_SUFFIX) \
289 $(LINUX_DIR)/crypto/crc32c.$(LINUX_KMOD_SUFFIX) \
290 $(LINUX_DIR)/crypto/fcrypt.$(LINUX_KMOD_SUFFIX) \
291 $(LINUX_DIR)/crypto/tgr192.$(LINUX_KMOD_SUFFIX)
292 endef
293
294 $(eval $(call KernelPackage,crypto-misc))
295
296 define KernelPackage/crypto-ocf
297 SUBMENU:=$(CRYPTO_MENU)
298 TITLE:=OCF modules
299 DEPENDS:=+kmod-crypto-core @!TARGET_uml
300 KCONFIG:= \
301 CONFIG_OCF_OCF \
302 CONFIG_OCF_CRYPTODEV \
303 CONFIG_OCF_CRYPTOSOFT \
304 CONFIG_OCF_FIPS=y \
305 CONFIG_OCF_RANDOMHARVEST=y
306 FILES:= \
307 $(LINUX_DIR)/crypto/ocf/ocf.$(LINUX_KMOD_SUFFIX) \
308 $(LINUX_DIR)/crypto/ocf/cryptodev.$(LINUX_KMOD_SUFFIX) \
309 $(LINUX_DIR)/crypto/ocf/cryptosoft.$(LINUX_KMOD_SUFFIX)
310 AUTOLOAD:=$(call AutoLoad,09, \
311 ocf \
312 cryptodev \
313 cryptosoft \
314 )
315 endef
316
317 $(eval $(call KernelPackage,crypto-ocf))
318
319
320 define KernelPackage/crypto-null
321 SUBMENU:=$(CRYPTO_MENU)
322 TITLE:=Null CryptoAPI module
323 DEPENDS:=+kmod-crypto-core
324 KCONFIG:=CONFIG_CRYPTO_NULL
325 FILES:=$(LINUX_DIR)/crypto/crypto_null.$(LINUX_KMOD_SUFFIX)
326 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
327 endef
328
329 $(eval $(call KernelPackage,crypto-null))
330
331
332 define KernelPackage/crypto-test
333 SUBMENU:=$(CRYPTO_MENU)
334 TITLE:=Test CryptoAPI module
335 DEPENDS:=+kmod-crypto-core
336 KCONFIG:=CONFIG_CRYPTO_TEST
337 FILES:=$(LINUX_DIR)/crypto/tcrypt.$(LINUX_KMOD_SUFFIX)
338 endef
339
340 $(eval $(call KernelPackage,crypto-test))
341
This page took 0.062058 seconds and 3 git commands to generate.