From bd0db6017b1921c935785cdccdf0243fddf0b949 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Thu, 4 Nov 2021 21:59:09 +0100 Subject: [PATCH] kernel: 5.15: add new module Add new module require in 5.15 - Changes in block module - Changes in netfilter module (log module unified) - Changes in fs module (mainly new depends for cifs and new ntfs3 module) - Changes in lib add shared lib now used by more than 1 kmod - Changes in crypto, dropped one crypto algo added arm crypto accellerator - Changes in other, add zram default compressor choice and missing lib by tpm module Signed-off-by: Ansuel Smith --- include/netfilter.mk | 7 ++-- package/kernel/linux/modules/block.mk | 4 +- package/kernel/linux/modules/crypto.mk | 33 +++++++++++++---- package/kernel/linux/modules/fs.mk | 43 +++++++++++++++++++--- package/kernel/linux/modules/input.mk | 4 +- package/kernel/linux/modules/lib.mk | 10 +++++ package/kernel/linux/modules/netfilter.mk | 2 +- package/kernel/linux/modules/netsupport.mk | 3 +- package/kernel/linux/modules/other.mk | 29 +++++++++++++-- 9 files changed, 112 insertions(+), 23 deletions(-) diff --git a/include/netfilter.mk b/include/netfilter.mk index 2ef8f83e4c..24255ebe6d 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -48,8 +48,9 @@ $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_COMMENT, $(P_XT)xt_comme $(eval $(call nf_add,IPT_CLUSTER,CONFIG_NETFILTER_XT_MATCH_CLUSTER, $(P_XT)xt_cluster)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)xt_LOG)) -$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common)) -$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4)) +$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common, lt 5.13)) +$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4, lt 5.13)) +$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_syslog, ge 5.13)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_TCPMSS, $(P_XT)xt_TCPMSS)) $(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)ipt_REJECT)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_TIME, $(P_XT)xt_time)) @@ -156,7 +157,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6) $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),)) $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),)) -$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6),)) +$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),)) $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6))) diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk index e5822d95d7..dfb529db3b 100644 --- a/package/kernel/linux/modules/block.mk +++ b/package/kernel/linux/modules/block.mk @@ -513,11 +513,13 @@ define KernelPackage/scsi-core TITLE:=SCSI device support KCONFIG:= \ CONFIG_SCSI \ + CONFIG_SCSI_COMMON@ge5.15 \ CONFIG_BLK_DEV_SD FILES:= \ $(LINUX_DIR)/drivers/scsi/scsi_mod.ko \ + $(LINUX_DIR)/drivers/scsi/scsi_common.ko@ge5.15 \ $(LINUX_DIR)/drivers/scsi/sd_mod.ko - AUTOLOAD:=$(call AutoLoad,40,scsi_mod sd_mod,1) + AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common@ge5.15 sd_mod,1) endef $(eval $(call KernelPackage,scsi-core)) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 4097957277..6fd53f6080 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -451,9 +451,7 @@ 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 + FILES:=$(LINUX_DIR)/lib/crypto/libblake2s.ko $(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash) endef @@ -463,9 +461,30 @@ endef define KernelPackage/crypto-lib-blake2s/x86/64 KCONFIG+=CONFIG_CRYPTO_BLAKE2S_X86 - FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko + FILES+=\ + $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko \ + $(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko +endef + +define KernelPackage/crypto-lib-blake2s/arm + KCONFIG+=CONFIG_CRYPTO_BLAKE2S_ARM + FILES+=\ + $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko@lt5.12 \ + $(LINUX_DIR)/arch/arm/crypto/blake2s-arm.ko@ge5.12 endef +ifndef KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET) + define KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET) + KCONFIG+=CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC + FILES+=$(LINUX_DIR)/lib/crypto/libblake2s-generic.ko + endef +endif + +ifdef KernelPackage/crypto-lib-blake2s/$(ARCH) + KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET)=\ + $(KernelPackage/crypto-lib-blake2s/$(ARCH)) +endif + $(eval $(call KernelPackage,crypto-lib-blake2s)) @@ -683,7 +702,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 \ @@ -696,7 +715,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 \ @@ -704,7 +723,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) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 91cf1ea233..e580a94c60 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -87,24 +87,31 @@ define KernelPackage/fs-cifs SUBMENU:=$(FS_MENU) TITLE:=CIFS support KCONFIG:= \ + CONFIG_SMBFS_COMMON@ge5.15 \ CONFIG_CIFS \ CONFIG_CIFS_DFS_UPCALL=n \ CONFIG_CIFS_UPCALL=n - FILES:=$(LINUX_DIR)/fs/cifs/cifs.ko + FILES:= \ + $(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@ge5.15 \ + $(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@ge5.15 \ + $(LINUX_DIR)/fs/cifs/cifs.ko AUTOLOAD:=$(call AutoLoad,30,cifs) $(call AddDepends/nls) DEPENDS+= \ - +kmod-crypto-md4 \ + +(LINUX_5_4||LINUX_5_10):kmod-crypto-md4\ +kmod-crypto-md5 \ +kmod-crypto-sha256 \ +kmod-crypto-sha512 \ +kmod-crypto-cmac \ +kmod-crypto-hmac \ - +kmod-crypto-arc4 \ + +(LINUX_5_4||LINUX_5_10):kmod-crypto-arc4 \ +kmod-crypto-aead \ +kmod-crypto-ccm \ +kmod-crypto-ecb \ - +kmod-crypto-des + +kmod-crypto-des \ + +(LINUX_5_15):kmod-asn1-decoder \ + +(LINUX_5_15):kmod-oid-registry \ + +(LINUX_5_15):kmod-dnsresolver endef define KernelPackage/fs-cifs/description @@ -239,10 +246,21 @@ endef $(eval $(call KernelPackage,fs-f2fs)) +define KernelPackage/fs-netfs + SUBMENU:=$(FS_MENU) + TITLE:=Network Filesystems support + DEPENDS:=@LINUX_5_15 + KCONFIG:= CONFIG_NETFS_SUPPORT + FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko + AUTOLOAD:=$(call AutoLoad,28,netfs) +endef + +$(eval $(call KernelPackage,fs-netfs)) + define KernelPackage/fs-fscache SUBMENU:=$(FS_MENU) TITLE:=General filesystem local cache manager - DEPENDS:= + DEPENDS:=+kmod-fs-netfs KCONFIG:=\ CONFIG_FSCACHE=m \ CONFIG_FSCACHE_STATS=y \ @@ -616,3 +634,18 @@ define KernelPackage/fuse/description endef $(eval $(call KernelPackage,fuse)) + + +define KernelPackage/fs-ntfs3 + SUBMENU:=$(FS_MENU) + TITLE:=Ntfs3 support + KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y + FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko + AUTOLOAD:=$(call AutoLoad,80,ntfs3) +endef + +define KernelPackage/fuse/description + Kernel module for new NTFS3 filesystem support +endef + +$(eval $(call KernelPackage,fs-ntfs3)) diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index e870bf7f8b..e052a7afac 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -179,10 +179,10 @@ define KernelPackage/input-touchscreen-ads7846 DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang KCONFIG:= \ CONFIG_INPUT_TOUCHSCREEN=y \ - CONFIG_TOUCHSCREEN_PROPERTIES=y \ + CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \ CONFIG_TOUCHSCREEN_ADS7846 FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \ - $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko + $(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13 AUTOLOAD:=$(call AutoProbe,ads7846) endef diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index c52a8133be..81ceb1f76c 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -274,6 +274,16 @@ endef $(eval $(call KernelPackage,asn1-decoder)) +define KernelPackage/asn1-encoder + SUBMENU:=$(LIB_MENU) + TITLE:=Simple ASN1 encoder + KCONFIG:= CONFIG_ASN1_ENCODER + HIDDEN:=1 + FILES:=$(LINUX_DIR)/lib/asn1_encoder.ko +endef + +$(eval $(call KernelPackage,asn1-encoder)) + define KernelPackage/oid-registry SUBMENU:=$(LIB_MENU) TITLE:=Object identifier registry diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 1707bf2d9f..6427d07c94 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -1124,7 +1124,7 @@ define KernelPackage/nft-bridge FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m))) KCONFIG:= \ - CONFIG_NF_LOG_BRIDGE=n \ + CONFIG_NF_LOG_BRIDGE=n@lt5.13 \ $(KCONFIG_NFT_BRIDGE) endef diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index fd9051586a..76187df50f 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -1111,7 +1111,8 @@ define KernelPackage/sctp CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y FILES:= $(LINUX_DIR)/net/sctp/sctp.ko AUTOLOAD:= $(call AutoLoad,32,sctp) - DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac + DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \ + +LINUX_5_15:kmod-udptunnel4 +LINUX_5_15:kmod-udptunnel6 endef define KernelPackage/sctp/description diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index d343ff8d28..499a4080ea 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -959,7 +959,6 @@ $(eval $(call KernelPackage,ikconfig)) define KernelPackage/zram SUBMENU:=$(OTHER_MENU) TITLE:=ZRAM - DEPENDS:=+kmod-lib-lzo KCONFIG:= \ CONFIG_ZSMALLOC \ CONFIG_ZRAM \ @@ -976,8 +975,31 @@ define KernelPackage/zram/description Compressed RAM block device support endef -$(eval $(call KernelPackage,zram)) +define KernelPackage/zram/config + choice + prompt "ZRAM Default compressor" + default ZRAM_DEF_COMP_LZORLE + + config ZRAM_DEF_COMP_LZORLE + bool "lzo-rle" + select PACKAGE_kmod-lib-lzo + + config ZRAM_DEF_COMP_LZO + bool "lzo" + select PACKAGE_kmod-lib-lzo + + config ZRAM_DEF_COMP_LZ4 + bool "lz4" + select PACKAGE_kmod-lib-lz4 + config ZRAM_DEF_COMP_ZSTD + bool "zstd" + select PACKAGE_kmod-lib-zstd + + endchoice +endef + +$(eval $(call KernelPackage,zram)) define KernelPackage/pps SUBMENU:=$(OTHER_MENU) @@ -1190,7 +1212,8 @@ $(eval $(call KernelPackage,keys-trusted)) define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support - DEPENDS:= +kmod-random-core + DEPENDS:= +kmod-random-core +(LINUX_5_15):kmod-asn1-decoder \ + +(LINUX_5_15):kmod-asn1-encoder +(LINUX_5_15):kmod-oid-registry KCONFIG:= CONFIG_TCG_TPM FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko AUTOLOAD:=$(call AutoLoad,10,tpm,1) -- 2.30.2