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