kernel: remove kmod-crypto-aes, AES crypto support is always built into the kernel
[openwrt/svn-archive/archive.git] / package / kernel / linux / modules / crypto.mk
index 73f36beaa124a3ec9a4d01748f7b60ccad5a5fe2..84e5147b6b78754d6e45b73dac5b17f67648c3bd 100644 (file)
@@ -152,7 +152,7 @@ $(eval $(call KernelPackage,crypto-seqiv))
 
 define KernelPackage/crypto-hw-talitos
   TITLE:=Freescale integrated security engine (SEC) driver
-  DEPENDS:=+kmod-crypto-aes +kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc
+  DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc
   KCONFIG:= \
        CONFIG_CRYPTO_DEV_TALITOS
   FILES:= \
@@ -166,7 +166,7 @@ $(eval $(call KernelPackage,crypto-hw-talitos))
 
 define KernelPackage/crypto-hw-padlock
   TITLE:=VIA PadLock ACE with AES/SHA hw crypto module
-  DEPENDS:=+kmod-crypto-aes +kmod-crypto-manager
+  DEPENDS:=+kmod-crypto-manager
   KCONFIG:= \
        CONFIG_CRYPTO_DEV_PADLOCK \
        CONFIG_CRYPTO_DEV_PADLOCK_AES \
@@ -254,22 +254,6 @@ endef
 $(eval $(call KernelPackage,crypto-hw-omap))
 
 
-define KernelPackage/crypto-aes
-  TITLE:=AES cipher CryptoAPI module
-  KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
-  FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
-  AUTOLOAD:=$(call AutoLoad,09,aes_generic)
-  $(call AddDepends/crypto)
-endef
-
-define KernelPackage/crypto-aes/x86
-  FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
-  AUTOLOAD:=$(call AutoLoad,09,aes-i586)
-endef
-
-$(eval $(call KernelPackage,crypto-aes))
-
-
 define KernelPackage/crypto-arc4
   TITLE:=ARC4 (RC4) cipher CryptoAPI module
   KCONFIG:=CONFIG_CRYPTO_ARC4
@@ -305,7 +289,7 @@ $(eval $(call KernelPackage,crypto-cbc))
 
 define KernelPackage/crypto-ctr
   TITLE:=Counter Mode CryptoAPI module
-  DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv
+  DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv +kmod-crypto-iv
   KCONFIG:=CONFIG_CRYPTO_CTR
   FILES:=$(LINUX_DIR)/crypto/ctr.ko
   AUTOLOAD:=$(call AutoLoad,09,ctr)
@@ -314,6 +298,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-ctr))
 
+define KernelPackage/crypto-ccm
+ TITLE:=Support for Counter with CBC MAC (CCM)
+ DEPENDS:=+kmod-crypto-ctr +kmod-crypto-aead
+ KCONFIG:=CONFIG_CRYPTO_CCM
+ FILES:=$(LINUX_DIR)/crypto/ccm.ko
+ AUTOLOAD:=$(call AutoLoad,09,ccm)
+ $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ccm))
+
 define KernelPackage/crypto-pcbc
   TITLE:=Propagating Cipher Block Chaining CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -329,13 +324,8 @@ define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:=CONFIG_CRYPTO_CRC32C
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.15.0)),1)
   FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
   AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
-else
-  FILES:=$(LINUX_DIR)/crypto/crc32c.ko
-  AUTOLOAD:=$(call AutoLoad,04,crc32c,1)
-endif
   $(call AddDepends/crypto)
 endef
 
@@ -400,6 +390,18 @@ endef
 $(eval $(call KernelPackage,crypto-hmac))
 
 
+define KernelPackage/crypto-cmac
+  TITLE:=Support for Cipher-based Message Authentication Code (CMAC)
+  DEPENDS:=+kmod-crypto-hash
+  KCONFIG:=CONFIG_CRYPTO_CMAC
+  FILES:=$(LINUX_DIR)/crypto/cmac.ko
+  AUTOLOAD:=$(call AutoLoad,09,cmac)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-cmac))
+
+
 define KernelPackage/crypto-gcm
   TITLE:=GCM/GMAC CryptoAPI module
   DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
@@ -425,7 +427,7 @@ $(eval $(call KernelPackage,crypto-gf128))
 
 define KernelPackage/crypto-ghash
   TITLE:=GHASH digest CryptoAPI module
-  DEPENDS:=+kmod-crypto-gf128
+  DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-hash
   KCONFIG:=CONFIG_CRYPTO_GHASH
   FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
   AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
@@ -495,13 +497,6 @@ endef
 $(eval $(call KernelPackage,crypto-sha256))
 
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
-camellia_mod_suffix=_generic
-endif
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
-cast56_mod_suffix=_generic
-endif
-
 define KernelPackage/crypto-misc
   TITLE:=Other CryptoAPI modules
   DEPENDS:=+kmod-crypto-manager
@@ -523,10 +518,10 @@ define KernelPackage/crypto-misc
        CONFIG_CRYPTO_WP512
   FILES:= \
        $(LINUX_DIR)/crypto/anubis.ko \
-       $(LINUX_DIR)/crypto/camellia$(camellia_mod_suffix).ko \
-       $(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) \
-       $(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
-       $(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
+       $(LINUX_DIR)/crypto/camellia_generic.ko \
+       $(LINUX_DIR)/crypto/cast_common.ko \
+       $(LINUX_DIR)/crypto/cast5_generic.ko \
+       $(LINUX_DIR)/crypto/cast6_generic.ko \
        $(LINUX_DIR)/crypto/khazad.ko \
        $(LINUX_DIR)/crypto/sha512_generic.ko \
        $(LINUX_DIR)/crypto/tea.ko \
@@ -540,9 +535,11 @@ define KernelPackage/crypto-misc
   $(call AddDepends/crypto)
 endef
 
-define KernelPackage/crypto-misc/x86
-  FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
-endef
+ifndef CONFIG_TARGET_x86_64
+  define KernelPackage/crypto-misc/x86
+    FILES+=$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko
+  endef
+endif
 
 $(eval $(call KernelPackage,crypto-misc))
 
@@ -630,7 +627,7 @@ $(eval $(call KernelPackage,crypto-xts))
 
 define KernelPackage/crypto-mv-cesa
   TITLE:=Marvell crypto engine
-  DEPENDS:=+kmod-crypto-manager +kmod-crypto-aes @TARGET_kirkwood||TARGET_orion||TARGET_mvebu
+  DEPENDS:=+kmod-crypto-manager @TARGET_kirkwood||TARGET_orion||TARGET_mvebu
   KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
   FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
   AUTOLOAD:=$(call AutoLoad,09,mv_cesa)