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