File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 记编译 AVD kernel-ranchu 内核的一次过程
2+
3+ ![ alt text] ( image.png )
4+
5+ ## 1.序
6+ ### 博览 [ AVD_KSU] ( https://5ec1cff.github.io/my-blog/2024/01/16/avd-ksu/index.html ) ,[ AVD_KSU2] ( https://5ec1cff.github.io/my-blog/2024/01/31/avd-ksu2/index.html )
7+
8+ ``` bash
9+ cat /proc/version
10+ ```
11+ ** Linux version 6.6.30-android15-8-gdd9c02ccfe27-ab11987101** : 其中` -ab ` 后跟的是内核源码树的提交哈希,` -g ` 后跟着的是一个 ** 12 位 16 进制数** ,在[ BUILD_INFO] ( https://ci.android.com/builds/submitted/11987101/kernel_virt_x86_64/latest/view/BUILD_INFO ) 对应
12+
13+ ``` bash
14+ mkdir kernel_a15 && cd kernel_a15
15+ repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/kernel/manifest -b common-android15-6.6 --depth=1
16+ repo init -m manifest_11987101.xml
17+ repo sync -c --no-tags --no-clone-bundle -j$( nproc)
18+ ```
19+
20+ ## 2.书
21+ ### 规训 [ KernelSU] ( https://github.com/tiann/KernelSU.git )
22+
23+ ``` bash
24+ # 设置全局用户名,邮箱
25+ git config --global user.name " Xieansecn"
26+ git config --global user.email " xieansecn@163.com"
27+ # 打上KernelSU
28+ git clone https://github.com/tiann/KernelSU.git
29+ curl -LSs " https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
30+ git add -A
31+ git commit -m " Add KernelSU"
32+ # 设好版本
33+ cd KernelSU
34+ export KSU_VER=$(( $(git rev- list -- count HEAD) + 10200 ))
35+ echo $KSU_VER
36+ # 编译时设好版本
37+ tools/bazel run --config=fast --config=stamp --lto=none --action_env=KSU_VERSION=$KSU_VER //common-modules/virtual-device:virtual_device_x86_64_dist -- --dist_dir=virt
38+ ```
39+
40+ ## 终
41+ ![ 效果] ( image-1.png )
Original file line number Diff line number Diff line change 11# AndroidAVD_kernel-ranchu
2- 存我的ranchu内核和编译教程
2+ 存我的[ ranchu内核和编译教程] ( Build-Kernel.md )
3+
You can’t perform that action at this time.
0 commit comments