2 # Copyright (C) 2006-2008 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 KernelPackage
/crypto
/Depends
60 SUBMENU
:=$(CRYPTO_MENU
)
61 DEPENDS
:=kmod-crypto-core
$(1)
65 define KernelPackage
/crypto-hw-padlock
66 $(call KernelPackage
/crypto
/Depends
,)
67 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
)
79 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
82 define KernelPackage
/crypto-hw-geode
83 $(call KernelPackage
/crypto
/Depends
,)
84 TITLE
:=AMD Geode hardware crypto module
87 CONFIG_CRYPTO_DEV_GEODE
88 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
89 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
92 $(eval
$(call KernelPackage
,crypto-hw-geode
))
95 define KernelPackage
/crypto-hw-hifn-795x
96 $(call KernelPackage
/crypto
/Depends
,+kmod-crypto-des @
!TARGET_ubicom32
)
97 TITLE
:=HIFN
795x crypto accelerator
100 CONFIG_CRYPTO_DEV_HIFN_795X \
101 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
102 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
103 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
106 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
109 define KernelPackage
/crypto-hw-ixp4xx
110 $(call KernelPackage
/crypto
/Depends
,@TARGET_ixp4xx
+kmod-crypto-des
+kmod-crypto-authenc
)
111 TITLE
:=Intel IXP4xx hardware crypto module
114 CONFIG_CRYPTO_DEV_IXP4XX
115 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
116 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
119 define KernelPackage
/crypto-hw-ixp4xx
/description
120 Kernel support for the Intel IXP4xx HW crypto engine.
123 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
126 define KernelPackage
/crypto-hw-ppc4xx
127 $(call KernelPackage
/crypto
/Depends
,@TARGET_ppc40x||TARGET_ppc44x
)
128 TITLE
:=AMCC PPC4xx hardware crypto module
131 CONFIG_CRYPTO_DEV_PPC4XX
132 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/amcc
/crypto4xx.
$(LINUX_KMOD_SUFFIX
)
133 AUTOLOAD
:=$(call AutoLoad
,90,crypto4xx
)
136 define KernelPackage
/crypto-hw-ppc4xx
/description
137 Kernel support for the AMCC PPC4xx HW crypto engine.
140 $(eval
$(call KernelPackage
,crypto-hw-ppc4xx
))
143 define KernelPackage
/crypto-aes
144 $(call KernelPackage
/crypto
/Depends
,)
145 TITLE
:=AES cipher CryptoAPI module
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
))
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
)
156 $(eval
$(call KernelPackage
,crypto-aes
))
159 define KernelPackage
/crypto-arc4
160 $(call KernelPackage
/crypto
/Depends
,)
161 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
162 KCONFIG
:=CONFIG_CRYPTO_ARC4
163 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
164 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
167 $(eval
$(call KernelPackage
,crypto-arc4
))
170 define KernelPackage
/crypto-authenc
171 $(call KernelPackage
/crypto
/Depends
,)
172 TITLE
:=Combined mode wrapper for IPsec
173 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
174 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
175 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
178 $(eval
$(call KernelPackage
,crypto-authenc
))
180 define KernelPackage
/crypto-des
181 $(call KernelPackage
/crypto
/Depends
,)
182 TITLE
:=DES
/3DES cipher CryptoAPI module
183 KCONFIG
:=CONFIG_CRYPTO_DES
184 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
185 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
188 $(eval
$(call KernelPackage
,crypto-des
))
191 define KernelPackage
/crypto-hmac
192 $(call KernelPackage
/crypto
/Depends
,)
193 TITLE
:=HMAC digest CryptoAPI module
194 KCONFIG
:=CONFIG_CRYPTO_HMAC
195 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
196 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
199 $(eval
$(call KernelPackage
,crypto-hmac
))
202 define KernelPackage
/crypto-md5
203 $(call KernelPackage
/crypto
/Depends
,)
204 TITLE
:=MD5 digest CryptoAPI module
205 KCONFIG
:=CONFIG_CRYPTO_MD5
206 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
207 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
210 $(eval
$(call KernelPackage
,crypto-md5
))
213 define KernelPackage
/crypto-michael-mic
214 $(call KernelPackage
/crypto
/Depends
,)
215 TITLE
:=Michael MIC keyed digest CryptoAPI module
216 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
217 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
218 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
221 $(eval
$(call KernelPackage
,crypto-michael-mic
))
224 define KernelPackage
/crypto-sha1
225 $(call KernelPackage
/crypto
/Depends
,)
226 TITLE
:=SHA1 digest CryptoAPI module
227 KCONFIG
:=CONFIG_CRYPTO_SHA1
228 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
229 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
232 $(eval
$(call KernelPackage
,crypto-sha1
))
235 define KernelPackage
/crypto-misc
236 $(call KernelPackage
/crypto
/Depends
,)
237 TITLE
:=Other CryptoAPI modules
239 CONFIG_CRYPTO_ANUBIS \
240 CONFIG_CRYPTO_BLOWFISH \
241 CONFIG_CRYPTO_CAMELLIA \
242 CONFIG_CRYPTO_CAST5 \
243 CONFIG_CRYPTO_CAST6 \
244 CONFIG_CRYPTO_CRC32C \
245 CONFIG_CRYPTO_FCRYPT \
246 CONFIG_CRYPTO_KHAZAD \
248 CONFIG_CRYPTO_SERPENT \
249 CONFIG_CRYPTO_SHA256 \
250 CONFIG_CRYPTO_SHA512 \
252 CONFIG_CRYPTO_TGR192 \
253 CONFIG_CRYPTO_TWOFISH \
254 CONFIG_CRYPTO_TWOFISH_586 \
257 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
258 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
259 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
260 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
261 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
262 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
263 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
264 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
265 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
266 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
267 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
268 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
271 define KernelPackage
/crypto-misc
/2.6
273 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
274 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
275 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
276 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
279 $(eval
$(call KernelPackage
,crypto-misc
))
282 define KernelPackage
/crypto-ocf
283 $(call KernelPackage
/crypto
/Depends
,@
!TARGET_uml
+@OPENSSL_ENGINE
)
287 CONFIG_OCF_CRYPTODEV \
288 CONFIG_OCF_CRYPTOSOFT \
290 CONFIG_OCF_RANDOMHARVEST
=y
292 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
293 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
294 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
295 AUTOLOAD
:=$(call AutoLoad
,09, \
302 $(eval
$(call KernelPackage
,crypto-ocf
))
305 define KernelPackage
/crypto-null
306 $(call KernelPackage
/crypto
/Depends
,)
307 TITLE
:=Null CryptoAPI module
308 KCONFIG
:=CONFIG_CRYPTO_NULL
309 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
310 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
313 $(eval
$(call KernelPackage
,crypto-null
))
316 define KernelPackage
/crypto-test
317 $(call KernelPackage
/crypto
/Depends
,)
318 TITLE
:=Test CryptoAPI module
319 KCONFIG
:=CONFIG_CRYPTO_TEST
320 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
323 $(eval
$(call KernelPackage
,crypto-test
))