load aead after crypto_algapi
[openwrt/svn-archive/archive.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_AEAD \
41 CONFIG_CRYPTO_ALGAPI \
42 CONFIG_CRYPTO_BLKCIPHER \
43 CONFIG_CRYPTO_CBC \
44 CONFIG_CRYPTO_DEFLATE \
45 CONFIG_CRYPTO_ECB \
46 CONFIG_CRYPTO_HASH \
47 CONFIG_CRYPTO_HMAC \
48 CONFIG_CRYPTO_MANAGER
49 FILES:= \
50 $(LINUX_DIR)/crypto/crypto_algapi.$(LINUX_KMOD_SUFFIX) \
51 $(LINUX_DIR)/crypto/aead.$(LINUX_KMOD_SUFFIX) \
52 $(LINUX_DIR)/crypto/$(BLKCIPHER_PREFIX)blkcipher.$(LINUX_KMOD_SUFFIX) \
53 $(LINUX_DIR)/crypto/cbc.$(LINUX_KMOD_SUFFIX) \
54 $(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX) \
55 $(LINUX_DIR)/crypto/ecb.$(LINUX_KMOD_SUFFIX) \
56 $(LINUX_DIR)/crypto/crypto_hash.$(LINUX_KMOD_SUFFIX) \
57 $(LINUX_DIR)/crypto/cryptomgr.$(LINUX_KMOD_SUFFIX)
58 AUTOLOAD:=$(call AutoLoad,01, \
59 crypto_algapi \
60 aead \
61 cryptomgr \
62 crypto_hash \
63 $(BLKCIPHER_PREFIX)blkcipher \
64 cbc \
65 ecb \
66 deflate \
67 )
68 endef
69
70 define KernelPackage/crypto-core/2.4
71 FILES:=$(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX)
72 AUTOLOAD:=$(call AutoLoad,01, deflate)
73 endef
74
75 $(eval $(call KernelPackage,crypto-core))
76
77
78 define KernelPackage/crypto-hw-padlock
79 SUBMENU:=$(CRYPTO_MENU)
80 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
81 DEPENDS:=+kmod-crypto-core
82 KCONFIG:= \
83 CONFIG_CRYPTO_HW=y \
84 CONFIG_CRYPTO_DEV_PADLOCK \
85 CONFIG_CRYPTO_DEV_PADLOCK_AES \
86 CONFIG_CRYPTO_DEV_PADLOCK_SHA
87 FILES:= \
88 $(LINUX_DIR)/drivers/crypto/padlock-aes.$(LINUX_KMOD_SUFFIX) \
89 $(LINUX_DIR)/drivers/crypto/padlock-sha.$(LINUX_KMOD_SUFFIX)
90 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
91 endef
92
93 $(eval $(call KernelPackage,crypto-hw-padlock))
94
95
96 define KernelPackage/crypto-hw-geode
97 SUBMENU:=$(CRYPTO_MENU)
98 TITLE:=AMD Geode hardware crypto module
99 DEPENDS:=+kmod-crypto-core
100 KCONFIG:= \
101 CONFIG_CRYPTO_HW=y \
102 CONFIG_CRYPTO_DEV_GEODE
103 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.$(LINUX_KMOD_SUFFIX)
104 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
105 endef
106
107 $(eval $(call KernelPackage,crypto-hw-geode))
108
109
110 define KernelPackage/crypto-hw-hifn-795x
111 SUBMENU:=$(CRYPTO_MENU)
112 TITLE:=HIFN 795x crypto accelerator
113 DEPENDS:=+kmod-crypto-core +kmod-crypto-des
114 KCONFIG:= \
115 CONFIG_CRYPTO_HW=y \
116 CONFIG_CRYPTO_DEV_HIFN_795X \
117 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
118 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.$(LINUX_KMOD_SUFFIX)
119 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
120 endef
121
122 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
123
124
125 define KernelPackage/crypto-hw-ixp4xx
126 SUBMENU:=$(CRYPTO_MENU)
127 TITLE:=Intel IXP4xx hardware crypto module
128 DEPENDS:= \
129 @TARGET_ixp4xx +kmod-crypto-core +kmod-crypto-des +kmod-crypto-authenc
130 KCONFIG:= CONFIG_CRYPTO_DEV_IXP4XX
131 FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.$(LINUX_KMOD_SUFFIX)
132 AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
133 endef
134
135 define KernelPackage/crypto-hw-ixp4xx/description
136 Kernel support for the Intel IXP4xx HW crypto engine.
137 endef
138
139 $(eval $(call KernelPackage,crypto-hw-ixp4xx))
140
141
142 define KernelPackage/crypto-aes
143 SUBMENU:=$(CRYPTO_MENU)
144 TITLE:=AES cipher CryptoAPI module
145 DEPENDS:=+kmod-crypto-core
146 KCONFIG:=CONFIG_CRYPTO_AES
147 FILES:=$(LINUX_DIR)/crypto/aes$(AES_SUFFIX).$(LINUX_KMOD_SUFFIX)
148 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX))
149 endef
150
151 define KernelPackage/crypto-aes/x86-2.6
152 KCONFIG+=CONFIG_CRYPTO_AES_586
153 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.$(LINUX_KMOD_SUFFIX)
154 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX) aes-i586)
155 endef
156
157 $(eval $(call KernelPackage,crypto-aes))
158
159
160 define KernelPackage/crypto-arc4
161 SUBMENU:=$(CRYPTO_MENU)
162 TITLE:=ARC4 (RC4) cipher CryptoAPI module
163 DEPENDS:=+kmod-crypto-core
164 KCONFIG:=CONFIG_CRYPTO_ARC4
165 FILES:=$(LINUX_DIR)/crypto/arc4.$(LINUX_KMOD_SUFFIX)
166 AUTOLOAD:=$(call AutoLoad,09,arc4)
167 endef
168
169 $(eval $(call KernelPackage,crypto-arc4))
170
171
172 define KernelPackage/crypto-authenc
173 SUBMENU:=$(CRYPTO_MENU)
174 TITLE:=Combined mode wrapper for IPsec
175 DEPENDS:=+kmod-crypto-core
176 KCONFIG:=CONFIG_CRYPTO_AUTHENC
177 FILES:=$(LINUX_DIR)/crypto/authenc.$(LINUX_KMOD_SUFFIX)
178 AUTOLOAD:=$(call AutoLoad,09,authenc)
179 endef
180
181 $(eval $(call KernelPackage,crypto-authenc))
182
183 define KernelPackage/crypto-des
184 SUBMENU:=$(CRYPTO_MENU)
185 TITLE:=DES/3DES cipher CryptoAPI module
186 DEPENDS:=+kmod-crypto-core
187 KCONFIG:=CONFIG_CRYPTO_DES
188 FILES:=$(LINUX_DIR)/crypto/des$(DES_SUFFIX).$(LINUX_KMOD_SUFFIX)
189 AUTOLOAD:=$(call AutoLoad,09,des$(DES_SUFFIX))
190 endef
191
192 $(eval $(call KernelPackage,crypto-des))
193
194
195 define KernelPackage/crypto-hmac
196 SUBMENU:=$(CRYPTO_MENU)
197 TITLE:=HMAC digest CryptoAPI module
198 DEPENDS:=+kmod-crypto-core
199 KCONFIG:=CONFIG_CRYPTO_HMAC
200 FILES:=$(LINUX_DIR)/crypto/hmac.$(LINUX_KMOD_SUFFIX)
201 AUTOLOAD:=$(call AutoLoad,09,hmac)
202 endef
203
204 $(eval $(call KernelPackage,crypto-hmac))
205
206
207 define KernelPackage/crypto-md5
208 SUBMENU:=$(CRYPTO_MENU)
209 TITLE:=MD5 digest CryptoAPI module
210 DEPENDS:=+kmod-crypto-core
211 KCONFIG:=CONFIG_CRYPTO_MD5
212 FILES:=$(LINUX_DIR)/crypto/md5.$(LINUX_KMOD_SUFFIX)
213 AUTOLOAD:=$(call AutoLoad,09,md5)
214 endef
215
216 $(eval $(call KernelPackage,crypto-md5))
217
218
219 define KernelPackage/crypto-michael-mic
220 SUBMENU:=$(CRYPTO_MENU)
221 TITLE:=Michael MIC keyed digest CryptoAPI module
222 DEPENDS:=+kmod-crypto-core
223 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
224 FILES:=$(LINUX_DIR)/crypto/michael_mic.$(LINUX_KMOD_SUFFIX)
225 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
226 endef
227
228 $(eval $(call KernelPackage,crypto-michael-mic))
229
230
231 define KernelPackage/crypto-sha1
232 SUBMENU:=$(CRYPTO_MENU)
233 TITLE:=SHA1 digest CryptoAPI module
234 DEPENDS:=+kmod-crypto-core
235 KCONFIG:=CONFIG_CRYPTO_SHA1
236 FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).$(LINUX_KMOD_SUFFIX)
237 AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
238 endef
239
240 $(eval $(call KernelPackage,crypto-sha1))
241
242
243 define KernelPackage/crypto-misc
244 SUBMENU:=$(CRYPTO_MENU)
245 TITLE:=Other CryptoAPI modules
246 DEPENDS:=+kmod-crypto-core
247 KCONFIG:= \
248 CONFIG_CRYPTO_ANUBIS \
249 CONFIG_CRYPTO_BLOWFISH \
250 CONFIG_CRYPTO_CAMELLIA \
251 CONFIG_CRYPTO_CAST5 \
252 CONFIG_CRYPTO_CAST6 \
253 CONFIG_CRYPTO_CRC32C \
254 CONFIG_CRYPTO_FCRYPT \
255 CONFIG_CRYPTO_KHAZAD \
256 CONFIG_CRYPTO_MD4 \
257 CONFIG_CRYPTO_SERPENT \
258 CONFIG_CRYPTO_SHA256 \
259 CONFIG_CRYPTO_SHA512 \
260 CONFIG_CRYPTO_TEA \
261 CONFIG_CRYPTO_TGR192 \
262 CONFIG_CRYPTO_TWOFISH \
263 CONFIG_CRYPTO_TWOFISH_586 \
264 CONFIG_CRYPTO_WP512
265 FILES:= \
266 $(LINUX_DIR)/crypto/anubis.$(LINUX_KMOD_SUFFIX) \
267 $(LINUX_DIR)/crypto/blowfish.$(LINUX_KMOD_SUFFIX) \
268 $(LINUX_DIR)/crypto/cast5.$(LINUX_KMOD_SUFFIX) \
269 $(LINUX_DIR)/crypto/cast6.$(LINUX_KMOD_SUFFIX) \
270 $(LINUX_DIR)/crypto/khazad.$(LINUX_KMOD_SUFFIX) \
271 $(LINUX_DIR)/crypto/md4.$(LINUX_KMOD_SUFFIX) \
272 $(LINUX_DIR)/crypto/serpent.$(LINUX_KMOD_SUFFIX) \
273 $(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).$(LINUX_KMOD_SUFFIX) \
274 $(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).$(LINUX_KMOD_SUFFIX) \
275 $(LINUX_DIR)/crypto/tea.$(LINUX_KMOD_SUFFIX) \
276 $(LINUX_DIR)/crypto/twofish.$(LINUX_KMOD_SUFFIX) \
277 $(LINUX_DIR)/crypto/wp512.$(LINUX_KMOD_SUFFIX)
278 endef
279
280 define KernelPackage/crypto-misc/2.6
281 FILES+= \
282 $(LINUX_DIR)/crypto/camellia.$(LINUX_KMOD_SUFFIX) \
283 $(LINUX_DIR)/crypto/crc32c.$(LINUX_KMOD_SUFFIX) \
284 $(LINUX_DIR)/crypto/fcrypt.$(LINUX_KMOD_SUFFIX) \
285 $(LINUX_DIR)/crypto/tgr192.$(LINUX_KMOD_SUFFIX)
286 endef
287
288 $(eval $(call KernelPackage,crypto-misc))
289
290 define KernelPackage/crypto-ocf
291 SUBMENU:=$(CRYPTO_MENU)
292 TITLE:=OCF modules
293 DEPENDS:=+kmod-crypto-core @!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.$(LINUX_KMOD_SUFFIX) \
302 $(LINUX_DIR)/crypto/ocf/cryptodev.$(LINUX_KMOD_SUFFIX) \
303 $(LINUX_DIR)/crypto/ocf/cryptosoft.$(LINUX_KMOD_SUFFIX)
304 AUTOLOAD:=$(call AutoLoad,09, \
305 ocf \
306 cryptodev \
307 cryptosoft \
308 )
309 endef
310
311 $(eval $(call KernelPackage,crypto-ocf))
312
313
314 define KernelPackage/crypto-null
315 SUBMENU:=$(CRYPTO_MENU)
316 TITLE:=Null CryptoAPI module
317 DEPENDS:=+kmod-crypto-core
318 KCONFIG:=CONFIG_CRYPTO_NULL
319 FILES:=$(LINUX_DIR)/crypto/crypto_null.$(LINUX_KMOD_SUFFIX)
320 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
321 endef
322
323 $(eval $(call KernelPackage,crypto-null))
324
325
326 define KernelPackage/crypto-test
327 SUBMENU:=$(CRYPTO_MENU)
328 TITLE:=Test CryptoAPI module
329 DEPENDS:=+kmod-crypto-core
330 KCONFIG:=CONFIG_CRYPTO_TEST
331 FILES:=$(LINUX_DIR)/crypto/tcrypt.$(LINUX_KMOD_SUFFIX)
332 endef
333
334 $(eval $(call KernelPackage,crypto-test))
335