summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMieczyslaw Nalewaj2025-04-27 16:46:31 +0000
committerChristian Marangi2025-04-30 14:26:42 +0000
commit4708057e27532bb6be726b35788800db0109ca09 (patch)
tree11e3d3c716388d5f54f4d1ad29670a4b9dda894e
parentda6d0f93413c5edb8fdc939c64d8ff9b2a08f192 (diff)
downloadopenwrt-4708057e27532bb6be726b35788800db0109ca09.tar.gz
package/zram: update for kernel 6.12
Updated for compatibility with kernels 6.6 and 6.12. Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/16547 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r--package/kernel/linux/modules/other.mk44
1 files changed, 33 insertions, 11 deletions
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index e93a9b8407..ff80cd8d27 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -687,6 +687,11 @@ $(eval $(call KernelPackage,ikconfig))
define KernelPackage/zram
SUBMENU:=$(OTHER_MENU)
+ DEPENDS:= \
+ +(KERNEL_ZRAM_BACKEND_LZO||KERNEL_ZRAM_DEF_COMP_LZORLE||KERNEL_ZRAM_DEF_COMP_LZO):kmod-lib-lzo \
+ +(KERNEL_ZRAM_BACKEND_LZ4||KERNEL_ZRAM_DEF_COMP_LZ4):kmod-lib-lz4 \
+ +(KERNEL_ZRAM_BACKEND_LZ4HC||KERNEL_ZRAM_DEF_COMP_LZ4HC):kmod-lib-lz4hc \
+ +(KERNEL_ZRAM_BACKEND_ZSTD||KERNEL_ZRAM_DEF_COMP_ZSTD):kmod-lib-zstd
TITLE:=ZRAM
KCONFIG:= \
CONFIG_ZSMALLOC \
@@ -706,29 +711,46 @@ endef
define KernelPackage/zram/config
if PACKAGE_kmod-zram
+ if !LINUX_6_6
+ config KERNEL_ZRAM_BACKEND_LZO
+ bool "lzo and lzo-rle compression support" if KERNEL_ZRAM_BACKEND_LZ4 || \
+ KERNEL_ZRAM_BACKEND_LZ4HC || KERNEL_ZRAM_BACKEND_ZSTD
+ default !KERNEL_ZRAM_BACKEND_LZ4 && \
+ !KERNEL_ZRAM_BACKEND_LZ4HC && !KERNEL_ZRAM_BACKEND_ZSTD
+
+ config KERNEL_ZRAM_BACKEND_LZ4
+ bool "lz4 compression support"
+
+ config KERNEL_ZRAM_BACKEND_LZ4HC
+ bool "lz4hc compression support"
+
+ config KERNEL_ZRAM_BACKEND_ZSTD
+ bool "zstd compression support"
+
+ endif
choice
prompt "ZRAM Default compressor"
- default ZRAM_DEF_COMP_LZORLE
+ default KERNEL_ZRAM_DEF_COMP_LZORLE
- config ZRAM_DEF_COMP_LZORLE
+ config KERNEL_ZRAM_DEF_COMP_LZORLE
bool "lzo-rle"
- select PACKAGE_kmod-lib-lzo
+ depends on KERNEL_ZRAM_BACKEND_LZO || LINUX_6_6
- config ZRAM_DEF_COMP_LZO
+ config KERNEL_ZRAM_DEF_COMP_LZO
bool "lzo"
- select PACKAGE_kmod-lib-lzo
+ depends on KERNEL_ZRAM_BACKEND_LZO || LINUX_6_6
- config ZRAM_DEF_COMP_LZ4
+ config KERNEL_ZRAM_DEF_COMP_LZ4
bool "lz4"
- select PACKAGE_kmod-lib-lz4
+ depends on KERNEL_ZRAM_BACKEND_LZ4 || LINUX_6_6
- config ZRAM_DEF_COMP_LZ4HC
+ config KERNEL_ZRAM_DEF_COMP_LZ4HC
bool "lz4-hc"
- select PACKAGE_kmod-lib-lz4hc
+ depends on KERNEL_ZRAM_BACKEND_LZ4HC || LINUX_6_6
- config ZRAM_DEF_COMP_ZSTD
+ config KERNEL_ZRAM_DEF_COMP_ZSTD
bool "zstd"
- select PACKAGE_kmod-lib-zstd
+ depends on KERNEL_ZRAM_BACKEND_ZSTD || LINUX_6_6
endchoice
endif