-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I2847036bb858810034391e74ed44ac0f490fda9c Signed-off-by: Yuan Si <do4suki@gmail.com> Signed-off-by: farizmaul <nickshade88@gmail.com>
- Loading branch information
Showing
30 changed files
with
1,686 additions
and
768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,63 @@ | ||
obj-y += ksu.o | ||
obj-y += allowlist.o | ||
kernelsu-objs := apk_sign.o | ||
obj-y += kernelsu.o | ||
obj-y += module_api.o | ||
obj-y += sucompat.o | ||
obj-y += uid_observer.o | ||
obj-y += manager.o | ||
obj-y += core_hook.o | ||
obj-y += ksud.o | ||
obj-y += embed_ksud.o | ||
obj-y += kernel_compat.o | ||
|
||
obj-y += selinux/ | ||
|
||
KSU_GIT_VERSION := 1044 | ||
kernelsu-objs := ksu.o | ||
kernelsu-objs += allowlist.o | ||
kernelsu-objs += apk_sign.o | ||
kernelsu-objs += sucompat.o | ||
kernelsu-objs += throne_tracker.o | ||
kernelsu-objs += core_hook.o | ||
kernelsu-objs += ksud.o | ||
kernelsu-objs += embed_ksud.o | ||
kernelsu-objs += kernel_compat.o | ||
|
||
kernelsu-objs += selinux/selinux.o | ||
kernelsu-objs += selinux/sepolicy.o | ||
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_KSU) += kernelsu.o | ||
|
||
KSU_GIT_VERSION := 1672 | ||
|
||
# ksu_version: major * 10000 + git version + 200 for historical reasons | ||
$(eval KSU_VERSION=$(shell expr 10000 + $(KSU_GIT_VERSION) + 200)) | ||
$(info -- KernelSU version: $(KSU_VERSION)) | ||
ccflags-y += -DKSU_VERSION=$(KSU_VERSION) | ||
|
||
ifeq ($(shell grep -q " current_sid(void)" $(srctree)/security/selinux/include/objsec.h; echo $$?),0) | ||
ccflags-y += -DKSU_COMPAT_HAS_CURRENT_SID | ||
endif | ||
|
||
ifeq ($(shell grep -q "struct selinux_state " $(srctree)/security/selinux/include/security.h; echo $$?),0) | ||
ccflags-y += -DKSU_COMPAT_HAS_SELINUX_STATE | ||
endif | ||
|
||
ifndef KSU_EXPECTED_SIZE | ||
KSU_EXPECTED_SIZE := 0x033b | ||
endif | ||
|
||
ifndef KSU_EXPECTED_HASH | ||
KSU_EXPECTED_HASH := 0xb0b91415 | ||
KSU_EXPECTED_HASH := c371061b19d8c7d7d6133c6a9bafe198fa944e50c1b31c9d8daa8d7f1fc2d2d6 | ||
endif | ||
|
||
ifdef KSU_MANAGER_PACKAGE | ||
ccflags-y += -DKSU_MANAGER_PACKAGE=\"$(KSU_MANAGER_PACKAGE)\" | ||
$(info -- KernelSU Manager package name: $(KSU_MANAGER_PACKAGE)) | ||
endif | ||
|
||
$(info -- KernelSU Manager signature size: $(KSU_EXPECTED_SIZE)) | ||
$(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH)) | ||
|
||
ccflags-y += -DEXPECTED_SIZE=$(KSU_EXPECTED_SIZE) | ||
ccflags-y += -DEXPECTED_HASH=$(KSU_EXPECTED_HASH) | ||
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) | ||
endif | ||
|
||
ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat | ||
ccflags-y += -Wno-declaration-after-statement | ||
ccflags-y += -Wno-declaration-after-statement -Wno-unused-function | ||
|
||
# Keep a new line here!! Because someone may append config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.