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
101 CONFIG_CRYPTO_DEV_HIFN_795X \
102 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
103 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
104 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
107 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
110 define KernelPackage
/crypto-hw-ixp4xx
111 $(call KernelPackage
/crypto
/Depends
,@TARGET_ixp4xx
+kmod-crypto-des
+kmod-crypto-authenc
)
112 TITLE
:=Intel IXP4xx hardware crypto module
115 CONFIG_CRYPTO_DEV_IXP4XX
116 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
117 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
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 $(call KernelPackage
/crypto
/Depends
,@TARGET_ppc40x||TARGET_ppc44x
)
129 TITLE
:=AMCC PPC4xx hardware crypto module
132 CONFIG_CRYPTO_DEV_PPC4XX
133 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/amcc
/crypto4xx.
$(LINUX_KMOD_SUFFIX
)
134 AUTOLOAD
:=$(call AutoLoad
,90,crypto4xx
)
137 define KernelPackage
/crypto-hw-ppc4xx
/description
138 Kernel support for the AMCC PPC4xx HW crypto engine.
141 $(eval
$(call KernelPackage
,crypto-hw-ppc4xx
))
144 define KernelPackage
/crypto-aes
145 $(call KernelPackage
/crypto
/Depends
,)
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
))
152 define KernelPackage
/crypto-aes
/x86-2.6
153 FILES
+=$(LINUX_DIR
)/arch
/x86
/crypto
/aes-i586.
$(LINUX_KMOD_SUFFIX
)
154 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
) aes-i586
)
157 $(eval
$(call KernelPackage
,crypto-aes
))
160 define KernelPackage
/crypto-arc4
161 $(call KernelPackage
/crypto
/Depends
,)
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
)
168 $(eval
$(call KernelPackage
,crypto-arc4
))
171 define KernelPackage
/crypto-authenc
172 $(call KernelPackage
/crypto
/Depends
,)
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
)
179 $(eval
$(call KernelPackage
,crypto-authenc
))
181 define KernelPackage
/crypto-des
182 $(call KernelPackage
/crypto
/Depends
,)
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
))
189 $(eval
$(call KernelPackage
,crypto-des
))
192 define KernelPackage
/crypto-hmac
193 $(call KernelPackage
/crypto
/Depends
,)
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
)
200 $(eval
$(call KernelPackage
,crypto-hmac
))
203 define KernelPackage
/crypto-md5
204 $(call KernelPackage
/crypto
/Depends
,)
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
)
211 $(eval
$(call KernelPackage
,crypto-md5
))
214 define KernelPackage
/crypto-michael-mic
215 $(call KernelPackage
/crypto
/Depends
,)
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
)
222 $(eval
$(call KernelPackage
,crypto-michael-mic
))
225 define KernelPackage
/crypto-sha1
226 $(call KernelPackage
/crypto
/Depends
,)
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
))
233 $(eval
$(call KernelPackage
,crypto-sha1
))
236 define KernelPackage
/crypto-misc
237 $(call KernelPackage
/crypto
/Depends
,)
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_586 \
258 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
259 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
260 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
261 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
262 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
263 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
264 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
265 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
266 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
267 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
268 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
269 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
272 define KernelPackage
/crypto-misc
/2.6
274 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
275 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
276 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
277 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
280 $(eval
$(call KernelPackage
,crypto-misc
))
283 define KernelPackage
/crypto-ocf
284 $(call KernelPackage
/crypto
/Depends
,@
!TARGET_uml
+@OPENSSL_ENGINE
)
288 CONFIG_OCF_CRYPTODEV \
289 CONFIG_OCF_CRYPTOSOFT \
291 CONFIG_OCF_RANDOMHARVEST
=y
293 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
294 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
295 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
296 AUTOLOAD
:=$(call AutoLoad
,09, \
303 $(eval
$(call KernelPackage
,crypto-ocf
))
306 define KernelPackage
/crypto-null
307 $(call KernelPackage
/crypto
/Depends
,)
308 TITLE
:=Null CryptoAPI module
309 KCONFIG
:=CONFIG_CRYPTO_NULL
310 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
311 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
314 $(eval
$(call KernelPackage
,crypto-null
))
317 define KernelPackage
/crypto-test
318 $(call KernelPackage
/crypto
/Depends
,)
319 TITLE
:=Test CryptoAPI module
320 KCONFIG
:=CONFIG_CRYPTO_TEST
321 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
324 $(eval
$(call KernelPackage
,crypto-test
))