diff --git a/kernel/setup.sh b/kernel/setup.sh index 397861cf..108d2104 100755 --- a/kernel/setup.sh +++ b/kernel/setup.sh @@ -18,7 +18,11 @@ fi test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/tiann/KernelSU cd "$GKI_ROOT/KernelSU" git stash && git pull -git checkout "$(git describe --abbrev=0 --tags)" +if [ ! "$1" ]; then + git checkout "$(git describe --abbrev=0 --tags)" +else + git checkout "$1" +fi cd "$GKI_ROOT" echo "[+] GKI_ROOT: $GKI_ROOT" diff --git a/website/docs/guide/how-to-build.md b/website/docs/guide/how-to-build.md index e658c03a..14a69351 100644 --- a/website/docs/guide/how-to-build.md +++ b/website/docs/guide/how-to-build.md @@ -42,10 +42,24 @@ tools/bazel build --config=fast //common:kernel_aarch64_dist ## Build Kernel with KernelSU -If you can build the kernel successfully, then build KernelSU is so easy, run this command in Kernel source root dir: +If you can build the kernel successfully, then build KernelSU is so easy, Select any one run in Kernel source root dir: + +- Latest tag(stable) ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + And then rebuild the kernel and you will get a kernel image with KernelSU! diff --git a/website/docs/guide/how-to-integrate-for-non-gki.md b/website/docs/guide/how-to-integrate-for-non-gki.md index 9964dd68..7528fa32 100644 --- a/website/docs/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/guide/how-to-integrate-for-non-gki.md @@ -46,10 +46,24 @@ If kprobe can not work in your kernel (maybe a upstream bug or kernel below 4.8) First, add KernelSU to your kernel source tree: +- Latest tag(stable) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + Then, add KernelSU calls to the kernel source, here is a patch to refer: ```diff diff --git a/website/docs/id_ID/guide/how-to-build.md b/website/docs/id_ID/guide/how-to-build.md index 85cf4bbe..945247e7 100644 --- a/website/docs/id_ID/guide/how-to-build.md +++ b/website/docs/id_ID/guide/how-to-build.md @@ -42,8 +42,22 @@ tools/bazel build --config=fast //common:kernel_aarch64_dist Jika Anda dapat build kernel dengan sukses, maka build KernelSU sangatlah mudah, jalankan perintah ini di root dir kernel source: +- Latest tag(stable) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + Dan kemudian build ulang kernel dan Anda akan mendapatkan image kernel dengan KernelSU! diff --git a/website/docs/id_ID/guide/how-to-integrate-for-non-gki.md b/website/docs/id_ID/guide/how-to-integrate-for-non-gki.md index b6dbae8d..eba6d09e 100644 --- a/website/docs/id_ID/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/id_ID/guide/how-to-integrate-for-non-gki.md @@ -17,10 +17,24 @@ KernelSU menggunakan kprobe untuk melakukan hook kernel, jika *kprobe* berjalan Pertama, tambahkan KernelSU ke dalam berkas kernel source tree: +- Latest tag(stable) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + Kemudian, Anda harus memeriksa apakah *kprobe* diaktifkan dalam konfigurasi kernel Anda, jika tidak, tambahkan konfigurasi ini ke dalamnya: ``` diff --git a/website/docs/vi_VN/guide/how-to-build.md b/website/docs/vi_VN/guide/how-to-build.md index c9595c15..f48a3cca 100644 --- a/website/docs/vi_VN/guide/how-to-build.md +++ b/website/docs/vi_VN/guide/how-to-build.md @@ -44,8 +44,22 @@ tools/bazel build --config=fast //common:kernel_aarch64_dist Nếu bạn có thể build được kernel hoàn chỉnh, thì việc tích hợp KernelSU rất dễ dàng, chạy lệnh sau tại thư mục chứa mã nguồn kernel: +- Latest tag(stable) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + Và rồi build lại, bạn sẽ có được một image chứa KernelSU \ No newline at end of file diff --git a/website/docs/vi_VN/guide/how-to-integrate-for-non-gki.md b/website/docs/vi_VN/guide/how-to-integrate-for-non-gki.md index 37840487..d27c5ff0 100644 --- a/website/docs/vi_VN/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/vi_VN/guide/how-to-integrate-for-non-gki.md @@ -18,10 +18,24 @@ KernelSU sử dụng kprobe để thực hiện hook kernel, nếu *kprobe* ch Đầu tiên, thêm KernelSU vào mã nguồn kernel của bạn: +- Latest tag(stable) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main branch(dev) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- Select tag(Such as v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + Sau đó, bạn nên kiểm tra xem *kprobe* có được bật trong config của bạn hay không, nếu không, vui lòng thêm các cấu hình sau vào: ``` diff --git a/website/docs/zh_CN/guide/how-to-build.md b/website/docs/zh_CN/guide/how-to-build.md index 007def95..15252764 100644 --- a/website/docs/zh_CN/guide/how-to-build.md +++ b/website/docs/zh_CN/guide/how-to-build.md @@ -42,10 +42,24 @@ tools/bazel build --config=fast //common:kernel_aarch64_dist ## 使用 KernelSU 构建内核 -如果您可以成功构建内核,那么构建 KernelSU 就很容易,在内核源代码根目录中运行此命令: +如果您可以成功构建内核,那么构建 KernelSU 就很容易,根据自己的需求在内核源代码根目录中运行以下任一命令: + +- 最新tag(稳定版本) ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main分支(开发版本) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- 指定tag(比如v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + 然后重建内核,您将获得带有 KernelSU 的内核映像! diff --git a/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md b/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md index 6c471dbb..4f652146 100644 --- a/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md @@ -17,10 +17,24 @@ KernelSU 使用 kprobe 机制来做内核的相关 hook,如果 *kprobe* 可以 首先,把 KernelSU 添加到你的内核源码树,在内核的根目录执行以下命令: +- 最新tag(稳定版本) + ```sh curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - ``` +- main分支(开发版本) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main +``` + +- 指定tag(比如v0.5.2) + +```sh +curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2 +``` + 然后,你需要检查你的内核是否开启了 *kprobe* 相关的配置,如果没有开启,需要添加以下配置: ```