diff options
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/modules/crypto.mk | 56 |
1 files changed, 46 insertions, 10 deletions
diff --git a/package/kernel/modules/crypto.mk b/package/kernel/modules/crypto.mk index b3609d0ac5..53f95eb3af 100644 --- a/package/kernel/modules/crypto.mk +++ b/package/kernel/modules/crypto.mk @@ -21,13 +21,12 @@ SHA1_SUFFIX:=$(CRYPTO_GENERIC) 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) @@ -41,12 +40,7 @@ define KernelPackage/crypto-core 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)))) @@ -59,6 +53,28 @@ define AddDepends/crypto 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 @@ -167,6 +183,7 @@ $(eval $(call KernelPackage,crypto-arc4)) 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) @@ -177,6 +194,7 @@ $(eval $(call KernelPackage,crypto-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) @@ -205,11 +223,24 @@ endef $(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 @@ -219,6 +250,7 @@ $(eval $(call KernelPackage,crypto-hmac)) 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) @@ -230,6 +262,7 @@ $(eval $(call KernelPackage,crypto-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) @@ -241,6 +274,7 @@ $(eval $(call KernelPackage,crypto-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)) @@ -252,6 +286,7 @@ $(eval $(call KernelPackage,crypto-sha1)) define KernelPackage/crypto-misc TITLE:=Other CryptoAPI modules + DEPENDS:=+kmod-crypto-manager KCONFIG:= \ CONFIG_CRYPTO_ANUBIS \ CONFIG_CRYPTO_BLOWFISH \ @@ -375,6 +410,7 @@ $(eval $(call KernelPackage,crypto-test)) define KernelPackage/crypto-xts TITLE:=XTS cipher CryptoAPI module + DEPENDS:=+kmod-crypto-manager KCONFIG:= \ CONFIG_CRYPTO_GF128MUL \ CONFIG_CRYPTO_XTS |