mirror of
https://github.com/JackA1ltman/NonGKI_Kernel_Build_2nd.git
synced 2026-08-19 15:03:40 +08:00
Page:
Fork 项目
Pages
Fork 项目
Home
en Automated Release
en Choosing a Toolchain
en Compiling on a Mobile Device
en Compiling the Kernel
en Compiling the Stock Vendor Kernel
en Configuring the YML File
en Embedding KernelSU and Patching SuSFS
en Fork the Repository
en Hiding Root Common Methods
en Introduction
en Kernel Build FAQ
en Packaging and Flashing
en Requirements
en Running and Downloading Artifacts
en Setting Up the Environment
en Variable Reference
内核编译答疑
利用移动设备编译内核
变量参考
基础需求
嵌入KernelSU和SuSFS修补
序章
打包与刷入
搭建基础环境
编译内核
编译器选择
编译设备厂商原始内核
自动发布
运行与产物
配置 YML 文件
隐藏Root常规方式
No results
Table of contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Fork 项目
利用 Action 构建内核 · 第一步
到这一步开始,一切都会变得顺利许多。
Fork 步骤
- 找到项目 Star 旁边的 Fork 并点击
- 保留或修改 Repository name
- 去掉「Copy the
mainlinebranch only」选项 - 点击 Create fork
获取 YML 模板
# Clone 项目到本地
git clone https://github.com/<你的用户名>/NonGKI_Kernel_Build_2nd.git
cd NonGKI_Kernel_Build_2nd
# 切换至 sample 分支,复制模板文件
git switch sample
cp .github/workflows/build-sample.yml ~/
# 切换回 mainline 分支
git switch mainline
# 将模板移动至 workflows 目录
mv ~/build-sample.yml .github/workflows/
也可以直接在网页上通过 raw 链接下载 build-sample.yml。
YML 文件命名规则
如果你计划提交 PR,文件命名必须遵循以下规则:
build-{品牌}-{型号}-{系统简写}-{Android版本}-{内核名(可选)}.yml
示例:build-xiaomi-polaris-los-a15.yml
系统名称简写规则:LineageOS →
los,其他系统类似缩写。
name 字段格式
name: Build {品牌} {型号} ({完整系统名称} {Android版本}) {内核名(可选)}
示例:Build Xiaomi Mix2s (LineageOS A15)
第二处
name字段(job 内)不需要Build前缀。
创建 SuSFS 二次补丁单独项目
若你需要将二次修补补丁用于自动化流程,建议为其创建一个独立的 GitHub 仓库进行管理。
- 点击 GitHub 右上角头像,找到 Repositories 并点击进入
- 点击右上角绿色 New 按钮
- 在
Repository name*处填写仓库名称,例如:NonGKI_Kernel_Patches - 点击右下角 Create repository 完成创建
Clone 到本地后,建议按设备维度创建对应子目录来存放补丁文件,便于在 YML 中填写路径,例如:
NonGKI_Kernel_Patches/
└── evox_mix2s_a15/
└── susfs_fixed.patch
🌐 Language / 语言
📖 English
Local Build
- Setting Up the Environment
- Choosing a Toolchain
- Compiling the Kernel
- Compiling on a Mobile Device
- Compiling the Stock Vendor Kernel
- Embedding KernelSU & Patching SuSFS
- Packaging and Flashing
- Kernel Build FAQ
Build with Actions
- Fork the Repository
- Configuring the YML File
- Variable Reference
- Running and Downloading Artifacts
- Automated Release
Hide Root Trace
📖 中文
基础编译
利用 Action 构建内核
隐藏Root痕迹