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-hw-padlock
60 SUBMENU
:=$(CRYPTO_MENU
)
61 TITLE
:=VIA PadLock ACE with AES
/SHA hw crypto module
62 DEPENDS
:=+kmod-crypto-core
65 CONFIG_CRYPTO_DEV_PADLOCK \
66 CONFIG_CRYPTO_DEV_PADLOCK_AES \
67 CONFIG_CRYPTO_DEV_PADLOCK_SHA
69 $(LINUX_DIR
)/drivers
/crypto
/padlock-aes.
$(LINUX_KMOD_SUFFIX
) \
70 $(LINUX_DIR
)/drivers
/crypto
/padlock-sha.
$(LINUX_KMOD_SUFFIX
)
71 AUTOLOAD
:=$(call AutoLoad
,09,padlock-aes padlock-sha
)
74 $(eval
$(call KernelPackage
,crypto-hw-padlock
))
77 define KernelPackage
/crypto-hw-geode
78 SUBMENU
:=$(CRYPTO_MENU
)
79 TITLE
:=AMD Geode hardware crypto module
80 DEPENDS
:=+kmod-crypto-core
83 CONFIG_CRYPTO_DEV_GEODE
84 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/geode-aes.
$(LINUX_KMOD_SUFFIX
)
85 AUTOLOAD
:=$(call AutoLoad
,09,geode-aes
)
88 $(eval
$(call KernelPackage
,crypto-hw-geode
))
91 define KernelPackage
/crypto-hw-hifn-795x
92 SUBMENU
:=$(CRYPTO_MENU
)
93 TITLE
:=HIFN
795x crypto accelerator
94 DEPENDS
:=+kmod-crypto-core
+kmod-crypto-des @
!TARGET_ubicom32
97 CONFIG_CRYPTO_DEV_HIFN_795X \
98 CONFIG_CRYPTO_DEV_HIFN_795X_RNG
=y
99 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/hifn_795x.
$(LINUX_KMOD_SUFFIX
)
100 AUTOLOAD
:=$(call AutoLoad
,09,hifn_795x
)
103 $(eval
$(call KernelPackage
,crypto-hw-hifn-795x
))
106 define KernelPackage
/crypto-hw-ixp4xx
107 SUBMENU
:=$(CRYPTO_MENU
)
108 TITLE
:=Intel IXP4xx hardware crypto module
110 @TARGET_ixp4xx
+kmod-crypto-core
+kmod-crypto-des
+kmod-crypto-authenc
113 CONFIG_CRYPTO_DEV_IXP4XX
114 FILES
:=$(LINUX_DIR
)/drivers
/crypto
/ixp4xx_crypto.
$(LINUX_KMOD_SUFFIX
)
115 AUTOLOAD
:=$(call AutoLoad
,90,ixp4xx_crypto
)
118 define KernelPackage
/crypto-hw-ixp4xx
/description
119 Kernel support for the Intel IXP4xx HW crypto engine.
122 $(eval
$(call KernelPackage
,crypto-hw-ixp4xx
))
125 define KernelPackage
/crypto-hw-ppc4xx
126 SUBMENU
:=$(CRYPTO_MENU
)
127 TITLE
:=AMCC PPC4xx hardware crypto module
129 @TARGET_ppc40x||TARGET_ppc44x
+kmod-crypto-core
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 SUBMENU
:=$(CRYPTO_MENU
)
146 TITLE
:=AES cipher CryptoAPI module
147 DEPENDS
:=+kmod-crypto-core
148 KCONFIG
:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
149 FILES
:=$(LINUX_DIR
)/crypto
/aes
$(AES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
150 AUTOLOAD
:=$(call AutoLoad
,09,aes
$(AES_SUFFIX
))
153 define KernelPackage
/crypto-aes
/x86-2.6
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 SUBMENU
:=$(CRYPTO_MENU
)
163 TITLE
:=ARC4
(RC4
) cipher CryptoAPI module
164 DEPENDS
:=+kmod-crypto-core
165 KCONFIG
:=CONFIG_CRYPTO_ARC4
166 FILES
:=$(LINUX_DIR
)/crypto
/arc4.
$(LINUX_KMOD_SUFFIX
)
167 AUTOLOAD
:=$(call AutoLoad
,09,arc4
)
170 $(eval
$(call KernelPackage
,crypto-arc4
))
173 define KernelPackage
/crypto-authenc
174 SUBMENU
:=$(CRYPTO_MENU
)
175 TITLE
:=Combined mode wrapper for IPsec
176 DEPENDS
:=+kmod-crypto-core
177 KCONFIG
:=CONFIG_CRYPTO_AUTHENC
178 FILES
:=$(LINUX_DIR
)/crypto
/authenc.
$(LINUX_KMOD_SUFFIX
)
179 AUTOLOAD
:=$(call AutoLoad
,09,authenc
)
182 $(eval
$(call KernelPackage
,crypto-authenc
))
184 define KernelPackage
/crypto-des
185 SUBMENU
:=$(CRYPTO_MENU
)
186 TITLE
:=DES
/3DES cipher CryptoAPI module
187 DEPENDS
:=+kmod-crypto-core
188 KCONFIG
:=CONFIG_CRYPTO_DES
189 FILES
:=$(LINUX_DIR
)/crypto
/des
$(DES_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
190 AUTOLOAD
:=$(call AutoLoad
,09,des
$(DES_SUFFIX
))
193 $(eval
$(call KernelPackage
,crypto-des
))
196 define KernelPackage
/crypto-hmac
197 SUBMENU
:=$(CRYPTO_MENU
)
198 TITLE
:=HMAC digest CryptoAPI module
199 DEPENDS
:=+kmod-crypto-core
200 KCONFIG
:=CONFIG_CRYPTO_HMAC
201 FILES
:=$(LINUX_DIR
)/crypto
/hmac.
$(LINUX_KMOD_SUFFIX
)
202 AUTOLOAD
:=$(call AutoLoad
,09,hmac
)
205 $(eval
$(call KernelPackage
,crypto-hmac
))
208 define KernelPackage
/crypto-md5
209 SUBMENU
:=$(CRYPTO_MENU
)
210 TITLE
:=MD5 digest CryptoAPI module
211 DEPENDS
:=+kmod-crypto-core
212 KCONFIG
:=CONFIG_CRYPTO_MD5
213 FILES
:=$(LINUX_DIR
)/crypto
/md5.
$(LINUX_KMOD_SUFFIX
)
214 AUTOLOAD
:=$(call AutoLoad
,09,md5
)
217 $(eval
$(call KernelPackage
,crypto-md5
))
220 define KernelPackage
/crypto-michael-mic
221 SUBMENU
:=$(CRYPTO_MENU
)
222 TITLE
:=Michael MIC keyed digest CryptoAPI module
223 DEPENDS
:=+kmod-crypto-core
224 KCONFIG
:=CONFIG_CRYPTO_MICHAEL_MIC
225 FILES
:=$(LINUX_DIR
)/crypto
/michael_mic.
$(LINUX_KMOD_SUFFIX
)
226 AUTOLOAD
:=$(call AutoLoad
,09,michael_mic
)
229 $(eval
$(call KernelPackage
,crypto-michael-mic
))
232 define KernelPackage
/crypto-sha1
233 SUBMENU
:=$(CRYPTO_MENU
)
234 TITLE
:=SHA1 digest CryptoAPI module
235 DEPENDS
:=+kmod-crypto-core
236 KCONFIG
:=CONFIG_CRYPTO_SHA1
237 FILES
:=$(LINUX_DIR
)/crypto
/sha1
$(SHA1_SUFFIX
).
$(LINUX_KMOD_SUFFIX
)
238 AUTOLOAD
:=$(call AutoLoad
,09,sha1
$(SHA1_SUFFIX
))
241 $(eval
$(call KernelPackage
,crypto-sha1
))
244 define KernelPackage
/crypto-misc
245 SUBMENU
:=$(CRYPTO_MENU
)
246 TITLE
:=Other CryptoAPI modules
247 DEPENDS
:=+kmod-crypto-core
249 CONFIG_CRYPTO_ANUBIS \
250 CONFIG_CRYPTO_BLOWFISH \
251 CONFIG_CRYPTO_CAMELLIA \
252 CONFIG_CRYPTO_CAST5 \
253 CONFIG_CRYPTO_CAST6 \
254 CONFIG_CRYPTO_CRC32C \
255 CONFIG_CRYPTO_FCRYPT \
256 CONFIG_CRYPTO_KHAZAD \
258 CONFIG_CRYPTO_SERPENT \
259 CONFIG_CRYPTO_SHA256 \
260 CONFIG_CRYPTO_SHA512 \
262 CONFIG_CRYPTO_TGR192 \
263 CONFIG_CRYPTO_TWOFISH \
264 CONFIG_CRYPTO_TWOFISH_586 \
267 $(LINUX_DIR
)/crypto
/anubis.
$(LINUX_KMOD_SUFFIX
) \
268 $(LINUX_DIR
)/crypto
/blowfish.
$(LINUX_KMOD_SUFFIX
) \
269 $(LINUX_DIR
)/crypto
/cast5.
$(LINUX_KMOD_SUFFIX
) \
270 $(LINUX_DIR
)/crypto
/cast6.
$(LINUX_KMOD_SUFFIX
) \
271 $(LINUX_DIR
)/crypto
/khazad.
$(LINUX_KMOD_SUFFIX
) \
272 $(LINUX_DIR
)/crypto
/md4.
$(LINUX_KMOD_SUFFIX
) \
273 $(LINUX_DIR
)/crypto
/serpent.
$(LINUX_KMOD_SUFFIX
) \
274 $(LINUX_DIR
)/crypto
/sha256
$(SHA256_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
275 $(LINUX_DIR
)/crypto
/sha512
$(SHA512_SUFFIX
).
$(LINUX_KMOD_SUFFIX
) \
276 $(LINUX_DIR
)/crypto
/tea.
$(LINUX_KMOD_SUFFIX
) \
277 $(LINUX_DIR
)/crypto
/twofish.
$(LINUX_KMOD_SUFFIX
) \
278 $(LINUX_DIR
)/crypto
/wp512.
$(LINUX_KMOD_SUFFIX
)
281 define KernelPackage
/crypto-misc
/2.6
283 $(LINUX_DIR
)/crypto
/camellia.
$(LINUX_KMOD_SUFFIX
) \
284 $(LINUX_DIR
)/crypto
/crc32c.
$(LINUX_KMOD_SUFFIX
) \
285 $(LINUX_DIR
)/crypto
/fcrypt.
$(LINUX_KMOD_SUFFIX
) \
286 $(LINUX_DIR
)/crypto
/tgr192.
$(LINUX_KMOD_SUFFIX
)
289 $(eval
$(call KernelPackage
,crypto-misc
))
291 define KernelPackage
/crypto-ocf
292 SUBMENU
:=$(CRYPTO_MENU
)
294 DEPENDS
:=+kmod-crypto-core @
!TARGET_uml
297 CONFIG_OCF_CRYPTODEV \
298 CONFIG_OCF_CRYPTOSOFT \
300 CONFIG_OCF_RANDOMHARVEST
=y
302 $(LINUX_DIR
)/crypto
/ocf
/ocf.
$(LINUX_KMOD_SUFFIX
) \
303 $(LINUX_DIR
)/crypto
/ocf
/cryptodev.
$(LINUX_KMOD_SUFFIX
) \
304 $(LINUX_DIR
)/crypto
/ocf
/cryptosoft.
$(LINUX_KMOD_SUFFIX
)
305 AUTOLOAD
:=$(call AutoLoad
,09, \
312 $(eval
$(call KernelPackage
,crypto-ocf
))
315 define KernelPackage
/crypto-null
316 SUBMENU
:=$(CRYPTO_MENU
)
317 TITLE
:=Null CryptoAPI module
318 DEPENDS
:=+kmod-crypto-core
319 KCONFIG
:=CONFIG_CRYPTO_NULL
320 FILES
:=$(LINUX_DIR
)/crypto
/crypto_null.
$(LINUX_KMOD_SUFFIX
)
321 AUTOLOAD
:=$(call AutoLoad
,09,crypto_null
)
324 $(eval
$(call KernelPackage
,crypto-null
))
327 define KernelPackage
/crypto-test
328 SUBMENU
:=$(CRYPTO_MENU
)
329 TITLE
:=Test CryptoAPI module
330 DEPENDS
:=+kmod-crypto-core
331 KCONFIG
:=CONFIG_CRYPTO_TEST
332 FILES
:=$(LINUX_DIR
)/crypto
/tcrypt.
$(LINUX_KMOD_SUFFIX
)
335 $(eval
$(call KernelPackage
,crypto-test
))