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