From 7a275e8e2a0e64a93e41a567c21f480881609127 Mon Sep 17 00:00:00 2001 From: Ylarod Date: Fri, 20 Jan 2023 18:40:47 +0800 Subject: [PATCH] website: fixup --- website/docs/.vitepress/locales/en.ts | 1 + website/docs/.vitepress/locales/zh_CN.ts | 1 + website/docs/guide/how-to-integrate-for-non-gki.md | 2 +- website/docs/zh_CN/guide/faq.md | 2 +- .../docs/zh_CN/guide/how-to-integrate-for-non-gki.md | 10 +++++----- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/website/docs/.vitepress/locales/en.ts b/website/docs/.vitepress/locales/en.ts index a6887429..df26d9eb 100644 --- a/website/docs/.vitepress/locales/en.ts +++ b/website/docs/.vitepress/locales/en.ts @@ -48,6 +48,7 @@ function sidebarGuide() { { text: 'What is KernelSU?', link: '/guide/what-is-kernelsu' }, { text: 'Installation', link: '/guide/installation' }, { text: 'How to build?', link: '/guide/how-to-build' }, + { text: 'Intergrate for non-GKI devices', link: '/guide/how-to-integrate-for-non-gki'}, { text: 'FAQ', link: '/guide/faq' }, ] } diff --git a/website/docs/.vitepress/locales/zh_CN.ts b/website/docs/.vitepress/locales/zh_CN.ts index b895188d..873aace4 100644 --- a/website/docs/.vitepress/locales/zh_CN.ts +++ b/website/docs/.vitepress/locales/zh_CN.ts @@ -48,6 +48,7 @@ function sidebarGuide() { { text: '什么是 KernelSU?', link: '/zh_CN/guide/what-is-kernelsu' }, { text: '安装', link: '/zh_CN/guide/installation' }, { text: '如何构建?', link: '/zh_CN/guide/how-to-build' }, + { text: '如何为非GKI设备集成 KernelSU', link: '/zh_CN/guide/how-to-integrate-for-non-gki'}, { text: '常见问题', link: '/zh_CN/guide/faq' }, ] } 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 3045d5fe..1a70344d 100644 --- a/website/docs/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/guide/how-to-integrate-for-non-gki.md @@ -23,7 +23,7 @@ curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh Then, you should check if *kprobe* is enabled in your kernel config, if it is not, please add these configs to it: -```txt +``` CONFIG_KPROBES=y CONFIG_HAVE_KPROBES=y CONFIG_KPROBE_EVENTS=y diff --git a/website/docs/zh_CN/guide/faq.md b/website/docs/zh_CN/guide/faq.md index 971cc55b..9b5b52e7 100644 --- a/website/docs/zh_CN/guide/faq.md +++ b/website/docs/zh_CN/guide/faq.md @@ -36,6 +36,6 @@ KernelSU 的模块系统与 Magisk 的 magic mount 有冲突,如果 KernelSU 可以,但你需要手动移植它,欢迎 PR ! -## 如何为旧内核基础 KernelSU? +## 如何为旧内核集成 KernelSU? 参考[教程](how-to-integrate-for-non-gki) 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 facdeb13..30eca574 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 @@ -23,7 +23,7 @@ curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh 然后,你需要检查你的内核是否开启了 *kprobe* 相关的配置,如果没有开启,需要添加以下配置: -```txt +``` CONFIG_KPROBES=y CONFIG_HAVE_KPROBES=y CONFIG_KPROBE_EVENTS=y @@ -133,9 +133,9 @@ index 376543199b5a..82adcef03ecc 100644 主要是要改四个地方: -1. do_faccessat, usually in `fs/open.c` -2. do_execveat_common, usually in `fs/exec.` -3. vfs_read, usually in `fs/read_write.c` -4. vfs_statx, usually in `fs/stat.c` +1. do_faccessat,通常位于 `fs/open.c` +2. do_execveat_common,通常位于 `fs/exec.` +3. vfs_read,通常位于 `fs/read_write.c` +4. vfs_statx,通常位于 `fs/stat.c` 改完之后,打开 `KernelSU/kernel/ksu.c`,注释 `enable_sucompat()`调用,然后重新编译内核即可。