Skip to content

Commit

Permalink
kernel: 5.15: add new module
Browse files Browse the repository at this point in the history
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 <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and dangowrt committed Mar 27, 2022
1 parent b268ec5 commit bd0db60
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 23 deletions.
7 changes: 4 additions & 3 deletions include/netfilter.mk
Expand Up @@ -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))
Expand Down Expand Up @@ -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)))

Expand Down
4 changes: 3 additions & 1 deletion package/kernel/linux/modules/block.mk
Expand Up @@ -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))
Expand Down
33 changes: 26 additions & 7 deletions package/kernel/linux/modules/crypto.mk
Expand Up @@ -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

Expand All @@ -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))


Expand Down Expand Up @@ -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 \
Expand All @@ -696,15 +715,15 @@ 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 \
$(LINUX_DIR)/crypto/blowfish_common.ko \
$(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)
Expand Down
43 changes: 38 additions & 5 deletions package/kernel/linux/modules/fs.mk
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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))
4 changes: 2 additions & 2 deletions package/kernel/linux/modules/input.mk
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions package/kernel/linux/modules/lib.mk
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/linux/modules/netfilter.mk
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion package/kernel/linux/modules/netsupport.mk
Expand Up @@ -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
Expand Down
29 changes: 26 additions & 3 deletions package/kernel/linux/modules/other.mk
Expand Up @@ -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 \
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bd0db60

Please sign in to comment.