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