Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ jobs:
fetch-depth: 1
persist-credentials: false

# Optional preset-scoped overlays (e.g. pa-gr/vauxite Clang 22). No-op for other sources.
- name: Apply kernel source-local patches
run: bash scripts/apply-kernel-source-patches.sh

- name: Check runner disk space
id: disk-space
run: |
Expand Down Expand Up @@ -275,6 +279,8 @@ jobs:
source release/resolved-refs.env
config_hash="$(sha256sum scripts/build-kernel.sh config/marble.env config/managers.json \
config/susfs-refs.json config/kernel-sources.json scripts/resolve-kernel-source.sh \
scripts/apply-kernel-source-patches.sh \
$(find patches/kernel-sources -type f 2>/dev/null | sort || true) \
| sha256sum | cut -d' ' -f1)"
toolchain_id="${ACTIVE_TOOLCHAIN_ID:-${TOOLCHAIN}}"
lto_mode="${LTO:-thin}"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ on:
- melt
- lineageos
- evolution-x
- pablo
- aosp-pablo
- pa-gr
source_ref:
description: "Override branch/tag/commit (empty = preset default)"
required: false
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

| Feature | Description |
|--------|-------------|
| 🧬 **Multi-kernel sources** | Dropdown: Melt (HyperOS), LineageOS, Evolution-X, Pablo (LOS-based) |
| 🧬 **Multi-kernel sources** | Dropdown: Melt (HyperOS), LineageOS, Evolution-X, aosp-pablo, pa-gr (LOS-based) |
| 🤖 **Multi-manager builds** | KernelSU, KernelSU-Next, SukiSU Ultra, ReSukiSU, or a clean no-root baseline |
| 🛡️ **SUSFS integration** | Optional SUSFS (`v2.2.0` / `v2.1.0` / custom) for supported managers |
| 🔗 **Selectable LTO** | `none` · `thin` (default) · `full` — free-runner hardened for thin |
Expand Down Expand Up @@ -89,7 +89,8 @@ Named after the project / author. Pick one in **Build Marble Kernel**:
| `melt` | Melt | [`mohdakil2426/android_kernel_xiaomi_marble`](https://github.com/mohdakil2426/android_kernel_xiaomi_marble) | `melt-rebase` | Stock **HyperOS** |
| `lineageos` | LineageOS | [`LineageOS/android_kernel_xiaomi_sm8450`](https://github.com/LineageOS/android_kernel_xiaomi_sm8450) | `lineage-23.2` | **LOS-based** custom ROMs only |
| `evolution-x` | Evolution-X | [`Evolution-X-Devices/kernel_xiaomi_sm8450`](https://github.com/Evolution-X-Devices/kernel_xiaomi_sm8450) | `cnb` | **LOS-based** custom ROMs only |
| `pablo` | Pablo | [`aosp-pablo/android_kernel_xiaomi_sm8450`](https://github.com/aosp-pablo/android_kernel_xiaomi_sm8450) | `16` | **LOS-based** custom ROMs only |
| `aosp-pablo` | aosp-pablo | [`aosp-pablo/android_kernel_xiaomi_sm8450`](https://github.com/aosp-pablo/android_kernel_xiaomi_sm8450) | `16` | **LOS-based** custom ROMs only |
| `pa-gr` | pa-gr | [`pa-gr/android_kernel_xiaomi_sm8450`](https://github.com/pa-gr/android_kernel_xiaomi_sm8450) | `vauxite` | **LOS-based** custom ROMs only |

- **HyperOS (`melt`)** uses `marble_defconfig` and Android `clang-r416183b` via `toolchain=auto`.
- **LOS-family kernels** merge `gki_defconfig` + vendor GKI fragments; `toolchain=auto` selects **`llvm-22.1.8`** (armv9). Prefer **`lto=thin`** on free runners.
Expand All @@ -102,7 +103,8 @@ Named after the project / author. Pick one in **Build Marble Kernel**:
| `melt` | `auto` → `android-r416183b` | `thin` | HyperOS-oriented |
| `lineageos` | `auto` → `llvm-22.1.8` | `thin` | Required for armv9 |
| `evolution-x` | `auto` → `llvm-22.1.8` | `thin` | LOS-family |
| `pablo` | `auto` → `llvm-22.1.8` | `thin` | LOS-family |
| `aosp-pablo` | `auto` → `llvm-22.1.8` | `thin` | LOS-family |
| `pa-gr` | `auto` → `llvm-22.1.8` | `thin` | LOS-family; default `vauxite` has in-tree KernelSU — smoke-test manager apply |

**Free runners:** avoid many parallel LOS+LLVM jobs; prefer 1–2 heavy builds at a time. Prefer `lto=thin`, not `full`.

Expand All @@ -117,7 +119,7 @@ AK3_marble_<FAMILY>_<source>_<manager>[-version][-codeN][_susfs-vX.Y.Z]_rN.zip
| FAMILY | Sources |
|--------|---------|
| `MELT` | `melt` |
| `LOS` | `lineageos`, `evolution-x`, `pablo` |
| `LOS` | `lineageos`, `evolution-x`, `aosp-pablo`, `pa-gr` |

LTO and toolchain are **not** in the filename (see flash banner + `build-info.*`).

Expand Down Expand Up @@ -188,7 +190,7 @@ Do **not** enable SUSFS with `none` or `kernelsu`.
### Quick start — build

1. Open **[Actions → Build Marble Kernel → Run workflow](https://github.com/mohdakil2426/marble-kernel-builder/actions)**
2. Choose **kernel source** (`melt` / `lineageos` / `evolution-x` / `pablo`)
2. Choose **kernel source** (`melt` / `lineageos` / `evolution-x` / `aosp-pablo` / `pa-gr`)
3. Select manager checkbox(es)
4. Set **lto** (default `thin`), SUSFS, optional `source_ref`, **toolchain** (LOS → `llvm-22.1.8`), scope
5. Run · download artifacts when green
Expand Down Expand Up @@ -219,7 +221,7 @@ Do **not** enable SUSFS with `none` or `kernelsu`.
| `enable_susfs` | `false` | Enable SUSFS for managers that support it |
| `susfs_version` | `v2.2.0` | `v2.2.0` · `v2.1.0` · `custom` |
| `susfs_ref` | *(empty)* | Branch/tag/commit — only with `custom` |
| `kernel_source` | `melt` | Dropdown: `melt` · `lineageos` · `evolution-x` · `pablo` |
| `kernel_source` | `melt` | Dropdown: `melt` · `lineageos` · `evolution-x` · `aosp-pablo` · `pa-gr` |
| `source_ref` | *(empty)* | Optional branch/tag/commit override (preset default if empty) |
| `build_scope` | `image-only` | `image-only` or `full` |
| `toolchain` | `android-r416183b` | `android-r416183b` (default) or experimental `llvm-22.1.8` |
Expand Down Expand Up @@ -266,7 +268,7 @@ marble-flash-<label>-<scope>-r<run>/
AK3_marble_MELT_melt_ksunext-v3.2.0-code33203_susfs-v2.2.0_r121.zip
AK3_marble_LOS_lineageos_ksunext-v3.2.0-code33203_susfs-v2.2.0_r121.zip
AK3_marble_LOS_evolution-x_sukisu-v4.1.3-code40813_susfs-v2.2.0_r122.zip
AK3_marble_LOS_pablo_resukisu-v4.1.0-code34990_r123.zip
AK3_marble_LOS_aosp-pablo_resukisu-v4.1.0-code34990_r123.zip
AK3_marble_MELT_melt_noroot_r124.zip
```

Expand Down Expand Up @@ -329,7 +331,7 @@ Full pin table: [`docs/versions.md`](docs/versions.md)

**2026-07-12** — multi-kernel smoke (`build_none`, `image-only`)

- Melt / LineageOS / Evolution-X / Pablo — [29189567468](https://github.com/mohdakil2426/marble-kernel-builder/actions/runs/29189567468) … [29192972075](https://github.com/mohdakil2426/marble-kernel-builder/actions/runs/29192972075)
- Melt / LineageOS / Evolution-X / aosp-pablo — [29189567468](https://github.com/mohdakil2426/marble-kernel-builder/actions/runs/29189567468) … [29192972075](https://github.com/mohdakil2426/marble-kernel-builder/actions/runs/29192972075)

**2026-06-22** — Melt device boot: KernelSU-Next / SukiSU Ultra / ReSukiSU + SUSFS v2.2.0 (r46–r48)

Expand Down Expand Up @@ -372,7 +374,8 @@ On A/B devices, target the correct slot (or both if needed).
| 📱 Melt / HyperOS kernel | [mohdakil2426/android_kernel_xiaomi_marble](https://github.com/mohdakil2426/android_kernel_xiaomi_marble) |
| 🟠 LineageOS SM8450 | [LineageOS/android_kernel_xiaomi_sm8450](https://github.com/LineageOS/android_kernel_xiaomi_sm8450) |
| 🧬 Evolution-X SM8450 | [Evolution-X-Devices/kernel_xiaomi_sm8450](https://github.com/Evolution-X-Devices/kernel_xiaomi_sm8450) |
| 🧩 Pablo SM8450 | [aosp-pablo/android_kernel_xiaomi_sm8450](https://github.com/aosp-pablo/android_kernel_xiaomi_sm8450) |
| 🧩 aosp-pablo SM8450 | [aosp-pablo/android_kernel_xiaomi_sm8450](https://github.com/aosp-pablo/android_kernel_xiaomi_sm8450) |
| 🧪 pa-gr SM8450 | [pa-gr/android_kernel_xiaomi_sm8450](https://github.com/pa-gr/android_kernel_xiaomi_sm8450) (`vauxite`) |
| 🫙 AnyKernel3 | [osm0sis/AnyKernel3](https://github.com/osm0sis/AnyKernel3) |
| 🔐 KernelSU | [tiann/KernelSU](https://github.com/tiann/KernelSU) |
| 🚀 KernelSU-Next | [KernelSU-Next/KernelSU-Next](https://github.com/KernelSU-Next/KernelSU-Next) |
Expand All @@ -391,7 +394,7 @@ On A/B devices, target the correct slot (or both if needed).

| Project / person | Contribution |
|------------------|--------------|
| **Kernel source maintainers** | Melt, LineageOS, Evolution-X, Pablo trees used as clean presets |
| **Kernel source maintainers** | Melt, LineageOS, Evolution-X, aosp-pablo trees used as clean presets |
| **osm0sis** | AnyKernel3 flashing framework |
| **tiann** | KernelSU |
| **KernelSU-Next team** | KernelSU-Next |
Expand Down
37 changes: 31 additions & 6 deletions config/kernel-sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"recommended_toolchain": "llvm-22.1.8",
"notes": "Evolution-X device org SM8450 kernel for marble. Prefer clean branches without in-tree KSU. Needs llvm-22.1.8 (armv9 flags)."
},
"pablo": {
"display": "Pablo",
"author": "Pablo",
"aosp-pablo": {
"display": "aosp-pablo",
"author": "aosp-pablo",
"repo": "aosp-pablo/android_kernel_xiaomi_sm8450",
"default_ref": "16",
"rom_label": "Pablo",
"rom_label": "aosp-pablo",
"rom_family": "los",
"rom_support": "Pablo / LOS-based custom ROMs only",
"rom_support": "aosp-pablo / LOS-based custom ROMs only",
"defconfig_mode": "gki_fragments",
"base_defconfig": "gki_defconfig",
"config_fragments": [
Expand All @@ -66,6 +66,31 @@
"vendor/debugfs.config"
],
"recommended_toolchain": "llvm-22.1.8",
"notes": "aosp-pablo SM8450 kernel (Marble Development). LOS-based custom ROMs only. Needs llvm-22.1.8 (armv9 flags)."
"notes": "GitHub org aosp-pablo SM8450 kernel (Marble Development). LOS-based custom ROMs only. Needs llvm-22.1.8 (armv9 flags)."
},
"pa-gr": {
"display": "pa-gr",
"author": "pa-gr",
"repo": "pa-gr/android_kernel_xiaomi_sm8450",
"default_ref": "vauxite",
"rom_label": "pa-gr",
"rom_family": "los",
"rom_support": "pa-gr / LOS-based custom ROMs only",
"defconfig_mode": "gki_fragments",
"base_defconfig": "gki_defconfig",
"config_fragments": [
"vendor/waipio_GKI.config",
"vendor/xiaomi_GKI.config",
"vendor/marble_GKI.config",
"vendor/debugfs.config"
],
"recommended_toolchain": "llvm-22.1.8",
"notes": "pa-gr SM8450 marble kernel (default branch vauxite). GKI fragments + llvm-22.1.8. Optional source_patches for Clang 22 KVM clidr (remove when upstream fixed). vauxite may ship in-tree KernelSU — smoke-test manager apply.",
"source_patches": {
"enabled": true,
"dir": "patches/kernel-sources/pa-gr/vauxite",
"match_refs": ["vauxite"],
"notes": "Clang 22 -Wuninitialized-const-pointer on sys_regs.c. Disable or delete when pa-gr/vauxite includes equivalent fix."
}
}
}
6 changes: 5 additions & 1 deletion config/known-good-pins.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@
"repo": "Evolution-X-Devices/kernel_xiaomi_sm8450",
"ref": "cnb"
},
"pablo": {
"aosp-pablo": {
"repo": "aosp-pablo/android_kernel_xiaomi_sm8450",
"ref": "16"
},
"pa-gr": {
"repo": "pa-gr/android_kernel_xiaomi_sm8450",
"ref": "vauxite"
}
}
}
34 changes: 30 additions & 4 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Default CI scope is **`image-only`** (kernel `Image` → AnyKernel ZIP).
│ ▼
│ ┌──────────────────────────────────┐
│ │ Remote kernel source (selected) │
│ │ melt | lineageos | evo-x | pablo │
│ │ melt | lineageos | evo-x | aosp-pablo | pa-gr
│ └──────────────────────────────────┘
│ │
▼ ▼
Expand Down Expand Up @@ -280,7 +280,7 @@ Parallel matrix builds of different managers share the group key only when those
| `enable_susfs` | boolean | false | Applies to KSUNext / SukiSU / ReSukiSU only |
| `susfs_version` | choice | `v2.2.0` | `v2.2.0` · `v2.1.0` · `custom` |
| `susfs_ref` | string | empty | Only for custom SUSFS |
| `kernel_source` | choice | `melt` | `melt` · `lineageos` · `evolution-x` · `pablo` |
| `kernel_source` | choice | `melt` | `melt` · `lineageos` · `evolution-x` · `aosp-pablo` · `pa-gr` |
| `source_ref` | string | empty | Override preset branch/tag/commit |
| `build_scope` | choice | `image-only` | `image-only` · `full` |
| `toolchain` | choice | `android-r416183b` | Or `llvm-22.1.8` (required for LOS armv9) |
Expand Down Expand Up @@ -364,10 +364,35 @@ Strategy: `fail-fast: false` so one manager failure does not cancel siblings.
| `melt` | Melt | `mohdakil2426/android_kernel_xiaomi_marble` | `melt-rebase` | `single` → `marble_defconfig` | HyperOS |
| `lineageos` | LineageOS | `LineageOS/android_kernel_xiaomi_sm8450` | `lineage-23.2` | `gki_fragments` | LOS |
| `evolution-x` | Evolution-X | `Evolution-X-Devices/kernel_xiaomi_sm8450` | `cnb` | `gki_fragments` | LOS |
| `pablo` | Pablo | `aosp-pablo/android_kernel_xiaomi_sm8450` | `16` | `gki_fragments` | LOS |
| `aosp-pablo` | aosp-pablo | `aosp-pablo/android_kernel_xiaomi_sm8450` | `16` | `gki_fragments` | LOS |
| `pa-gr` | pa-gr | `pa-gr/android_kernel_xiaomi_sm8450` | `vauxite` | `gki_fragments` | LOS |

LOS presets recommend **`llvm-22.1.8`** (armv9 march flags rejected by Android clang-12 / `clang-r416183b`).

**pa-gr note:** default `vauxite` includes an in-tree `KernelSU` submodule / `drivers/kernelsu`. Out-of-tree manager apply may conflict — treat first CI runs as smoke tests.

### 7.1.1 Source-local patches (optional, removable)

Some presets may declare `source_patches` in `kernel-sources.json`:

```json
"source_patches": {
"enabled": true,
"dir": "patches/kernel-sources/pa-gr/vauxite",
"match_refs": ["vauxite"]
}
```

| Rule | Behavior |
|------|----------|
| Scope | **Only** that preset + refs in `match_refs` |
| When | After kernel checkout, **before** manager / SUSFS (`scripts/apply-kernel-source-patches.sh`) |
| Storage | Builder repo under `patches/kernel-sources/<preset>/…` — **not** pushed to the kernel upstream |
| Failure | `patch` reject → hard fail (forces remove/update when upstream already fixed) |
| Other presets | No-op |

**Current:** `pa-gr` @ `vauxite` — Clang 22 KVM `clidr` init. See `patches/kernel-sources/pa-gr/README.md` for removal steps.

### 7.2 Defconfig modes

**`single` (Melt):**
Expand Down Expand Up @@ -692,7 +717,7 @@ AK3_marble_<FAMILY>_<source>_<manager>[-version][-codeN][_susfs-vX.Y.Z]_rN.zip

| Token | Values |
|-------|--------|
| `FAMILY` | `MELT` (`melt`) · `LOS` (lineageos / evolution-x / pablo) |
| `FAMILY` | `MELT` (`melt`) · `LOS` (lineageos / evolution-x / aosp-pablo / pa-gr) |
| `manager` | `noroot` · `kernelsu` · `ksunext` · `sukisu` · `resukisu` |
| SUSFS off | omit segment |
| LTO | **not** in zip name (banner + build-info) |
Expand Down Expand Up @@ -848,6 +873,7 @@ Policy tests run with related env vars **unset** so ambient CI env cannot fake p
| `validate-inputs.sh` | Bootstrap | Reject illegal manager/SUSFS/LTO/source combos |
| `generate-build-matrix.sh` | Matrix setup | Checkboxes → JSON strategy matrix |
| `resolve-refs.sh` | Identity | Pin manager + SUSFS to exact commits |
| `apply-kernel-source-patches.sh` | Integrate | Optional preset/ref-gated source overlays (e.g. pa-gr) |
| `patch-manager.sh` | Integrate | Run allowlisted manager `setup.sh` |
| `apply-susfs.sh` | Integrate | Kernel SUSFS patch + manager Kconfig gate |
| `build-kernel.sh` | Compile | Defconfig, LTO, make, Image validation |
Expand Down
2 changes: 1 addition & 1 deletion docs/manager-matrix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manager Matrix

Last checked: 2026-07-13 (manager policy + multi-kernel presets). Kernel **source** selection is independent — see `config/kernel-sources.json` and README presets (Melt vs LOS-family).
Last checked: 2026-07-13 (manager policy + multi-kernel presets including `pa-gr`). Kernel **source** selection is independent — see `config/kernel-sources.json` and README presets (Melt vs LOS-family: lineageos / evolution-x / aosp-pablo / pa-gr).

`none` is a baseline no-root build mode. It is useful for validating the clean kernel source, build system, packaging, and AnyKernel3 flashing path. It is not a root solution, and SUSFS is blocked with `none` because SUSFS needs manager-side KernelSU-compatible hooks.

Expand Down
23 changes: 23 additions & 0 deletions docs/verification/los-smoke-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,26 @@ notes:
```

Do **not** claim LOS product readiness until device boot is recorded.

## pa-gr smoke (optional)

| Input | Value |
|-------|--------|
| `kernel_source` | `pa-gr` |
| default ref | `vauxite` (`source_ref` empty) |
| `toolchain` | `auto` → `llvm-22.1.8` |
| `lto` | `thin` first; `full` only as experiment (free-runner OOM risk) |
| `build_kernelsu_next` | `true` |
| `enable_susfs` | `true` |
| other managers | `false` |

**Expect ZIP:** `AK3_marble_LOS_pa-gr_ksunext-..._susfs-v2.2.0_rN.zip`

**Risk:** `vauxite` may ship in-tree KernelSU (`KernelSU` submodule / `drivers/kernelsu`) — manager apply can fail or double-apply; treat first green/fail as CI signal only.

```text
run: (paste)
date:
result: pass | fail
notes:
```
Loading
Loading