kernel/modules: fix kmod-fs-btrfs deps / zlib_deflate / makefile
[openwrt/openwrt.git] / package / kernel / modules / crypto.mk
index 53f95eb3affec822b06bbcc22f67f8772d4783e0..0a843f8669704cff237d299e1093b08964fe3e52 100644 (file)
@@ -57,7 +57,7 @@ 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)
+  AUTOLOAD:=$(call AutoLoad,02,crypto_hash)
   $(call AddDepends/crypto)
 endef
 $(eval $(call KernelPackage,crypto-hash))
@@ -215,9 +215,11 @@ $(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)
+  KCONFIG:=CONFIG_ZLIB_DEFLATE \
+       CONFIG_CRYPTO_DEFLATE
+  FILES:=$(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko \
+       $(LINUX_DIR)/crypto/deflate.ko
+  AUTOLOAD:=$(call AutoLoad,09,zlib_deflate deflate)
   $(call AddDepends/crypto)
 endef
 
@@ -317,9 +319,12 @@ define KernelPackage/crypto-misc
        $(LINUX_DIR)/crypto/sha256$(SHA256_SUFFIX).ko \
        $(LINUX_DIR)/crypto/sha512$(SHA512_SUFFIX).ko \
        $(LINUX_DIR)/crypto/tea.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
+  ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.35)),1)
+    FILES += $(LINUX_DIR)/crypto/twofish.ko
+  else
+    FILES += $(LINUX_DIR)/crypto/twofish_generic.ko
+  endif
   $(call AddDepends/crypto)
 endef
 
@@ -341,7 +346,7 @@ $(eval $(call KernelPackage,crypto-misc))
 
 define KernelPackage/crypto-ocf
   TITLE:=OCF modules
-  DEPENDS:=+@OPENSSL_ENGINE @!TARGET_uml
+  DEPENDS:=+@OPENSSL_ENGINE @!TARGET_uml +kmod-crypto-manager
   KCONFIG:= \
        CONFIG_OCF_OCF \
        CONFIG_OCF_CRYPTODEV \
@@ -427,12 +432,12 @@ 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
+  TITLE:=Marvell crypto engine
+  DEPENDS:=+kmod-crypto-manager @TARGET_kirkwood||TARGET_orion
+  KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
+  FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
+  AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
+  $(call AddDepends/crypto)
 endef
 
 $(eval $(call KernelPackage,crypto-mv-cesa))