kernel: Add kmod-crypto-xxhash
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 29 Jun 2024 16:14:47 +0000 (18:14 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Thu, 11 Jul 2024 15:20:49 +0000 (11:20 -0400)
kxxhash_generic.ko is a soft dependency of kmod-fs-btrfs, but we did not
package it. Extract the kmod-lib-xxhash and then package
xxhash_generic.ko.

Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 2ebeda029490e308cc0e8f475e63280f960e74c4)
Link: https://github.com/openwrt/openwrt/pull/15898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/linux/modules/crypto.mk
package/kernel/linux/modules/fs.mk
package/kernel/linux/modules/lib.mk

index 24b6077d04ab9c6d6b8ec6efae511fa2fe2bc06a..626df6d6d8a05e62b1864f5f116d03d0e25d9f92 100644 (file)
@@ -1027,3 +1027,15 @@ endef
 
 $(eval $(call KernelPackage,crypto-xts))
 
+
+define KernelPackage/crypto-xxhash
+  TITLE:=xxHash non-cryptographic hash algorithm
+  DEPENDS:=+kmod-crypto-hash +kmod-lib-xxhash
+  KCONFIG:=CONFIG_CRYPTO_XXHASH
+  FILES:=$(LINUX_DIR)/crypto/xxhash_generic.ko
+  AUTOLOAD:=$(call AutoLoad,09,xxhash_generic)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-xxhash))
+
index 0a458ee3df8d44a96406c91688329d8623ab973e..5f33955190dd171335a3f21c4b26daff8b31eda0 100644 (file)
@@ -67,7 +67,7 @@ $(eval $(call KernelPackage,fs-autofs4))
 define KernelPackage/fs-btrfs
   SUBMENU:=$(FS_MENU)
   TITLE:=BTRFS filesystem support
-  DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b
+  DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b +kmod-crypto-xxhash
   KCONFIG:=\
        CONFIG_BTRFS_FS \
        CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
index bb92088a1d00e28cd2c6594b26ef3d3a62af7d72..149ce798a5b03654ca89507b426b8a34f1d0f59d 100644 (file)
@@ -122,21 +122,30 @@ endef
 $(eval $(call KernelPackage,lib-lzo))
 
 
+define KernelPackage/lib-xxhash
+  SUBMENU:=$(LIB_MENU)
+  TITLE:=xxhash support
+  HIDDEN:=1
+  KCONFIG:=CONFIG_XXHASH
+  FILES:=$(LINUX_DIR)/lib/xxhash.ko
+endef
+
+$(eval $(call KernelPackage,lib-xxhash))
+
+
 define KernelPackage/lib-zstd
   SUBMENU:=$(LIB_MENU)
   TITLE:=ZSTD support
-  DEPENDS:=+kmod-crypto-acompress
+  DEPENDS:=+kmod-crypto-acompress +kmod-lib-xxhash
   KCONFIG:= \
        CONFIG_CRYPTO_ZSTD \
        CONFIG_ZSTD_COMPRESS \
-       CONFIG_ZSTD_DECOMPRESS \
-       CONFIG_XXHASH
+       CONFIG_ZSTD_DECOMPRESS
   FILES:= \
        $(LINUX_DIR)/crypto/zstd.ko \
-       $(LINUX_DIR)/lib/xxhash.ko \
        $(LINUX_DIR)/lib/zstd/zstd_compress.ko \
        $(LINUX_DIR)/lib/zstd/zstd_decompress.ko
-  AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress)
+  AUTOLOAD:=$(call AutoProbe,zstd zstd_compress zstd_decompress)
 endef
 
 define KernelPackage/lib-zstd/description