Added support for 2.6.27 kernel
[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-aes
120 SUBMENU:=$(CRYPTO_MENU)
121 TITLE:=AES cipher CryptoAPI module
122 DEPENDS:=+kmod-crypto-core
123 KCONFIG:=CONFIG_CRYPTO_AES
124 FILES:=$(LINUX_DIR)/crypto/aes$(AES_SUFFIX).$(LINUX_KMOD_SUFFIX)
125 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX))
126 endef
127
128 define KernelPackage/crypto-aes/x86-2.6
129 KCONFIG+=CONFIG_CRYPTO_AES_586
130 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.$(LINUX_KMOD_SUFFIX)
131 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX) aes-i586)
132 endef
133
134 $(eval $(call KernelPackage,crypto-aes))
135
136
137 define KernelPackage/crypto-arc4
138 SUBMENU:=$(CRYPTO_MENU)
139 TITLE:=ARC4 (RC4) cipher CryptoAPI module
140 DEPENDS:=+kmod-crypto-core
141 KCONFIG:=CONFIG_CRYPTO_ARC4
142 FILES:=$(LINUX_DIR)/crypto/arc4.$(LINUX_KMOD_SUFFIX)
143 AUTOLOAD:=$(call AutoLoad,09,arc4)
144 endef
145
146 $(eval $(call KernelPackage,crypto-arc4))
147
148
149 define KernelPackage/crypto-aead
150 SUBMENU:=$(CRYPTO_MENU)
151 TITLE:=Authenticated Encryption with Associated Data
152 DEPENDS:=+kmod-crypto-core
153 KCONFIG:=CONFIG_CRYPTO_AEAD
154 FILES:=$(LINUX_DIR)/crypto/aead.$(LINUX_KMOD_SUFFIX)
155 AUTOLOAD:=$(call AutoLoad,09,aead)
156 endef
157
158 $(eval $(call KernelPackage,crypto-aead))
159
160 define KernelPackage/crypto-authenc
161 SUBMENU:=$(CRYPTO_MENU)
162 TITLE:=Combined mode wrapper for IPsec
163 DEPENDS:=+kmod-crypto-core +kmod-crypto-aead
164 KCONFIG:=CONFIG_CRYPTO_AUTHENC
165 FILES:=$(LINUX_DIR)/crypto/authenc.$(LINUX_KMOD_SUFFIX)
166 AUTOLOAD:=$(call AutoLoad,09,authenc)
167 endef
168
169 $(eval $(call KernelPackage,crypto-authenc))
170
171 define KernelPackage/crypto-des
172 SUBMENU:=$(CRYPTO_MENU)
173 TITLE:=DES/3DES cipher CryptoAPI module
174 DEPENDS:=+kmod-crypto-core
175 KCONFIG:=CONFIG_CRYPTO_DES
176 FILES:=$(LINUX_DIR)/crypto/des$(DES_SUFFIX).$(LINUX_KMOD_SUFFIX)
177 AUTOLOAD:=$(call AutoLoad,09,des$(DES_SUFFIX))
178 endef
179
180 $(eval $(call KernelPackage,crypto-des))
181
182
183 define KernelPackage/crypto-hmac
184 SUBMENU:=$(CRYPTO_MENU)
185 TITLE:=HMAC digest CryptoAPI module
186 DEPENDS:=+kmod-crypto-core
187 KCONFIG:=CONFIG_CRYPTO_HMAC
188 FILES:=$(LINUX_DIR)/crypto/hmac.$(LINUX_KMOD_SUFFIX)
189 AUTOLOAD:=$(call AutoLoad,09,hmac)
190 endef
191
192 $(eval $(call KernelPackage,crypto-hmac))
193
194
195 define KernelPackage/crypto-md5
196 SUBMENU:=$(CRYPTO_MENU)
197 TITLE:=MD5 digest CryptoAPI module
198 DEPENDS:=+kmod-crypto-core
199 KCONFIG:=CONFIG_CRYPTO_MD5
200 FILES:=$(LINUX_DIR)/crypto/md5.$(LINUX_KMOD_SUFFIX)
201 AUTOLOAD:=$(call AutoLoad,09,md5)
202 endef
203
204 $(eval $(call KernelPackage,crypto-md5))
205
206
207 define KernelPackage/crypto-michael-mic
208 SUBMENU:=$(CRYPTO_MENU)
209 TITLE:=Michael MIC keyed digest CryptoAPI module
210 DEPENDS:=+kmod-crypto-core
211 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
212 FILES:=$(LINUX_DIR)/crypto/michael_mic.$(LINUX_KMOD_SUFFIX)
213 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
214 endef
215
216 $(eval $(call KernelPackage,crypto-michael-mic))
217
218
219 define KernelPackage/crypto-sha1
220 SUBMENU:=$(CRYPTO_MENU)
221 TITLE:=SHA1 digest CryptoAPI module
222 DEPENDS:=+kmod-crypto-core
223 KCONFIG:=CONFIG_CRYPTO_SHA1
224 FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).$(LINUX_KMOD_SUFFIX)
225 AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
226 endef
227
228 $(eval $(call KernelPackage,crypto-sha1))
229
230
231 define KernelPackage/crypto-misc
232 SUBMENU:=$(CRYPTO_MENU)
233 TITLE:=Other CryptoAPI modules
234 DEPENDS:=+kmod-crypto-core
235 KCONFIG:= \
236 CONFIG_CRYPTO_ANUBIS \
237 CONFIG_CRYPTO_BLOWFISH \
238 CONFIG_CRYPTO_CAMELLIA \
239 CONFIG_CRYPTO_CAST5 \
240 CONFIG_CRYPTO_CAST6 \
241 CONFIG_CRYPTO_CRC32C \
242 CONFIG_CRYPTO_FCRYPT \
243 CONFIG_CRYPTO_KHAZAD \
244 CONFIG_CRYPTO_MD4 \
245 CONFIG_CRYPTO_SERPENT \
246 CONFIG_CRYPTO_SHA256 \
247 CONFIG_CRYPTO_SHA512 \
248 CONFIG_CRYPTO_TEA \
249 CONFIG_CRYPTO_TGR192 \
250 CONFIG_CRYPTO_TWOFISH \
251 CONFIG_CRYPTO_TWOFISH_586 \
252 CONFIG_CRYPTO_WP512
253 FILES:= \
254 $(LINUX_DIR)/crypto/anubis.$(LINUX_KMOD_SUFFIX) \
255 $(LINUX_DIR)/crypto/blowfish.$(LINUX_KMOD_SUFFIX) \
256 $(LINUX_DIR)/crypto/cast5.$(LINUX_KMOD_SUFFIX) \
257 $(LINUX_DIR)/crypto/cast6.$(LINUX_KMOD_SUFFIX) \
258 $(LINUX_DIR)/crypto/khazad.$(LINUX_KMOD_SUFFIX) \
259 $(LINUX_DIR)/crypto/md4.$(LINUX_KMOD_SUFFIX) \
260 $(LINUX_DIR)/crypto/serpent.$(LINUX_KMOD_SUFFIX) \
261 $(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).$(LINUX_KMOD_SUFFIX) \
262 $(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).$(LINUX_KMOD_SUFFIX) \
263 $(LINUX_DIR)/crypto/tea.$(LINUX_KMOD_SUFFIX) \
264 $(LINUX_DIR)/crypto/twofish.$(LINUX_KMOD_SUFFIX) \
265 $(LINUX_DIR)/crypto/wp512.$(LINUX_KMOD_SUFFIX)
266 endef
267
268 define KernelPackage/crypto-misc/2.6
269 FILES+= \
270 $(LINUX_DIR)/crypto/camellia.$(LINUX_KMOD_SUFFIX) \
271 $(LINUX_DIR)/crypto/crc32c.$(LINUX_KMOD_SUFFIX) \
272 $(LINUX_DIR)/crypto/fcrypt.$(LINUX_KMOD_SUFFIX) \
273 $(LINUX_DIR)/crypto/tgr192.$(LINUX_KMOD_SUFFIX)
274 endef
275
276 $(eval $(call KernelPackage,crypto-misc))
277
278 define KernelPackage/crypto-ocf
279 SUBMENU:=$(CRYPTO_MENU)
280 TITLE:=OCF modules
281 DEPENDS:=+kmod-crypto-core @!TARGET_uml
282 KCONFIG:= \
283 CONFIG_OCF_OCF \
284 CONFIG_OCF_CRYPTODEV \
285 CONFIG_OCF_CRYPTOSOFT \
286 CONFIG_OCF_FIPS=y \
287 CONFIG_OCF_RANDOMHARVEST=y
288 FILES:= \
289 $(LINUX_DIR)/crypto/ocf/ocf.$(LINUX_KMOD_SUFFIX) \
290 $(LINUX_DIR)/crypto/ocf/cryptodev.$(LINUX_KMOD_SUFFIX) \
291 $(LINUX_DIR)/crypto/ocf/cryptosoft.$(LINUX_KMOD_SUFFIX)
292 AUTOLOAD:=$(call AutoLoad,09, \
293 ocf \
294 cryptodev \
295 cryptosoft \
296 )
297 endef
298
299 $(eval $(call KernelPackage,crypto-ocf))
300
301
302 define KernelPackage/crypto-null
303 SUBMENU:=$(CRYPTO_MENU)
304 TITLE:=Null CryptoAPI module
305 DEPENDS:=+kmod-crypto-core
306 KCONFIG:=CONFIG_CRYPTO_NULL
307 FILES:=$(LINUX_DIR)/crypto/crypto_null.$(LINUX_KMOD_SUFFIX)
308 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
309 endef
310
311 $(eval $(call KernelPackage,crypto-null))
312
313
314 define KernelPackage/crypto-test
315 SUBMENU:=$(CRYPTO_MENU)
316 TITLE:=Test CryptoAPI module
317 DEPENDS:=+kmod-crypto-core
318 KCONFIG:=CONFIG_CRYPTO_TEST
319 FILES:=$(LINUX_DIR)/crypto/tcrypt.$(LINUX_KMOD_SUFFIX)
320 AUTOLOAD:=$(call AutoLoad,09,tcrypt)
321 endef
322
323 $(eval $(call KernelPackage,crypto-test))
324
This page took 0.068787 seconds and 5 git commands to generate.