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 CRYPTO_GENERIC
:=_generic
18 AES_SUFFIX
:=$(CRYPTO_GENERIC
)
19 DES_SUFFIX
:=$(CRYPTO_GENERIC
)
20 SHA1_SUFFIX
:=$(CRYPTO_GENERIC
)
21 SHA256_SUFFIX
:=$(CRYPTO_GENERIC
)
22 SHA512_SUFFIX
:=$(CRYPTO_GENERIC
)
25 ALGAPI
=crypto_algapi \
28 BLKCIPHER2
=crypto_blkcipher \
35 crypto_confvar
=CONFIG_CRYPTO_
$(word 1,$(subst =,$(space
),$(1)))
36 crypto_file
=$(if
$(findstring y
,$($(call crypto_confvar
,$(1)))),,$(LINUX_DIR
)/crypto
/$(word 2,$(subst =,$(space
),$(1))).
$(LINUX_KMOD_SUFFIX
))
37 crypto_name
=$(if
$(findstring y
,$($(call crypto_confvar
,$(1)))),,$(word 2,$(subst =,$(space
),$(1))))
39 # XXX: added CONFIG_CRYPTO_HMAC to KCONFIG so that CONFIG_CRYPTO_HASH is
40 # always set, even if no hash modules are selected
41 define KernelPackage
/crypto-core
42 SUBMENU
:=$(CRYPTO_MENU
)
43 TITLE
:=Core CryptoAPI modules
44 KCONFIG
:=CONFIG_CRYPTO
=y CONFIG_CRYPTO_HMAC
$(foreach mod
,$(CRYPTO_MODULES
),$(call crypto_confvar
,$(mod
)))
45 FILES
:=$(foreach mod
,$(CRYPTO_MODULES
),$(call crypto_file
,$(mod
)))
46 AUTOLOAD
:=$(call AutoLoad
,01,$(foreach mod
,$(CRYPTO_MODULES
),$(call crypto_name
,$(mod
))))
49 define KernelPackage
/crypto-core
/2.4
50 FILES
:=$(LINUX_DIR
)/crypto
/deflate.
$(LINUX_KMOD_SUFFIX
)
51 AUTOLOAD
:=$(call AutoLoad
,01, deflate
)
54 $(eval
$(call KernelPackage
,crypto-core
))
57 define AddDepends
/crypto
58 SUBMENU
:=$(CRYPTO_MENU
)
59 DEPENDS
+=kmod-crypto-core
$(1)
63 define KernelPackage
/crypto-hw-padlock
64 TITLE
:=VIA PadLock ACE with AES
/SHA hw crypto module
67 CONFIG_CRYPTO_DEV_PADLOCK \
68 CONFIG_CRYPTO_DEV_PADLOCK_AES \
69 CONFIG_CRYPTO_DEV_PADLOCK_SHA
71 $(LINUX_DIR
)/drivers
/crypto
/padlock-aes.
$(LINUX_KMOD_SUFFIX
) \
72 $(LINUX_DIR
)/drivers
/crypto
/padlock-sha.
$(LINUX_KMOD_SUFFIX
)
73 AUTOLOAD
:=$(call AutoLoad
,09,padlock-aes padlock-sha
)
74 $(call AddDepends
/crypto
)
77 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
80 define KernelPackage
/crypto-hw-geode
81 TITLE
:=AMD Geode hardware crypto module
84 CONFIG_CRYPTO_DEV_GEODE
85 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
86 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
87 $(call AddDepends
/crypto
)
90 $(eval
$(call KernelPackage
,crypto-hw-geode
))
93 define KernelPackage
/crypto-hw-hifn-795x
94 TITLE
:=HIFN
795x crypto accelerator
95 DEPENDS
:=@
!TARGET_ubicom32
99 CONFIG_CRYPTO_DEV_HIFN_795X \
100 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
101 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
102 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
103 $(call AddDepends
/crypto
,+kmod-crypto-des
)
106 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
109 define KernelPackage
/crypto-hw-ixp4xx
110 TITLE
:=Intel IXP4xx hardware crypto module
111 DEPENDS
:=@TARGET_ixp4xx
114 CONFIG_CRYPTO_DEV_IXP4XX
115 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
116 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
117 $(call AddDepends
/crypto
,+kmod-crypto-authenc
+kmod-crypto-des
)
120 define KernelPackage
/crypto-hw-ixp4xx
/description
121 Kernel support for the Intel IXP4xx HW crypto engine.
124 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
127 define KernelPackage
/crypto-hw-ppc4xx
128 TITLE
:=AMCC PPC4xx hardware crypto module
129 DEPENDS
:=@TARGET_ppc40x||TARGET_ppc44x
132 CONFIG_CRYPTO_DEV_PPC4XX
133 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/amcc
/crypto4xx.
$(LINUX_KMOD_SUFFIX
)
134 AUTOLOAD
:=$(call AutoLoad
,90,crypto4xx
)
135 $(call AddDepends
/crypto
)
138 define KernelPackage
/crypto-hw-ppc4xx
/description
139 Kernel support for the AMCC PPC4xx HW crypto engine.
142 $(eval
$(call KernelPackage
,crypto-hw-ppc4xx
))
145 define KernelPackage
/crypto-aes
146 TITLE
:=AES cipher CryptoAPI module
147 KCONFIG
:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
148 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
149 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
150 $(call AddDepends
/crypto
)
153 define KernelPackage
/crypto-aes
/x86
154 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
155 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
158 $(eval
$(call KernelPackage
,crypto-aes
))
161 define KernelPackage
/crypto-arc4
162 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
163 KCONFIG
:=CONFIG_CRYPTO_ARC4
164 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
165 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
166 $(call AddDepends
/crypto
)
169 $(eval
$(call KernelPackage
,crypto-arc4
))
172 define KernelPackage
/crypto-authenc
173 TITLE
:=Combined mode wrapper for IPsec
174 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
175 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
176 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
177 $(call AddDepends
/crypto
)
180 $(eval
$(call KernelPackage
,crypto-authenc
))
182 define KernelPackage
/crypto-des
183 TITLE
:=DES
/3DES cipher CryptoAPI module
184 KCONFIG
:=CONFIG_CRYPTO_DES
185 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
186 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
187 $(call AddDepends
/crypto
)
190 $(eval
$(call KernelPackage
,crypto-des
))
193 define KernelPackage
/crypto-hmac
194 TITLE
:=HMAC digest CryptoAPI module
195 KCONFIG
:=CONFIG_CRYPTO_HMAC
196 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
197 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
198 $(call AddDepends
/crypto
)
201 $(eval
$(call KernelPackage
,crypto-hmac
))
204 define KernelPackage
/crypto-md5
205 TITLE
:=MD5 digest CryptoAPI module
206 KCONFIG
:=CONFIG_CRYPTO_MD5
207 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
208 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
209 $(call AddDepends
/crypto
)
212 $(eval
$(call KernelPackage
,crypto-md5
))
215 define KernelPackage
/crypto-michael-mic
216 TITLE
:=Michael MIC keyed digest CryptoAPI module
217 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
218 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
219 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
220 $(call AddDepends
/crypto
)
223 $(eval
$(call KernelPackage
,crypto-michael-mic
))
226 define KernelPackage
/crypto-sha1
227 TITLE
:=SHA1 digest CryptoAPI module
228 KCONFIG
:=CONFIG_CRYPTO_SHA1
229 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
230 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
231 $(call AddDepends
/crypto
)
234 $(eval
$(call KernelPackage
,crypto-sha1
))
237 define KernelPackage
/crypto-misc
238 TITLE
:=Other CryptoAPI modules
240 CONFIG_CRYPTO_ANUBIS \
241 CONFIG_CRYPTO_BLOWFISH \
242 CONFIG_CRYPTO_CAMELLIA \
243 CONFIG_CRYPTO_CAST5 \
244 CONFIG_CRYPTO_CAST6 \
245 CONFIG_CRYPTO_CRC32C \
246 CONFIG_CRYPTO_FCRYPT \
247 CONFIG_CRYPTO_KHAZAD \
249 CONFIG_CRYPTO_SERPENT \
250 CONFIG_CRYPTO_SHA256 \
251 CONFIG_CRYPTO_SHA512 \
253 CONFIG_CRYPTO_TGR192 \
254 CONFIG_CRYPTO_TWOFISH \
255 CONFIG_CRYPTO_TWOFISH_COMMON \
256 CONFIG_CRYPTO_TWOFISH_586 \
259 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
260 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
261 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
262 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
263 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
264 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
265 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
266 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
267 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
268 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
269 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
270 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
271 $(call AddDepends
/crypto
)
274 define KernelPackage
/crypto-misc
/2.6
276 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
277 $(if
$(findstring y
,$(CONFIG_CRYPTO_CRC32C
)),,$(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
)) \
278 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
279 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
) \
280 $(LINUX_DIR
)/crypto
/twofish_common.
$(LINUX_KMOD_SUFFIX
)
283 define KernelPackage
/crypto-misc
/x86
284 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/twofish-i586.
$(LINUX_KMOD_SUFFIX
)
287 $(eval
$(call KernelPackage
,crypto-misc
))
290 define KernelPackage
/crypto-ocf
292 DEPENDS
:=+@OPENSSL_ENGINE @
!TARGET_uml
295 CONFIG_OCF_CRYPTODEV \
296 CONFIG_OCF_CRYPTOSOFT \
298 CONFIG_OCF_RANDOMHARVEST
=y
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, \
308 $(call AddDepends
/crypto
)
311 $(eval
$(call KernelPackage
,crypto-ocf
))
314 define KernelPackage
/crypto-ocf-hifn7751
315 TITLE
:=OCF support for Hifn
6500/7751/7811/795x
, Invertex AEON and NetSec
7751 devices
316 DEPENDS
:=+@OPENSSL_ENGINE @PCI_SUPPORT @
!TARGET_uml kmod-crypto-ocf
317 KCONFIG
:=CONFIG_OCF_HIFN
318 FILES
:=$(LINUX_DIR
)/crypto
/ocf
/hifn
/hifn7751.
$(LINUX_KMOD_SUFFIX
)
319 AUTOLOAD
:=$(call AutoLoad
,10,hifn7751
)
320 $(call AddDepends
/crypto
)
323 $(eval
$(call KernelPackage
,crypto-ocf-hifn7751
))
326 define KernelPackage
/crypto-ocf-hifnhipp
327 TITLE
:=OCF support for Hifn
7855/8155 devices
328 DEPENDS
:=+@OPENSSL_ENGINE @PCI_SUPPORT @
!TARGET_uml kmod-crypto-ocf
329 KCONFIG
:=CONFIG_OCF_HIFNHIPP
330 FILES
:=$(LINUX_DIR
)/crypto
/ocf
/hifn
/hifnHIPP.
$(LINUX_KMOD_SUFFIX
)
331 AUTOLOAD
:=$(call AutoLoad
,10,hifnhipp
)
332 $(call AddDepends
/crypto
)
335 $(eval
$(call KernelPackage
,crypto-ocf-hifnhipp
))
338 define KernelPackage
/crypto-null
339 TITLE
:=Null CryptoAPI module
340 KCONFIG
:=CONFIG_CRYPTO_NULL
341 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
342 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
343 $(call AddDepends
/crypto
)
346 $(eval
$(call KernelPackage
,crypto-null
))
349 define KernelPackage
/crypto-test
350 TITLE
:=Test CryptoAPI module
351 KCONFIG
:=CONFIG_CRYPTO_TEST
352 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
353 $(call AddDepends
/crypto
)
356 $(eval
$(call KernelPackage
,crypto-test
))