Skip to content

Commit

Permalink
kernel: require backports
Browse files Browse the repository at this point in the history
Most non-gki kernel builders have to touch their kernel source code anyway
so we might as well tell them to backport things to achieve some sort of
feature parity.

path_umount:
	discussions: tiann#1464
	example: backslashxx/mojito_krenol@2d51422
get_cred_rcu:
	introduced by tiann#2320
	backport examples
	backslashxx/mojito_krenol@c1df3e5
	backslashxx/msm8953-kernel@95903fb

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
  • Loading branch information
backslashxx committed Dec 31, 2024
1 parent 216d27a commit 7c2ba70
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ $(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH))
ccflags-y += -DEXPECTED_SIZE=$(KSU_EXPECTED_SIZE)
ccflags-y += -DEXPECTED_HASH=\"$(KSU_EXPECTED_HASH)\"

ifeq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0)
ccflags-y += -DKSU_UMOUNT
else
$(info -- Did you know you can backport path_umount to fs/namespace.c from 5.9?)
$(info -- Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount)
ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0)
$(error You must backport path_umount - https://github.com/tiann/KernelSU/pull/1464 )
endif

ifneq ($(shell grep -q "get_cred_rcu" $(srctree)/include/linux/cred.h; echo $$?),0)
$(error You must backport get_cred_rcu - https://github.com/tiann/KernelSU/pull/2320#issuecomment-2564232958 )
endif

ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat
Expand Down

0 comments on commit 7c2ba70

Please sign in to comment.