misc: add kernel setup script

This commit is contained in:
weishu
2022-12-10 22:43:21 +07:00
parent b2e6f5cace
commit d052043267

19
kernel/setup.sh Executable file
View File

@@ -0,0 +1,19 @@
#! /bin/bash
set -x
git clone https://github.com/tiann/KernelSU
GKI_ROOT=$(pwd)
echo "[+] GKI_ROOT: $GKI_ROOT"
echo "[+] Copy kernel su driver to $GKI_ROOT/common/drivers"
ln -sf $(pwd)/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
echo "[+] Add kernel su driver to Makefile"
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
echo "[+] Done."