move the hostap firmware kernel config options to KCONFIG for the hostap package...
[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 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.24)),1)
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 endif
24 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.25)),1)
25 CRYPTO_PREFIX:=crypto_
26 BLKCIPHER_PREFIX:=$(CRYPTO_PREFIX)
27 endif
28 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.26)),1)
29 SHA512_SUFFIX:=$(CRYPTO_GENERIC)
30 endif
31 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.30)),1)
32 CRYPTO_MODULE_PCOMPRESS:=PCOMP=pcompress
33 endif
34
35 CRYPTO_MODULES = \
36 ALGAPI=crypto_algapi \
37 AEAD=aead \
38 $(CRYPTO_MODULE_PCOMPRESS) \
39 BLKCIPHER=$(BLKCIPHER_PREFIX)blkcipher \
40 HASH=crypto_hash \
41 MANAGER=cryptomgr \
42 CBC=cbc \
43 ECB=ecb \
44 DEFLATE=deflate
45
46 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
47 crypto_file=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).$(LINUX_KMOD_SUFFIX))
48 crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
49
50 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
51 # always set, even if no hash modules are selected
52 define KernelPackage/crypto-core
53 SUBMENU:=$(CRYPTO_MENU)
54 TITLE:=Core CryptoAPI modules
55 KCONFIG:=CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
56 FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
57 AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call crypto_name,$(mod))))
58 endef
59
60 define KernelPackage/crypto-core/2.4
61 FILES:=$(LINUX_DIR)/crypto/deflate.$(LINUX_KMOD_SUFFIX)
62 AUTOLOAD:=$(call AutoLoad,01, deflate)
63 endef
64
65 $(eval $(call KernelPackage,crypto-core))
66
67
68 define KernelPackage/crypto-hw-padlock
69 SUBMENU:=$(CRYPTO_MENU)
70 TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
71 DEPENDS:=+kmod-crypto-core
72 KCONFIG:= \
73 CONFIG_CRYPTO_HW=y \
74 CONFIG_CRYPTO_DEV_PADLOCK \
75 CONFIG_CRYPTO_DEV_PADLOCK_AES \
76 CONFIG_CRYPTO_DEV_PADLOCK_SHA
77 FILES:= \
78 $(LINUX_DIR)/drivers/crypto/padlock-aes.$(LINUX_KMOD_SUFFIX) \
79 $(LINUX_DIR)/drivers/crypto/padlock-sha.$(LINUX_KMOD_SUFFIX)
80 AUTOLOAD:=$(call AutoLoad,09,padlock-aes padlock-sha)
81 endef
82
83 $(eval $(call KernelPackage,crypto-hw-padlock))
84
85
86 define KernelPackage/crypto-hw-geode
87 SUBMENU:=$(CRYPTO_MENU)
88 TITLE:=AMD Geode hardware crypto module
89 DEPENDS:=+kmod-crypto-core
90 KCONFIG:= \
91 CONFIG_CRYPTO_HW=y \
92 CONFIG_CRYPTO_DEV_GEODE
93 FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.$(LINUX_KMOD_SUFFIX)
94 AUTOLOAD:=$(call AutoLoad,09,geode-aes)
95 endef
96
97 $(eval $(call KernelPackage,crypto-hw-geode))
98
99
100 define KernelPackage/crypto-hw-hifn-795x
101 SUBMENU:=$(CRYPTO_MENU)
102 TITLE:=HIFN 795x crypto accelerator
103 DEPENDS:=+kmod-crypto-core +kmod-crypto-des
104 KCONFIG:= \
105 CONFIG_CRYPTO_HW=y \
106 CONFIG_CRYPTO_DEV_HIFN_795X \
107 CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
108 FILES:=$(LINUX_DIR)/drivers/crypto/hifn_795x.$(LINUX_KMOD_SUFFIX)
109 AUTOLOAD:=$(call AutoLoad,09,hifn_795x)
110 endef
111
112 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
113
114
115 define KernelPackage/crypto-hw-ixp4xx
116 SUBMENU:=$(CRYPTO_MENU)
117 TITLE:=Intel IXP4xx hardware crypto module
118 DEPENDS:= \
119 @TARGET_ixp4xx +kmod-crypto-core +kmod-crypto-des +kmod-crypto-authenc
120 KCONFIG:= \
121 CONFIG_CRYPTO_HW=y \
122 CONFIG_CRYPTO_DEV_IXP4XX
123 FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.$(LINUX_KMOD_SUFFIX)
124 AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
125 endef
126
127 define KernelPackage/crypto-hw-ixp4xx/description
128 Kernel support for the Intel IXP4xx HW crypto engine.
129 endef
130
131 $(eval $(call KernelPackage,crypto-hw-ixp4xx))
132
133
134 define KernelPackage/crypto-aes
135 SUBMENU:=$(CRYPTO_MENU)
136 TITLE:=AES cipher CryptoAPI module
137 DEPENDS:=+kmod-crypto-core
138 KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
139 FILES:=$(LINUX_DIR)/crypto/aes$(AES_SUFFIX).$(LINUX_KMOD_SUFFIX)
140 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX))
141 endef
142
143 define KernelPackage/crypto-aes/x86-2.6
144 FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.$(LINUX_KMOD_SUFFIX)
145 AUTOLOAD:=$(call AutoLoad,09,aes$(AES_SUFFIX) aes-i586)
146 endef
147
148 $(eval $(call KernelPackage,crypto-aes))
149
150
151 define KernelPackage/crypto-arc4
152 SUBMENU:=$(CRYPTO_MENU)
153 TITLE:=ARC4 (RC4) cipher CryptoAPI module
154 DEPENDS:=+kmod-crypto-core
155 KCONFIG:=CONFIG_CRYPTO_ARC4
156 FILES:=$(LINUX_DIR)/crypto/arc4.$(LINUX_KMOD_SUFFIX)
157 AUTOLOAD:=$(call AutoLoad,09,arc4)
158 endef
159
160 $(eval $(call KernelPackage,crypto-arc4))
161
162
163 define KernelPackage/crypto-authenc
164 SUBMENU:=$(CRYPTO_MENU)
165 TITLE:=Combined mode wrapper for IPsec
166 DEPENDS:=+kmod-crypto-core
167 KCONFIG:=CONFIG_CRYPTO_AUTHENC
168 FILES:=$(LINUX_DIR)/crypto/authenc.$(LINUX_KMOD_SUFFIX)
169 AUTOLOAD:=$(call AutoLoad,09,authenc)
170 endef
171
172 $(eval $(call KernelPackage,crypto-authenc))
173
174 define KernelPackage/crypto-des
175 SUBMENU:=$(CRYPTO_MENU)
176 TITLE:=DES/3DES cipher CryptoAPI module
177 DEPENDS:=+kmod-crypto-core
178 KCONFIG:=CONFIG_CRYPTO_DES
179 FILES:=$(LINUX_DIR)/crypto/des$(DES_SUFFIX).$(LINUX_KMOD_SUFFIX)
180 AUTOLOAD:=$(call AutoLoad,09,des$(DES_SUFFIX))
181 endef
182
183 $(eval $(call KernelPackage,crypto-des))
184
185
186 define KernelPackage/crypto-hmac
187 SUBMENU:=$(CRYPTO_MENU)
188 TITLE:=HMAC digest CryptoAPI module
189 DEPENDS:=+kmod-crypto-core
190 KCONFIG:=CONFIG_CRYPTO_HMAC
191 FILES:=$(LINUX_DIR)/crypto/hmac.$(LINUX_KMOD_SUFFIX)
192 AUTOLOAD:=$(call AutoLoad,09,hmac)
193 endef
194
195 $(eval $(call KernelPackage,crypto-hmac))
196
197
198 define KernelPackage/crypto-md5
199 SUBMENU:=$(CRYPTO_MENU)
200 TITLE:=MD5 digest CryptoAPI module
201 DEPENDS:=+kmod-crypto-core
202 KCONFIG:=CONFIG_CRYPTO_MD5
203 FILES:=$(LINUX_DIR)/crypto/md5.$(LINUX_KMOD_SUFFIX)
204 AUTOLOAD:=$(call AutoLoad,09,md5)
205 endef
206
207 $(eval $(call KernelPackage,crypto-md5))
208
209
210 define KernelPackage/crypto-michael-mic
211 SUBMENU:=$(CRYPTO_MENU)
212 TITLE:=Michael MIC keyed digest CryptoAPI module
213 DEPENDS:=+kmod-crypto-core
214 KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
215 FILES:=$(LINUX_DIR)/crypto/michael_mic.$(LINUX_KMOD_SUFFIX)
216 AUTOLOAD:=$(call AutoLoad,09,michael_mic)
217 endef
218
219 $(eval $(call KernelPackage,crypto-michael-mic))
220
221
222 define KernelPackage/crypto-sha1
223 SUBMENU:=$(CRYPTO_MENU)
224 TITLE:=SHA1 digest CryptoAPI module
225 DEPENDS:=+kmod-crypto-core
226 KCONFIG:=CONFIG_CRYPTO_SHA1
227 FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).$(LINUX_KMOD_SUFFIX)
228 AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
229 endef
230
231 $(eval $(call KernelPackage,crypto-sha1))
232
233
234 define KernelPackage/crypto-misc
235 SUBMENU:=$(CRYPTO_MENU)
236 TITLE:=Other CryptoAPI modules
237 DEPENDS:=+kmod-crypto-core
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 define KernelPackage/crypto-ocf
282 SUBMENU:=$(CRYPTO_MENU)
283 TITLE:=OCF modules
284 DEPENDS:=+kmod-crypto-core @!TARGET_uml
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 SUBMENU:=$(CRYPTO_MENU)
307 TITLE:=Null CryptoAPI module
308 DEPENDS:=+kmod-crypto-core
309 KCONFIG:=CONFIG_CRYPTO_NULL
310 FILES:=$(LINUX_DIR)/crypto/crypto_null.$(LINUX_KMOD_SUFFIX)
311 AUTOLOAD:=$(call AutoLoad,09,crypto_null)
312 endef
313
314 $(eval $(call KernelPackage,crypto-null))
315
316
317 define KernelPackage/crypto-test
318 SUBMENU:=$(CRYPTO_MENU)
319 TITLE:=Test CryptoAPI module
320 DEPENDS:=+kmod-crypto-core
321 KCONFIG:=CONFIG_CRYPTO_TEST
322 FILES:=$(LINUX_DIR)/crypto/tcrypt.$(LINUX_KMOD_SUFFIX)
323 endef
324
325 $(eval $(call KernelPackage,crypto-test))
326
This page took 0.064312 seconds and 5 git commands to generate.