1 配置 YML 文件
JackA1ltman edited this page 2026-04-04 23:24:57 +08:00
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.

配置 YML 文件

利用 Action 构建内核 · 第二步

必须修改的基础字段

字段 说明 示例
DEVICE_NAME 设备名称与型号 oneplus_8
DEVICE_CODENAME 设备代号 polaris
KERNEL_SOURCE 内核源码 Git 链接
KERNEL_BRANCH 内核源码分支
DEFCONFIG_NAME defconfig 完整名称(相对于 arch/arm64/configs/ vendor/mi845_defconfig

执行系统配置

字段 可选值
runs-on ubuntu-latest / ubuntu-24.04 / ubuntu-22.04
container ubuntu:focal20.04/ archlinux / archlinux:latest

自用时的最简配置清单

若只是为自己编译使用,通常只需修改以下变量:

  • EXTRA_CMDS(编译选项,如 LD=ld.lld LLVM=1 LLVM_IAS=1
  • KERNEL_SOURCEKERNEL_BRANCH
  • CLANG_SOURCECLANG_BRANCH
  • DEFCONFIG_NAME
  • KERNELSU_AUTO_GETKERNELSU_AUTO_FORK
  • SUSFS_ENABLESUSFS_FIXEDPATCHES_SOURCEPATCHES_BRANCHSUSFS_FOLDER_FIXEDSUSFS_PATCH_FIXED

额外编译步骤

若内核需要在编译前执行额外的 shell 代码,请添加至以下位置:

- name: 🪛 Extra Kernel Options
  run: |
    # 在此处添加你的 shell 代码