添加 KPM 模块支持,包括 KPM 配置选项、核心功能实现及相关头文件

This commit is contained in:
ShirkNeko
2025-03-30 02:54:23 +08:00
parent ba5b3dde88
commit 743ddce9f7
10 changed files with 1519 additions and 2 deletions

View File

@@ -14,6 +14,8 @@ kernelsu-objs += selinux/rules.o
ccflags-y += -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-generic/errno.h
obj-$(CONFIG_KPM) += kpm/
# Do checks before compile
ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0)
$(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount)
@@ -44,7 +46,7 @@ endif
obj-$(CONFIG_KSU) += kernelsu.o
KSU_MANUAL_VERSION := 12553
KSU_MANUAL_VERSION := 12570
ifeq ($(strip $(KSU_MANUAL_VERSION)),)
ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0)
@@ -57,7 +59,7 @@ ifeq ($(strip $(KSU_MANUAL_VERSION)),)
else
# .git is a text file while the module is imported by 'git submodule add'.
$(warning "KSU_GIT_VERSION not defined! Using default version.")
KSU_VERSION := 12553
KSU_VERSION := 12570
$(info -- KernelSU version (Default): $(KSU_VERSION))
ccflags-y += -DKSU_VERSION=$(KSU_VERSION)
endif