SHA512_SUFFIX:=$(CRYPTO_GENERIC)
CRYPTO_MODULES = \
- ALGAPI=crypto_algapi \
+ ALGAPI2=crypto_algapi \
AEAD2=aead \
- PCOMP=pcompress \
BLKCIPHER2=crypto_blkcipher \
HASH2=crypto_hash \
MANAGER2=cryptomgr \
- CBC=cbc \
- ECB=ecb \
- DEFLATE=deflate
+ ECB=ecb
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)
define KernelPackage/crypto-core
SUBMENU:=$(CRYPTO_MENU)
TITLE:=Core CryptoAPI modules
- KCONFIG:=CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC $(foreach mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
+ 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))))
endef
-
-define KernelPackage/crypto-core/2.4
- FILES:=$(LINUX_DIR)/crypto/deflate.ko
- AUTOLOAD:=$(call AutoLoad,01, deflate)
-endef
-
$(eval $(call KernelPackage,crypto-core))
define KernelPackage/crypto-hw-padlock
TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
+ DEPENDS:=+kmod-crypto-aes
KCONFIG:= \
- CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_PADLOCK \
CONFIG_CRYPTO_DEV_PADLOCK_AES \
CONFIG_CRYPTO_DEV_PADLOCK_SHA
define KernelPackage/crypto-hw-geode
TITLE:=AMD Geode hardware crypto module
KCONFIG:= \
- CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_GEODE
FILES:=$(LINUX_DIR)/drivers/crypto/geode-aes.ko
AUTOLOAD:=$(call AutoLoad,09,geode-aes)
TITLE:=HIFN 795x crypto accelerator
DEPENDS:=@!TARGET_ubicom32
KCONFIG:= \
- CONFIG_CRYPTO_HW=y \
CONFIG_HW_RANDOM=y \
CONFIG_CRYPTO_DEV_HIFN_795X \
CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
TITLE:=Intel IXP4xx hardware crypto module
DEPENDS:=@TARGET_ixp4xx
KCONFIG:= \
- CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_IXP4XX
FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko
AUTOLOAD:=$(call AutoLoad,90,ixp4xx_crypto)
TITLE:=AMCC PPC4xx hardware crypto module
DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
KCONFIG:= \
- CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_PPC4XX
FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
$(eval $(call KernelPackage,crypto-authenc))
+define KernelPackage/crypto-cbc
+ TITLE:=Cipher Block Chaining CryptoAPI module
+ KCONFIG:=CONFIG_CRYPTO_CBC
+ FILES:=$(LINUX_DIR)/crypto/cbc.ko
+ AUTOLOAD:=$(call AutoLoad,09,cbc)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-cbc))
+
define KernelPackage/crypto-des
TITLE:=DES/3DES cipher CryptoAPI module
KCONFIG:=CONFIG_CRYPTO_DES
$(eval $(call KernelPackage,crypto-des))
+define KernelPackage/crypto-deflate
+ TITLE:=Deflate compression CryptoAPI module
+ KCONFIG:=CONFIG_CRYPTO_DEFLATE
+ FILES:=$(LINUX_DIR)/crypto/deflate.ko
+ AUTOLOAD:=$(call AutoLoad,09,deflate)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-deflate))
+
define KernelPackage/crypto-hmac
TITLE:=HMAC digest CryptoAPI module
$(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).ko \
$(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).ko \
$(LINUX_DIR)/crypto/tea.ko \
- $(LINUX_DIR)/crypto/twofish.ko \
+ $(if $(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.35)),,$(LINUX_DIR)/crypto/twofish.ko) \
+ $(if $(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.36)),,$(LINUX_DIR)/crypto/twofish_generic.ko) \
$(LINUX_DIR)/crypto/wp512.ko
$(call AddDepends/crypto)
endef
$(eval $(call KernelPackage,crypto-test))
+
+define KernelPackage/crypto-xts
+ TITLE:=XTS cipher CryptoAPI module
+ KCONFIG:= \
+ CONFIG_CRYPTO_GF128MUL \
+ CONFIG_CRYPTO_XTS
+ FILES:= \
+ $(LINUX_DIR)/crypto/xts.ko \
+ $(LINUX_DIR)/crypto/gf128mul.ko
+ AUTOLOAD:=$(call AutoLoad,09, \
+ gf128mul \
+ xts \
+ )
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-xts))
+
+define KernelPackage/crypto-mv-cesa
+ TITLE:=Marvell crypto engine
+ KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
+ FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
+ AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
+ SUBMENU:=Cryptographic API modules
+ DEPENDS:=kmod-crypto-core @TARGET_kirkwood||TARGET_orion
+endef
+
+$(eval $(call KernelPackage,crypto-mv-cesa))