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>
This commit is contained in:
Mieczyslaw Nalewaj 2025-04-27 18:46:31 +02:00 committed by Christian Marangi
parent da6d0f9341
commit 4708057e27
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7

View file

@ -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