1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 09:17:42 +02:00

kernel: split up cryptoapi, move hash support and blockcipher/algorithm manager to separate packages

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26296 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-03-25 21:28:44 +00:00
parent 2a6f8ab8cf
commit 8236d49861

View File

@ -21,13 +21,12 @@ SHA1_SUFFIX:=$(CRYPTO_GENERIC)
SHA256_SUFFIX:=$(CRYPTO_GENERIC) SHA256_SUFFIX:=$(CRYPTO_GENERIC)
SHA512_SUFFIX:=$(CRYPTO_GENERIC) SHA512_SUFFIX:=$(CRYPTO_GENERIC)
CRYPTO_MODULES = \ CRYPTO_MODULES = ALGAPI2=crypto_algapi
ALGAPI2=crypto_algapi \
CRYPTOMGR_MODULES = \
AEAD2=aead \ AEAD2=aead \
BLKCIPHER2=crypto_blkcipher \
HASH2=crypto_hash \
MANAGER2=cryptomgr \ MANAGER2=cryptomgr \
ECB=ecb BLKCIPHER2=crypto_blkcipher
crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1))) 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) 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:= \ KCONFIG:= \
CONFIG_CRYPTO=y \ CONFIG_CRYPTO=y \
CONFIG_CRYPTO_HW=y \ CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_HMAC \
CONFIG_CRYPTO_AEAD \
CONFIG_CRYPTO_ALGAPI \ CONFIG_CRYPTO_ALGAPI \
CONFIG_CRYPTO_BLKCIPHER \
CONFIG_CRYPTO_HASH \
CONFIG_CRYPTO_MANAGER \
$(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod))) $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod))) FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call crypto_name,$(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) DEPENDS+=kmod-crypto-core $(1)
endef 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 define KernelPackage/crypto-hw-padlock
TITLE:=VIA PadLock ACE with AES/SHA hw crypto module TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
@ -167,6 +183,7 @@ $(eval $(call KernelPackage,crypto-arc4))
define KernelPackage/crypto-authenc define KernelPackage/crypto-authenc
TITLE:=Combined mode wrapper for IPsec TITLE:=Combined mode wrapper for IPsec
DEPENDS:=+kmod-crypto-manager
KCONFIG:=CONFIG_CRYPTO_AUTHENC KCONFIG:=CONFIG_CRYPTO_AUTHENC
FILES:=$(LINUX_DIR)/crypto/authenc.ko FILES:=$(LINUX_DIR)/crypto/authenc.ko
AUTOLOAD:=$(call AutoLoad,09,authenc) AUTOLOAD:=$(call AutoLoad,09,authenc)
@ -177,6 +194,7 @@ $(eval $(call KernelPackage,crypto-authenc))
define KernelPackage/crypto-cbc define KernelPackage/crypto-cbc
TITLE:=Cipher Block Chaining CryptoAPI module TITLE:=Cipher Block Chaining CryptoAPI module
DEPENDS:=+kmod-crypto-manager
KCONFIG:=CONFIG_CRYPTO_CBC KCONFIG:=CONFIG_CRYPTO_CBC
FILES:=$(LINUX_DIR)/crypto/cbc.ko FILES:=$(LINUX_DIR)/crypto/cbc.ko
AUTOLOAD:=$(call AutoLoad,09,cbc) AUTOLOAD:=$(call AutoLoad,09,cbc)
@ -205,11 +223,24 @@ endef
$(eval $(call KernelPackage,crypto-deflate)) $(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 define KernelPackage/crypto-hmac
TITLE:=HMAC digest CryptoAPI module TITLE:=HMAC digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_HMAC KCONFIG:=CONFIG_CRYPTO_HMAC
FILES:=$(LINUX_DIR)/crypto/hmac.ko FILES:=$(LINUX_DIR)/crypto/hmac.ko
DEPENDS:=+kmod-crypto-manager
AUTOLOAD:=$(call AutoLoad,09,hmac) AUTOLOAD:=$(call AutoLoad,09,hmac)
$(call AddDepends/crypto) $(call AddDepends/crypto)
endef endef
@ -219,6 +250,7 @@ $(eval $(call KernelPackage,crypto-hmac))
define KernelPackage/crypto-md5 define KernelPackage/crypto-md5
TITLE:=MD5 digest CryptoAPI module TITLE:=MD5 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_MD5 KCONFIG:=CONFIG_CRYPTO_MD5
FILES:=$(LINUX_DIR)/crypto/md5.ko FILES:=$(LINUX_DIR)/crypto/md5.ko
AUTOLOAD:=$(call AutoLoad,09,md5) AUTOLOAD:=$(call AutoLoad,09,md5)
@ -230,6 +262,7 @@ $(eval $(call KernelPackage,crypto-md5))
define KernelPackage/crypto-michael-mic define KernelPackage/crypto-michael-mic
TITLE:=Michael MIC keyed digest CryptoAPI module TITLE:=Michael MIC keyed digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC KCONFIG:=CONFIG_CRYPTO_MICHAEL_MIC
FILES:=$(LINUX_DIR)/crypto/michael_mic.ko FILES:=$(LINUX_DIR)/crypto/michael_mic.ko
AUTOLOAD:=$(call AutoLoad,09,michael_mic) AUTOLOAD:=$(call AutoLoad,09,michael_mic)
@ -241,6 +274,7 @@ $(eval $(call KernelPackage,crypto-michael-mic))
define KernelPackage/crypto-sha1 define KernelPackage/crypto-sha1
TITLE:=SHA1 digest CryptoAPI module TITLE:=SHA1 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_SHA1 KCONFIG:=CONFIG_CRYPTO_SHA1
FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).ko FILES:=$(LINUX_DIR)/crypto/sha1$(SHA1_SUFFIX).ko
AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX)) AUTOLOAD:=$(call AutoLoad,09,sha1$(SHA1_SUFFIX))
@ -252,6 +286,7 @@ $(eval $(call KernelPackage,crypto-sha1))
define KernelPackage/crypto-misc define KernelPackage/crypto-misc
TITLE:=Other CryptoAPI modules TITLE:=Other CryptoAPI modules
DEPENDS:=+kmod-crypto-manager
KCONFIG:= \ KCONFIG:= \
CONFIG_CRYPTO_ANUBIS \ CONFIG_CRYPTO_ANUBIS \
CONFIG_CRYPTO_BLOWFISH \ CONFIG_CRYPTO_BLOWFISH \
@ -375,6 +410,7 @@ $(eval $(call KernelPackage,crypto-test))
define KernelPackage/crypto-xts define KernelPackage/crypto-xts
TITLE:=XTS cipher CryptoAPI module TITLE:=XTS cipher CryptoAPI module
DEPENDS:=+kmod-crypto-manager
KCONFIG:= \ KCONFIG:= \
CONFIG_CRYPTO_GF128MUL \ CONFIG_CRYPTO_GF128MUL \
CONFIG_CRYPTO_XTS CONFIG_CRYPTO_XTS