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