@@ -30,32 +30,8 @@ MDIR := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
3030$(info -- KDIR : $(KDIR ) )
3131$(info -- MDIR : $(MDIR ) )
3232
33- # Check if this is a git repository
34- # For in-tree build: check $(srctree)/$(src)/../.git
35- # For out-of-tree build: check $(MDIR)/../.git
36- ifeq ($(shell test -e $(srctree ) /$(src ) /../.git && echo "in-tree") ,in-tree)
37- # In-tree build (git submodule)
38- $(shell cd $(srctree ) /$(src ) ; /usr/bin/env PATH="$$PATH" :/usr/bin:/usr/local/bin [ -f ../.git/shallow ] && git fetch --unshallow)
39- KSU_GIT_VERSION := $(shell cd $(srctree ) /$(src ) ; /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin git rev-list --count HEAD)
40- KSU_GIT_VERSION_VALID := 1
41- else ifeq ($(shell test -e $(MDIR)/../.git && echo "out-of-tree"),out-of-tree)
42- # Out-of-tree build (standalone repository)
43- $(shell cd $(MDIR ) ; /usr/bin/env PATH="$$PATH" :/usr/bin:/usr/local/bin [ -f ../.git/shallow ] && git fetch --unshallow)
44- KSU_GIT_VERSION := $(shell cd $(MDIR ) ; /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin git rev-list --count HEAD)
45- KSU_GIT_VERSION_VALID := 1
46- endif
47-
48- # Calculate version if git version is available
49- ifdef KSU_GIT_VERSION_VALID
50- # ksu_version: major * 10000 + git version + 200 for historical reasons
51- $(eval KSU_VERSION=$(shell expr 10000 + $(KSU_GIT_VERSION) + 200))
52- $(info -- KernelSU version : $(KSU_VERSION ) )
53- ccflags-y += -DKSU_VERSION=$(KSU_VERSION )
54- else
55- # If there is no .git directory, use default version
56- $(warning "KSU_GIT_VERSION not defined! It is better to make KernelSU a git repository!")
57- ccflags-y += -DKSU_VERSION=16
58- endif
33+ # compliant to last upstream kernel change as of 20251019 - 7dd8818
34+ ccflags-y += -DKSU_VERSION=12131
5935
6036ifeq ($(shell grep -q " current_sid(void) " $(srctree ) /security/selinux/include/objsec.h; echo $$? ),0)
6137ccflags-y += -DKSU_COMPAT_HAS_CURRENT_SID
0 commit comments