Skip to content

PKR110 Android 15 released source does not reproduce stock HMBIRD/WALT kernel ABI; rebuilt boot Image bootloops #21

Description

@anne-hash

Title: PKR110 Android 15 released source does not reproduce stock HMBIRD/WALT kernel ABI; rebuilt boot Image bootloops

Repository: OnePlusOSS/android_kernel_oneplus_sm8750

Device / ROM

  • Device: OnePlus Ace 5 Pro / PKR110 / SM8750
  • ROM tested on device: PKR110_15.0.0.871(CN01), Android 15, security patch 2025-09-01
  • Official ROM package used for comparison: 0bc7e8aca013444a99758910a569825f.zip
  • Stock boot kernel release:
    • 6.6.66-android15-8-g29d86c5fc9dd-abogki428889875-4k
  • Stock boot Linux version string:
    • Linux version 6.6.66-android15-8-g29d86c5fc9dd-abogki428889875-4k (kleaf@build-host) (Android clang 18.0.0 / LLD 18.0.0) 请更新内核源码 #1 SMP PREEMPT Tue Jul 1 19:48:18 UTC 2025

Source used

I assembled the official public source for the Ace 5 Pro Android 15 branch:

  • OnePlusOSS/android_kernel_common_oneplus_sm8750
    • branch: oneplus/sm8750_v_15.0.0_oneplus_ace5_pro
    • commit: 775f14a7576b024e3e7f454891af4bd45960d2ae
  • OnePlusOSS/android_kernel_oneplus_sm8750
    • branch: oneplus/sm8750_v_15.0.0_oneplus_ace5_pro
    • commit: 45fb33e
  • OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8750
    • branch: oneplus/sm8750_v_15.0.0_oneplus_ace5_pro
    • commit: 1b40d2471752412fa8e71c1a7bf7c41dc2c3a5ec

The latest public commit messages refer to PKR110_15.0.0.861(CN01). The device / ROM image used for the stock boot comparison is PKR110_15.0.0.871(CN01).

Problem

The source builds successfully, but a boot image made by replacing only the boot.img kernel Image with the rebuilt Image fails to boot on slot B. The device either bootloops or falls back to fastboot. Restoring the stock boot_b image immediately boots normally.

I also verified that this is not caused by the boot image container, inner GKI certificate, outer AVB footer, or testkey signing:

  • Repacking the original stock kernel Image into the same boot v4 structure boots successfully.
  • Repacking with newly generated testkey inner GKI certificates and testkey outer boot AVB footer also boots successfully.
  • The failure starts when the rebuilt public-source kernel Image is used.

Evidence 1: stock boot uses CONFIG_HMBIRD_SCHED, public source does not provide the same implementation

Stock boot config extracted from the official boot Image contains:

CONFIG_HMBIRD_SCHED=y

The public-source build config instead contains:

CONFIG_SLIM_SCHED=y
CONFIG_SCHED_CLASS_EXT=y
CONFIG_EXT_GROUP_SCHED=y

The running stock kernel's /proc/kallsyms contains built-in HMBIRD scheduler class symbols:

enqueue_task_hmbird
pick_next_task_hmbird
hmbird_sched_class
init_sched_hmbird_class

The stock boot Image also contains strings pointing to the actual built-in scheduler source path and functions:

kernel/sched/hmbird/hmbird.c
kernel/sched/hmbird/hmbird_sched_proc.c
enqueue_task_hmbird
pick_next_task_hmbird
hmbird_scheduler_tick
init_sched_hmbird_class

However, in the public Android 15 source tree I can only find HMBIRD GKI/interface pieces such as:

CONFIG_HMBIRD_SCHED_GKI
include/linux/sched/hmbird.h
vendor/oplus/kernel/cpu/sched_ext/hmbird_sched_proc.h

I cannot find the stock built-in scheduler implementation, for example:

config HMBIRD_SCHED
kernel/sched/hmbird/hmbird.c
hmbird_sched_class
enqueue_task_hmbird
pick_next_task_hmbird

This suggests the public source does not reproduce the scheduler implementation used by the stock boot Image.

Evidence 2: stock WALT module ABI differs from public source

The stock vendor ramdisk sched-walt.ko exports:

0xda944f6d  walt_rq
0x75071d3a  sched_ravg_window
0x79d4dbee  register_scx_sched_gki_ops
0xe4663148  waltgov_cb_data
0x11ed311d  sched_walt_oscillate

The public-source baseline build originally exported:

0xdb708be4  walt_rq

The other sampled WALT export CRCs matched, so the mismatch was narrowed to the exported per-cpu walt_rq symbol type/layout.

From the stock module BTF, struct walt_rq has:

  • size: 648 bytes
  • member count: 40
  • additional fields:
    • curr_runnable_sum_fixed at byte 152
    • prev_runnable_sum_fixed at byte 160

The public Android 15 source has struct walt_rq size 632 bytes and does not contain those two fields.

Adding only these two fields to msm-kernel/kernel/sched/walt/walt.h makes the rebuilt sched-walt.ko export the stock CRC:

 struct walt_rq {
 	u64 old_estimated_time;
 	u64 curr_runnable_sum;
 	u64 prev_runnable_sum;
+	u64 curr_runnable_sum_fixed;
+	u64 prev_runnable_sum_fixed;
 	u64 nt_curr_runnable_sum;
 	u64 nt_prev_runnable_sum;
 };

Result after rebuilding //msm-kernel:sun_perf:

0xda944f6d  walt_rq

This shows the public source is missing at least one stock WALT ABI/layout delta.

Request

Please update or release the exact source / manifest used to build the stock PKR110 Android 15 6.6.66 kernel, including:

  1. The built-in CONFIG_HMBIRD_SCHED=y scheduler implementation used by the stock boot Image.
  2. The WALT struct walt_rq layout / ABI changes needed to reproduce stock module CRC walt_rq 0xda944f6d.
  3. Any related config fragments needed to build a bootable boot.img Image matching the stock ROM/vendor stack.

At the moment, the official public source builds, but the rebuilt kernel Image is not bootable on the stock PKR110 Android 15 ROM, while the original stock boot image boots normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions