2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 CRYPTO_MENU
:=Cryptographic API modules
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
)
27 ALGAPI
=crypto_algapi \
30 BLKCIPHER2
=crypto_blkcipher \
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))))
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
))))
51 define KernelPackage
/crypto-core
/2.4
52 FILES
:=$(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
)
53 AUTOLOAD
:=$(call AutoLoad
,01, deflate
)
56 $(eval
$(call KernelPackage
,crypto-core
))
59 define AddDepends
/crypto
60 SUBMENU
:=$(CRYPTO_MENU
)
61 DEPENDS
+=kmod-crypto-core
$(1)
65 define KernelPackage
/crypto-hw-padlock
66 TITLE
:=VIA PadLock ACE with AES
/SHA hw crypto module
70 CONFIG_CRYPTO_DEV_PADLOCK \
71 CONFIG_CRYPTO_DEV_PADLOCK_AES \
72 CONFIG_CRYPTO_DEV_PADLOCK_SHA
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 $(call AddDepends
/crypto
)
80 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
83 define KernelPackage
/crypto-hw-geode
84 TITLE
:=AMD Geode hardware crypto module
88 CONFIG_CRYPTO_DEV_GEODE
89 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
90 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
91 $(call AddDepends
/crypto
)
94 $(eval
$(call KernelPackage
,crypto-hw-geode
))
97 define KernelPackage
/crypto-hw-hifn-795x
98 TITLE
:=HIFN
795x crypto accelerator
99 DEPENDS
:=@LINUX_2_6 @
!TARGET_ubicom32
103 CONFIG_CRYPTO_DEV_HIFN_795X \
104 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
105 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
106 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
107 $(call AddDepends
/crypto
,+kmod-crypto-des
)
110 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
113 define KernelPackage
/crypto-hw-ixp4xx
114 TITLE
:=Intel IXP4xx hardware crypto module
115 DEPENDS
:=@TARGET_ixp4xx
118 CONFIG_CRYPTO_DEV_IXP4XX
119 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
120 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
121 $(call AddDepends
/crypto
,+kmod-crypto-authenc
+kmod-crypto-des
)
124 define KernelPackage
/crypto-hw-ixp4xx
/description
125 Kernel support for the Intel IXP4xx HW crypto engine.
128 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
131 define KernelPackage
/crypto-hw-ppc4xx
132 TITLE
:=AMCC PPC4xx hardware crypto module
133 DEPENDS
:=@TARGET_ppc40x||TARGET_ppc44x
136 CONFIG_CRYPTO_DEV_PPC4XX
137 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/amcc
/crypto4xx.
$(LINUX_KMOD_SUFFIX
)
138 AUTOLOAD
:=$(call AutoLoad
,90,crypto4xx
)
139 $(call AddDepends
/crypto
)
142 define KernelPackage
/crypto-hw-ppc4xx
/description
143 Kernel support for the AMCC PPC4xx HW crypto engine.
146 $(eval
$(call KernelPackage
,crypto-hw-ppc4xx
))
149 define KernelPackage
/crypto-aes
150 TITLE
:=AES cipher CryptoAPI module
151 KCONFIG
:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
152 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
153 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
154 $(call AddDepends
/crypto
)
157 define KernelPackage
/crypto-aes
/x86
158 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
159 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
162 $(eval
$(call KernelPackage
,crypto-aes
))
165 define KernelPackage
/crypto-arc4
166 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
167 KCONFIG
:=CONFIG_CRYPTO_ARC4
168 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
169 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
170 $(call AddDepends
/crypto
)
173 $(eval
$(call KernelPackage
,crypto-arc4
))
176 define KernelPackage
/crypto-authenc
177 TITLE
:=Combined mode wrapper for IPsec
178 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
179 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
180 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
181 $(call AddDepends
/crypto
)
184 $(eval
$(call KernelPackage
,crypto-authenc
))
186 define KernelPackage
/crypto-des
187 TITLE
:=DES
/3DES cipher CryptoAPI module
188 KCONFIG
:=CONFIG_CRYPTO_DES
189 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
190 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
191 $(call AddDepends
/crypto
)
194 $(eval
$(call KernelPackage
,crypto-des
))
197 define KernelPackage
/crypto-hmac
198 TITLE
:=HMAC digest CryptoAPI module
199 KCONFIG
:=CONFIG_CRYPTO_HMAC
200 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
201 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
202 $(call AddDepends
/crypto
)
205 $(eval
$(call KernelPackage
,crypto-hmac
))
208 define KernelPackage
/crypto-md5
209 TITLE
:=MD5 digest CryptoAPI module
210 KCONFIG
:=CONFIG_CRYPTO_MD5
211 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
212 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
213 $(call AddDepends
/crypto
)
216 $(eval
$(call KernelPackage
,crypto-md5
))
219 define KernelPackage
/crypto-michael-mic
220 TITLE
:=Michael MIC keyed digest CryptoAPI module
221 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
222 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
223 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
224 $(call AddDepends
/crypto
)
227 $(eval
$(call KernelPackage
,crypto-michael-mic
))
230 define KernelPackage
/crypto-sha1
231 TITLE
:=SHA1 digest CryptoAPI module
232 KCONFIG
:=CONFIG_CRYPTO_SHA1
233 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
234 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
235 $(call AddDepends
/crypto
)
238 $(eval
$(call KernelPackage
,crypto-sha1
))
241 define KernelPackage
/crypto-misc
242 TITLE
:=Other CryptoAPI modules
244 CONFIG_CRYPTO_ANUBIS \
245 CONFIG_CRYPTO_BLOWFISH \
246 CONFIG_CRYPTO_CAMELLIA \
247 CONFIG_CRYPTO_CAST5 \
248 CONFIG_CRYPTO_CAST6 \
249 CONFIG_CRYPTO_CRC32C \
250 CONFIG_CRYPTO_FCRYPT \
251 CONFIG_CRYPTO_KHAZAD \
253 CONFIG_CRYPTO_SERPENT \
254 CONFIG_CRYPTO_SHA256 \
255 CONFIG_CRYPTO_SHA512 \
257 CONFIG_CRYPTO_TGR192 \
258 CONFIG_CRYPTO_TWOFISH \
259 CONFIG_CRYPTO_TWOFISH_COMMON \
260 CONFIG_CRYPTO_TWOFISH_586 \
263 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
264 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
265 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
266 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
267 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
268 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
269 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
270 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
271 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
272 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
273 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
274 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
275 $(call AddDepends
/crypto
)
278 define KernelPackage
/crypto-misc
/2.6
280 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
281 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
282 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
283 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
) \
284 $(LINUX_DIR
)/crypto
/twofish_common.
$(LINUX_KMOD_SUFFIX
)
287 define KernelPackage
/crypto-misc
/x86
288 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/twofish-i586.
$(LINUX_KMOD_SUFFIX
)
291 $(eval
$(call KernelPackage
,crypto-misc
))
294 define KernelPackage
/crypto-ocf
296 DEPENDS
:=+@OPENSSL_ENGINE @
!TARGET_uml
299 CONFIG_OCF_CRYPTODEV \
300 CONFIG_OCF_CRYPTOSOFT \
302 CONFIG_OCF_RANDOMHARVEST
=y
304 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
305 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
306 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
307 AUTOLOAD
:=$(call AutoLoad
,09, \
312 $(call AddDepends
/crypto
)
315 $(eval
$(call KernelPackage
,crypto-ocf
))
318 define KernelPackage
/crypto-ocf-hifn7751
319 TITLE
:=OCF support for Hifn
6500/7751/7811/795x
, Invertex AEON and NetSec
7751 devices
320 DEPENDS
:=+@OPENSSL_ENGINE @PCI_SUPPORT @
!TARGET_uml kmod-crypto-ocf
321 KCONFIG
:=CONFIG_OCF_HIFN
322 FILES
:=$(LINUX_DIR
)/crypto
/ocf
/hifn
/hifn7751.
$(LINUX_KMOD_SUFFIX
)
323 AUTOLOAD
:=$(call AutoLoad
,10,hifn7751
)
324 $(call AddDepends
/crypto
)
327 $(eval
$(call KernelPackage
,crypto-ocf-hifn7751
))
330 define KernelPackage
/crypto-ocf-hifnhipp
331 TITLE
:=OCF support for Hifn
7855/8155 devices
332 DEPENDS
:=+@OPENSSL_ENGINE @PCI_SUPPORT @
!TARGET_uml kmod-crypto-ocf
333 KCONFIG
:=CONFIG_OCF_HIFNHIPP
334 FILES
:=$(LINUX_DIR
)/crypto
/ocf
/hifn
/hifnHIPP.
$(LINUX_KMOD_SUFFIX
)
335 AUTOLOAD
:=$(call AutoLoad
,10,hifnhipp
)
336 $(call AddDepends
/crypto
)
339 $(eval
$(call KernelPackage
,crypto-ocf-hifnhipp
))
342 define KernelPackage
/crypto-null
343 TITLE
:=Null CryptoAPI module
344 KCONFIG
:=CONFIG_CRYPTO_NULL
345 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
346 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
347 $(call AddDepends
/crypto
)
350 $(eval
$(call KernelPackage
,crypto-null
))
353 define KernelPackage
/crypto-test
354 TITLE
:=Test CryptoAPI module
355 KCONFIG
:=CONFIG_CRYPTO_TEST
356 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
357 $(call AddDepends
/crypto
)
360 $(eval
$(call KernelPackage
,crypto-test
))