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