mirror of
https://github.com/JackA1ltman/NonGKI_Kernel_Build_2nd.git
synced 2026-08-19 15:03:40 +08:00
Page:
en Setting Up the Environment
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
1
en Setting Up the Environment
JackA1ltman edited this page 2026-04-04 23:24:57 +08:00
Setting Up the Environment
Local Build · Step 1
This guide assumes a clean machine and uses Ubuntu 24.04 as the reference system.
Get a Linux Distribution
Download Ubuntu 24.04 from the official website:
https://ubuntu.com/download/desktop
For users in mainland China, use the Tsinghua University mirror:
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/noble/ubuntu-24.04.3-desktop-amd64.iso
Campus mirror hub: https://mirrors.cernet.edu.cn/
Create a Bootable USB Drive
Write the ISO to a USB drive using one of the following tools:
- Rufus: https://rufus.ie/
- Ventoy: https://www.ventoy.net/
- Etchdroid (use your Android phone as a USB drive, for extreme cases): https://etchdroid.app/
Install the System
- Reboot into BIOS and select the USB drive as the boot device
- In the Ubuntu LiveISO GRUB menu, press Enter to enter Live mode
- Choose Erase disk and install Ubuntu (automatic partitioning), then wait about 20 minutes and reboot
Dual-boot users: Manual partitioning is required. Use a tool like DiskGenius to carve out at least 300 GB for Linux. During installation, create an EFI partition of ≥ 512 MB and assign the rest to
/. Use a swap file rather than a dedicated swap partition.
Install Required Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install nano vim wget curl git ccache \
automake flex lzop bison gperf build-essential zip \
curl zlib1g-dev g++-multilib libxml2-utils bzip2 \
libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools \
pngcrush schedtool dpkg-dev liblz4-tool make optipng \
maven libssl-dev pwgen libswitch-perl policycoreutils \
minicom libxml-sax-base-perl libxml-simple-perl bc \
libc6-dev-i386 lib32ncurses5-dev libx11-dev lib32z-dev \
libgl1-mesa-dev xsltproc unzip device-tree-compiler \
wget curl cpio p7zip p7zip-full libtinfo5 -y
sudo apt install python3 python-is-python3 -y
Basic git Usage
git clone -b <branch> https://github.com/<user>/<repo>.git --depth 1
| Flag | Description |
|---|---|
clone |
Clone the target repository |
-b <branch> |
Clone a specific branch; omit to clone all branches |
--depth 1 |
Keep only the latest commit, reduces size — ideal when you do not need history |
🌐 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痕迹