kernel: clean-up after kernel 5.4 removal
[openwrt/staging/ansuel.git] / package / kernel / linux / modules / crypto.mk
index cbaa8d3ce58e370da368cf610a179806187d20bc..ed4e51079ef0a6367054a9ce9665bfcf4c1c0107 100644 (file)
@@ -42,7 +42,7 @@ define KernelPackage/crypto-aead
        CONFIG_CRYPTO_AEAD2
   FILES:= \
          $(LINUX_DIR)/crypto/aead.ko \
-         $(LINUX_DIR)/crypto/geniv.ko@ge5.10
+         $(LINUX_DIR)/crypto/geniv.ko
   AUTOLOAD:=$(call AutoLoad,09,aead,1)
   $(call AddDepends/crypto, +kmod-crypto-null)
 endef
@@ -101,6 +101,18 @@ endef
 $(eval $(call KernelPackage,crypto-ccm))
 
 
+define KernelPackage/crypto-chacha20poly1305
+  TITLE:=ChaCha20-Poly1305 AEAD support, RFC7539 (used by strongSwan IPsec VPN)
+  DEPENDS:=+kmod-crypto-aead +kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_CHACHA20POLY1305
+  FILES:=$(LINUX_DIR)/crypto/chacha20poly1305.ko
+  AUTOLOAD:=$(call AutoLoad,09,chacha20poly1305)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-chacha20poly1305))
+
+
 define KernelPackage/crypto-cmac
   TITLE:=Support for Cipher-based Message Authentication Code (CMAC)
   DEPENDS:=+kmod-crypto-hash
@@ -287,7 +299,7 @@ define KernelPackage/crypto-ghash/arm-ce
   AUTOLOAD+=$(call AutoLoad,09,ghash-arm-ce)
 endef
 
-KernelPackage/crypto-ghash/imx6=$(KernelPackage/crypto-ghash/arm-ce)
+KernelPackage/crypto-ghash/imx=$(KernelPackage/crypto-ghash/arm-ce)
 KernelPackage/crypto-ghash/ipq40xx=$(KernelPackage/crypto-ghash/arm-ce)
 KernelPackage/crypto-ghash/mvebu/cortexa9=$(KernelPackage/crypto-ghash/arm-ce)
 
@@ -319,7 +331,15 @@ $(eval $(call KernelPackage,crypto-hmac))
 
 define KernelPackage/crypto-hw-ccp
   TITLE:=AMD Cryptographic Coprocessor
-  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager +kmod-random-core +kmod-crypto-sha1 +kmod-crypto-sha256 +kmod-crypto-rsa
+  DEPENDS:= \
+       @TARGET_x86 \
+       +kmod-crypto-authenc \
+       +kmod-crypto-hash \
+       +kmod-crypto-manager \
+       +kmod-crypto-rsa \
+       +kmod-crypto-sha1 \
+       +kmod-crypto-sha256 \
+       +kmod-random-core
   KCONFIG:= \
        CONFIG_CRYPTO_HW=y \
        CONFIG_CRYPTO_DEV_CCP=y \
@@ -338,7 +358,7 @@ $(eval $(call KernelPackage,crypto-hw-ccp))
 
 define KernelPackage/crypto-hw-geode
   TITLE:=AMD Geode hardware crypto module
-  DEPENDS:=+kmod-crypto-manager
+  DEPENDS:=@TARGET_x86_geode +kmod-crypto-manager
   KCONFIG:= \
        CONFIG_CRYPTO_HW=y \
        CONFIG_CRYPTO_DEV_GEODE
@@ -352,7 +372,7 @@ $(eval $(call KernelPackage,crypto-hw-geode))
 
 define KernelPackage/crypto-hw-hifn-795x
   TITLE:=HIFN 795x crypto accelerator
-  DEPENDS:=+kmod-random-core +kmod-crypto-manager
+  DEPENDS:=@PCI_SUPPORT +kmod-random-core +kmod-crypto-manager
   KCONFIG:= \
        CONFIG_CRYPTO_HW=y \
        CONFIG_CRYPTO_DEV_HIFN_795X \
@@ -412,7 +432,8 @@ $(eval $(call KernelPackage,crypto-hw-safexcel))
 
 define KernelPackage/crypto-hw-talitos
   TITLE:=Freescale integrated security engine (SEC) driver
-  DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
+  DEPENDS:=@(TARGET_mpc85xx||TARGET_layerscape) +kmod-crypto-manager \
+       +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des
   KCONFIG:= \
        CONFIG_CRYPTO_HW=y \
        CONFIG_CRYPTO_DEV_TALITOS \
@@ -437,29 +458,6 @@ endef
 
 $(eval $(call KernelPackage,crypto-kpp))
 
-
-define KernelPackage/crypto-lib-blake2s
-  TITLE:=BLAKE2s hash function library
-  KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S
-  HIDDEN:=1
-  FILES:= \
-       $(LINUX_DIR)/lib/crypto/libblake2s.ko \
-       $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko
-  $(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash)
-endef
-
-define KernelPackage/crypto-lib-blake2s/config
-  imply PACKAGE_kmod-crypto-hash
-endef
-
-define KernelPackage/crypto-lib-blake2s/x86/64
-  KCONFIG+=CONFIG_CRYPTO_BLAKE2S_X86
-  FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko
-endef
-
-$(eval $(call KernelPackage,crypto-lib-blake2s))
-
-
 define KernelPackage/crypto-lib-chacha20
   TITLE:=ChaCha library interface
   KCONFIG:=CONFIG_CRYPTO_LIB_CHACHA
@@ -592,7 +590,7 @@ $(eval $(call KernelPackage,crypto-lib-poly1305))
 
 define KernelPackage/crypto-manager
   TITLE:=CryptoAPI algorithm manager
-  DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
+  DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash
   KCONFIG:= \
        CONFIG_CRYPTO_MANAGER \
        CONFIG_CRYPTO_MANAGER2
@@ -674,7 +672,7 @@ define KernelPackage/crypto-misc
        CONFIG_CRYPTO_KHAZAD \
        CONFIG_CRYPTO_SERPENT \
        CONFIG_CRYPTO_TEA \
-       CONFIG_CRYPTO_TGR192 \
+       CONFIG_CRYPTO_TGR192@lt5.12 \
        CONFIG_CRYPTO_TWOFISH \
        CONFIG_CRYPTO_TWOFISH_COMMON \
        CONFIG_CRYPTO_TWOFISH_586 \
@@ -687,7 +685,7 @@ define KernelPackage/crypto-misc
        $(LINUX_DIR)/crypto/cast6_generic.ko \
        $(LINUX_DIR)/crypto/khazad.ko \
        $(LINUX_DIR)/crypto/tea.ko \
-       $(LINUX_DIR)/crypto/tgr192.ko \
+       $(LINUX_DIR)/crypto/tgr192.ko@lt5.12 \
        $(LINUX_DIR)/crypto/twofish_common.ko \
        $(LINUX_DIR)/crypto/wp512.ko \
        $(LINUX_DIR)/crypto/twofish_generic.ko \
@@ -695,7 +693,7 @@ define KernelPackage/crypto-misc
        $(LINUX_DIR)/crypto/blowfish_generic.ko \
        $(LINUX_DIR)/crypto/serpent_generic.ko
   AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
-       cast5_generic cast6_generic khazad tea tgr192 twofish_common \
+       cast5_generic cast6_generic khazad tea tgr192@lt5.12 twofish_common \
        wp512 blowfish_common serpent_generic)
   ifndef CONFIG_TARGET_x86
        AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
@@ -762,19 +760,6 @@ endef
 $(eval $(call KernelPackage,crypto-pcbc))
 
 
-define KernelPackage/crypto-pcompress
-  TITLE:=CryptoAPI Partial (de)compression operations
-  KCONFIG:= \
-       CONFIG_CRYPTO_PCOMP=y \
-       CONFIG_CRYPTO_PCOMP2
-  FILES:=$(LINUX_DIR)/crypto/pcompress.ko
-  AUTOLOAD:=$(call AutoLoad,09,pcompress)
-  $(call AddDepends/crypto)
-endef
-
-$(eval $(call KernelPackage,crypto-pcompress))
-
-
 define KernelPackage/crypto-rsa
   TITLE:=RSA algorithm
   DEPENDS:=+kmod-crypto-manager +kmod-asn1-decoder
@@ -861,7 +846,7 @@ define KernelPackage/crypto-sha1/arm-neon
   AUTOLOAD+=$(call AutoLoad,09,sha1-arm-neon)
 endef
 
-KernelPackage/crypto-sha1/imx6=$(KernelPackage/crypto-sha1/arm-neon)
+KernelPackage/crypto-sha1/imx=$(KernelPackage/crypto-sha1/arm-neon)
 KernelPackage/crypto-sha1/ipq40xx=$(KernelPackage/crypto-sha1/arm-neon)
 KernelPackage/crypto-sha1/mvebu/cortexa9=$(KernelPackage/crypto-sha1/arm-neon)
 
@@ -925,7 +910,7 @@ define KernelPackage/crypto-sha512/arm
   AUTOLOAD+=$(call AutoLoad,09,sha512-arm)
 endef
 
-KernelPackage/crypto-sha512/imx6=$(KernelPackage/crypto-sha512/arm)
+KernelPackage/crypto-sha512/imx=$(KernelPackage/crypto-sha512/arm)
 KernelPackage/crypto-sha512/ipq40xx=$(KernelPackage/crypto-sha512/arm)
 KernelPackage/crypto-sha512/mvebu/cortexa9=$(KernelPackage/crypto-sha512/arm)
 
@@ -978,16 +963,6 @@ endef
 $(eval $(call KernelPackage,crypto-user))
 
 
-define KernelPackage/crypto-wq
-  TITLE:=CryptoAPI work queue handling
-  KCONFIG:=CONFIG_CRYPTO_WORKQUEUE
-  FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko
-  AUTOLOAD:=$(call AutoLoad,09,crypto_wq)
-  $(call AddDepends/crypto)
-endef
-$(eval $(call KernelPackage,crypto-wq))
-
-
 define KernelPackage/crypto-xts
   TITLE:=XTS cipher CryptoAPI module
   DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager