SHA256_SUFFIX:=$(CRYPTO_GENERIC)
SHA512_SUFFIX:=$(CRYPTO_GENERIC)
-CRYPTO_MODULES = \
- ALGAPI2=crypto_algapi \
+CRYPTO_MODULES = ALGAPI2=crypto_algapi
+
+CRYPTOMGR_MODULES = \
AEAD2=aead \
- BLKCIPHER2=crypto_blkcipher \
- HASH2=crypto_hash \
MANAGER2=cryptomgr \
- ECB=ecb
+ BLKCIPHER2=crypto_blkcipher
crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
crypto_file=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko)
KCONFIG:= \
CONFIG_CRYPTO=y \
CONFIG_CRYPTO_HW=y \
- CONFIG_CRYPTO_HMAC \
- CONFIG_CRYPTO_AEAD \
CONFIG_CRYPTO_ALGAPI \
- CONFIG_CRYPTO_BLKCIPHER \
- CONFIG_CRYPTO_HASH \
- CONFIG_CRYPTO_MANAGER \
$(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call crypto_name,$(mod))))
DEPENDS+=kmod-crypto-core $(1)
endef
+define KernelPackage/crypto-hash
+ TITLE:=CryptoAPI hash support
+ KCONFIG:=CONFIG_CRYPTO_HASH
+ FILES:=$(LINUX_DIR)/crypto/crypto_hash.ko
+ AUTOLOAD:=$(call AutoLoad,02,crypto_hash.ko)
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-hash))
+
+define KernelPackage/crypto-manager
+ TITLE:=CryptoAPI algorithm manager
+ DEPENDS:=+kmod-crypto-hash
+ KCONFIG:= \
+ CONFIG_CRYPTO_AEAD \
+ CONFIG_CRYPTO_BLKCIPHER \
+ CONFIG_CRYPTO_MANAGER \
+ $(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
+ FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
+ AUTOLOAD:=$(call AutoLoad,03,$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_name,$(mod))))
+ $(call AddDepends/crypto)
+endef
+$(eval $(call KernelPackage,crypto-manager))
define KernelPackage/crypto-hw-padlock
TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
define KernelPackage/crypto-authenc
TITLE:=Combined mode wrapper for IPsec
+ DEPENDS:=+kmod-crypto-manager
KCONFIG:=CONFIG_CRYPTO_AUTHENC
FILES:=$(LINUX_DIR)/crypto/authenc.ko
AUTOLOAD:=$(call AutoLoad,09,authenc)
define KernelPackage/crypto-cbc
TITLE:=Cipher Block Chaining CryptoAPI module
+ DEPENDS:=+kmod-crypto-manager
KCONFIG:=CONFIG_CRYPTO_CBC
FILES:=$(LINUX_DIR)/crypto/cbc.ko
AUTOLOAD:=$(call AutoLoad,09,cbc)
$(eval $(call KernelPackage,crypto-deflate))
+define KernelPackage/crypto-ecb
+ TITLE:=Electronic CodeBook CryptoAPI module
+ DEPENDS:=+kmod-crypto-manager
+ KCONFIG:=CONFIG_CRYPTO_ECB
+ FILES:=$(LINUX_DIR)/crypto/ecb.ko
+ AUTOLOAD:=$(call AutoLoad,09,ecb)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ecb))
+
define KernelPackage/crypto-hmac
TITLE:=HMAC digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_HMAC
FILES:=$(LINUX_DIR)/crypto/hmac.ko
+ DEPENDS:=+kmod-crypto-manager
AUTOLOAD:=$(call AutoLoad,09,hmac)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-md5
TITLE:=MD5 digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_MD5
FILES:=$(LINUX_DIR)/crypto/md5.ko
AUTOLOAD:=$(call AutoLoad,09,md5)
define KernelPackage/crypto-michael-mic
TITLE:=Michael MIC keyed digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
AUTOLOAD:=$(call AutoLoad,09,michael_mic)
define KernelPackage/crypto-sha1
TITLE:=SHA1 digest CryptoAPI module
+ DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_SHA1
FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).ko
AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
define KernelPackage/crypto-misc
TITLE:=Other CryptoAPI modules
+ DEPENDS:=+kmod-crypto-manager
KCONFIG:= \
CONFIG_CRYPTO_ANUBIS \
CONFIG_CRYPTO_BLOWFISH \
define KernelPackage/crypto-xts
TITLE:=XTS cipher CryptoAPI module
+ DEPENDS:=+kmod-crypto-manager
KCONFIG:= \
CONFIG_CRYPTO_GF128MUL \
CONFIG_CRYPTO_XTS