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