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
157 changes: 157 additions & 0 deletions device/bluejay/BRINGUP-M1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<!-- SPDX-License-Identifier: MIT -->
# Pixel 6a: first-boot gates

Status (2026-11-05): first Linux boot passed. The M1 initramfs runs from B
on `7.3.0-rc6-omamobile-push1-g29a7a9326bf0`; USB SSH and guarded UFS
passed, as did more than nine minutes in the same boot. Before that test,
the approved matching stock OTA completed with recovery status 0 and
fastboot reported stock A active, successful and not unbootable. The
applied stock OTA is `CP3A.261005.002.A1`. Private backups are verified.
The Omarchy desktop has not been installed. Facts: [NOTES.md](NOTES.md).

## Sources and outputs

- Mobile worktree: `~/src/omarchy-mobile-bluejay-20261105`, branch
`bringup/bluejay-20261105`, based on `80ef270`.
- Kernel worktree: `~/android/mainline/wt-bluejay-m1-20261105`, branch
`omamobile-bluejay-m1-20261105`, published base `29a7a9326bf0`.
- Kernel output: `~/android/mainline/out-bluejay-m1-20261105`.
- Kernel C and DT sources are unchanged. Build the shared config with
`W=1`, `Image.gz` and `exynos/google/gs101-bluejay.dtb`. The M1 initramfs
uses the shared init, no board-specific register writes or probes, and
only `boot_b vendor_boot_b dtbo_b userdata` on its storage allowlist.
- Captures, serial selection, stock packages, checksums and private
recovery instructions stay outside this repository. Never put their
identifying contents or vendor images into a commit.

## R0: current facts (complete; read-only, low risk)

Serial-pin adb and fastboot, assert `product=bluejay`, and capture Android
state before unlocking. The owner approved the reboot, data erasure and
unlock, and confirmed the bootloader prompt physically. Fastboot now
reports `unlocked=yes`, `current-slot=b`. A's contradictory successful /
unbootable flags remain unchanged. Stop on a product or serial mismatch.
Rollback: none for reads; the approved unlock's data wipe is irreversible.

## R1: establish stock recovery (complete; high impact)

Prepare Google's full `bluejay` OTA for `CP3A.261005.002.A1` on the laptop.
Check the complete file's SHA-256 against Google's published download
table, its ZIP metadata's `pre-device`, resulting fingerprint and security
patch, and its payload partition inventory. Do not use a partial download.

The package contains bootloader, modem, vbmeta and system firmware as well
as boot images. A recovery sideload is therefore outside the project's
Linux slot-B writer allowlist. **Ask the owner for this specific stock
recovery exception before entering the recovery/sideload sequence.** A
general acceptance of erasing user data is not this exception.

The owner explicitly approved the exact recovery / signed OTA / stock A
verification / return-to-bootloader sequence. The full OTA checksum
matched Google's published SHA-256, its metadata matched the captured
phone fingerprint, and the serial-pinned sideload completed. This
approval covers this stock recovery operation, not a later Linux flash.

Results (2026-11-05): adb sideload exited 0 with `Total xfer: 2.00x`.
Owner-provided photos show package verification result 0 and **Install
from ADB completed with status 0**. Earlier metadata mount / formatting
and missing `tune2fs` messages are visible; they did not prevent recovery
from reporting successful installation. The approved stock reboot returned
the phone as a normal Android MTP USB device; debugging was unavailable
after the wipe. After the owner returned it to fastboot, serial-pinned
queries report `current-slot=a`, `slot-successful:a=yes`,
`slot-unbootable:a=no`; B is also successful and not unbootable. The
bootloader remains unlocked at `bluejay-17.0-15681480`. Slot-A success is
the bootloader's reported evidence; no post-OTA Android properties were
read, and no explicit Welcome-screen confirmation was received. The
installed package's device and fingerprint were verified before sideload.

After approval, use the captured serial and stock B's recovery, with the
owner at the buttons. Expected sequence: recovery menu, Apply update from
ADB, exact verified package via `adb -s <serial> sideload <OTA>`, successful
verification and installation, then owner-approved stock boot. Record the
actual resulting slot rather than assuming recovery updated A.

Pass: stock Android boots on A, reports the expected build, and fastboot
subsequently reports A bootable and successful. Inspect B's state too.
Stop: recovery rejects the signature, build, timestamp or device; an
installation error; unexpected slot; or no working A boot. Do not bypass
verification, downgrade, run a factory flash script or manually write
protected firmware partitions. Keep the working B images until A is
verified. Rollback: remain in recovery/fastboot and diagnose with the
matching stock package available; a partially applied update has no
assumed automatic rollback. Do not relock the bootloader for development.

## R2: offline images (complete; not permission to flash)

Once the kernel build finishes, build this device's boot images with the
project tool and the explicit kernel source/output above. Verify the
bluejay compatible, both gs101 SoC revision entries, MP1.0 overlay IDs,
image sizes and boot AVB footer/index against the stock capture. Run the
storage-guard checks and device-tree validation. Keep build logs and
record warnings; a completed build alone is not a phone test.

Results (2026-11-05): `W=1` built
`7.3.0-rc6-omamobile-push1-g29a7a9326bf0` and the bluejay DTB with no
compiler errors. The unchanged published sources produced 1,145 warning
lines, 1,138 of them initializer overrides; this is not a warning-free
build. No kernel source patch was made, so checkpatch has no patch to
review. Google board-schema validation reported no diagnostics (limited
to `arm/google.yaml`, not all subsystem bindings). Storage-guard tests
passed 24 checks; image-layout tests passed 37.

The shared initramfs and all three images built. Offline preflight checked
both SoC revision IDs, bluejay compatible and symbols, MP1.0 overlay IDs,
vendor header and command line without earlycon, boot footer rollback
index `1791158400` / security patch `2026-10-05`, and image sizes against
the actual partition sizes. The packed allowlist has exactly the expected
four names, with no board MMIO trigger, probe or USB-switch file. Image
hashes and build receipts remain in the private output directory. No
phone test or flash is implied by these results.

## R3: first Linux boot (complete, explicitly approved)

Use only `DEVICE=bluejay bin/omamobile flash` with the explicit validated
M1 output. It writes B's three images and activates/reboots B. The owner
must approve that concrete image set and be present for physical recovery.
Do not install a root filesystem or reuse another phone's data yet.

Expect USB NCM/ACM and SSH to the initramfs at `172.16.42.1` within about a
minute. Display refresh is not enabled, so a stationary bootloader logo
is not the pass/fail signal. Verify uptime beyond 120 seconds, watchdog
handover and storage-guard state. Stop if USB is absent after three minutes
or there is a reset loop; do not keep retrying or change two things.

Rollback: owner-assisted Volume Down + Power to fastboot, then approved
selection and boot of the previously verified stock A. With no verified A,
R3 must not run. Risk: high, first custom kernel on this board.

Results (2026-11-05): all three writes returned OKAY; SSH answered at
uptime 2.57 seconds. Compatible and native kernel release matched bluejay
and the validated image set. USB is configured/high-speed. Both cluster
watchdogs report reset disabled. At 565.6 seconds SSH still answered in
the same boot, without panic, oops, UFS error-handler or guard-failure
signatures. All flashed image prefixes matched the original image hashes
on readback. Slot A stayed read-only. The same-boot storage guard verified
every protected partition, with `/dev/sda` absent as intended. No custom
driver load, display-register access or additional reboot followed.

## R4: capture and backups before subsystem work (backups complete; memory audit open)

If R3 passes, capture the live FDT, dmesg, memory map, interrupts, native
kernel release and read-only partition state. Verify reserved memory.
Read and checksum this phone's own calibration / modem partitions into a
private backup before radio, PMIC, AoC or Trusty experiments. No such
backup exists from the unprivileged stock capture. No Wi-Fi, GPU, touch,
audio, charging or suspend capability is claimed by these first-boot gates.

Results: live FDT, kernel logs, iomem, interrupts, modules, mounts, USB,
watchdog and block guard state were captured privately. The six required
calibration / modem partitions plus stock A's three boot images and
`devinfo` were read without mounting or changing flags, each matched by
exact size and remote-before / local-copy / remote-after SHA-256. All
protected partitions remained read-only. Twelve native static reserved
regions match exclusions in iomem. The static stock-reference comparison
has unresolved differences: [MEMORY-PLAN](MEMORY-PLAN.md). Do not enable
new hardware until that gate is resolved. B's boot-success flags have not
been changed by this test.
37 changes: 37 additions & 0 deletions device/bluejay/DISPLAY-PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- SPDX-License-Identifier: MIT -->
# Bluejay retained display

Status (2026-11-08): an actual Omarchy desktop renders at 1080x2400 on retained
simpledrm, approximately 60 Hz. Panfrost renders through a separate Mali-G78
node. Native panel/DSI modesetting remains unfinished.

The selected stock panel is Samsung S6E3FC3 Bluejay (`samsung,s6e3fc3_6a`),
not the Pixel 7 P10 variant handled by the existing similarly named driver.
Do not copy its reset, brightness or panel-command sequence without an audit.

Google's GS101 display source locates DECON0 at 0x1c300000. Its powered retained
path reported VERSION 0x06010000, GLOBAL_CON 0x133 and TRIG_CON 0x3070, with a
stationary frame counter. The qualified refresh operation changes only the
trigger mask/software-enable bits: TRIG_CON 0x3070 to 0x3061. It does not alter
DSI, panel reset, timing or brightness. Counter progress measured 60.06 Hz and
the owner observed numbered framebuffer alternation. The corrected whole-frame
readback matched all 10,368,000 bytes after stopping fbcon cursor repaint.

The installed hardware service restores this exact operation after USB SSH and
touch setup, under a persisted failure marker and deadline. The framebuffer is
1080x2400, stride 4320, 32 bpp. Never use the generic GS201 `tools/display-hz`
address unchanged on this GS101 board, and never sweep unpowered registers.

Aquamarine 0.16.0 needs the opt-in patch under `patches/` to avoid its unused
auxiliary EGL-device probe on display-only simpledrm. Without a GPU, Mesa GBM
software rendering works. With Panfrost, Aquamarine's existing sole-render-node
fallback pairs the separate GPU with simpledrm; no additional patch was needed.
See [GPU-PLAN](GPU-PLAN.md) for headless pixel and compositor results.

Before a new display test, announce the screen change, stream logs and require
the watchdog. Confirm the exact board/register state and touch/SPI health first.
Stop on a mismatch, loss of transport or new fault; recover with the retained B
images through the project helper. PMU registers are never accessed from userspace.

Sources: Google's Bluejay and GS101 display DT/driver at
`android-16.0.0_r0.9`, the owner's own captures and the upstream/project kernel.
132 changes: 132 additions & 0 deletions device/bluejay/GPU-PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<!-- SPDX-License-Identifier: MIT -->
# Bluejay GPU bring-up

Status (2026-11-08): G1 headless rendering and the accelerated Omarchy desktop
pass. The owner confirms unlocking, opening an app and scrolling with correct
display and normal response. A subsequent normal reboot independently passed
automatic GPU, touch, Wi-Fi and desktop startup. Native panel modesetting remains separate: presentation still
uses the retained simpledrm framebuffer.

## Source and initial state

- Running kernel: `7.3.0-rc6-omamobile-bluejay-input-gated0`, built in
`~/android/mainline/out-bluejay-input-20261107` from
`~/android/mainline/wt-bluejay-input-20261107`. Keep those frozen.
- Its Panfrost already matches `google,gs101-mali`, identifies G78 and forces
AArch64 page tables. See [raven's results](../raven/GPU-PLAN.md); those results
establish driver provenance, not Bluejay qualification.
- The installed Mesa is `1:26.2.4-1.4`; its project build includes the G78 model.
At the initial audit Bluejay's GPU node was disabled, no render node existed,
and the GPU modules were absent from the installed tree. Software rendering
was explicit in the session environment.
- GS101's GPU node defines its own job/MMU/GPU interrupts (420/421/419), register
range and ACPM clock. G1 retains them. The four supplies follow Google's
`gs101-pmic.dtsi`, included by Bluejay's own board source: BUCK2S (G3D),
BUCK8S (G3D L2), LDO1S (G3D memory), BUCK7M (internal memory).

Sources: the exact local kernel sources above and the owner's already retrieved
[Google GS101 device sources](https://android.googlesource.com/kernel/devices/google/gs101/+/refs/tags/android-16.0.0_r0.9/dts/gs101-pmic.dtsi),
plus [Bluejay PMIC overrides](https://android.googlesource.com/kernel/devices/google/bluejay/+/refs/tags/android-16.0.0_r0.9/dts/gs101-bluejay-pmic.dtsi).

## G1: bounded driver and headless rendering qualification

`overlays/gpu-g1.dtso` enables only the GPU, adds its supply references and points
it at a single 151 MHz OPP. The existing ACPM driver pairs that shader rate with
302 MHz L2; the full frequency range is deliberately a later test.
`tools/bluejay-development-images.py --dt-overlay FILE` applies this overlay to
both silicon variants in the known persistent images. The kernel, packed RAM,
boot image, empty board DTBO, bootargs and every unrelated DT property must
remain identical. The exact matching Panfrost and gpu-sched modules are added
without replacing the installed module tree. Keep the boot blacklist.

1. **Read-only / low risk:** verify actual image structure and semantic DT delta,
GPU/OPP schemas, overlay checkpatch, matching module release/hash and current
USB SSH/watchdog state. Preserve the private results in the current GPU
evidence directory. Stop on an unexpected DT/image/module delta. No protected-data write is part of this probe.
2. **B images and reboot / bounded boot risk:** announce the screen interruption;
use the existing project `bin/omamobile push` with the candidate directory and
the original matching module-archive marker, so it does not replace modules.
Expect a new boot ID, the same kernel and working automatic desktop/input/
Wi-Fi. Panfrost remains unloaded. Stop if USB does not return; request physical
Fastboot recovery when necessary. Roll back through the same project helper
using the retained persistent baseline or known RAM rescue images.
3. **Manual probe / hardware hang risk:** stream kernel logs to the host first.
Require systemd's active 20-second watchdog. Run one bounded transient service
with a persisted pending marker, startup/stop deadlines and reboot on failure.
Load Panfrost once. Expect Mali-G78, a render node and 151 MHz devfreq; reject
new faults or SPI/storage errors. A failed attempt stays marked and is not
retried in the same boot. Never unload/rebind or read PMU registers.
4. **Headless GLES / bounded GPU-job risk:** use explicit GBM render-node EGL,
require the renderer to identify G78, and check pixel readback for clear and
shader draws under the same logging/deadline protection. Stop at the first
job/MMU fault, timeout or wrong pixel. Probe success alone is insufficient.

Compositor acceleration is a later stage after headless rendering passes.
Changing its environment/restarting SDDM affects the screen and must be announced.
Native panel, suspend and full GPU DVFS remain unqualified by G1.

The tested handset owner authorized the staged B-image changes and reboots.
Bootloader and calibration remain preserved. Other handset owners must follow
the project installation/recovery policy before repeating a hardware step.

## G1 results and startup integration, 2026-11-08

The actual image checks prove that the kernel, boot image, empty board DTBO and
packed RAM archive retain their exact bytes. The semantic delta in both silicon
DT variants is confined to GPU status, four supply references and the one-entry
OPP table. GPU/OPP binding validation passes against the exact kernel's compiled
schemas; overlay checkpatch has zero errors/warnings/checks. The default image
tool path also reproduces the existing persistent vendor image byte-for-byte.

The first manual probe deferred (`get clock failed -517`): `clk_acpm` was absent
from the root. The guarded service then failed its render-node assertion and
requested an orderly reboot. This was not a GPU hang. Its saved journal, pending
marker and original host stream are retained privately. After recovery, the
exact matching clock module was added and blacklisted. Before its manual load,
`cpufreq-dt` received a driver override to hold that unrelated deferred consumer;
this keeps CPU DVFS out of the GPU qualification.

The corrected clock/Panfrost stage completed in 149 ms. GPU ID is `0x9202`,
Mali-G78 MC20, shader mask `0x779fff`; Panfrost initialized and exposed
`renderD128`. The only available devfreq rate is 151 MHz. The native build of
`tools/bluejay-gpu-smoke.c` passed `-Wall -Wextra -Werror` and explicitly opened
that render node. Mesa reports OpenGL ES 3.1 and `Mali-G78 MC20 (Panfrost)`.
All pixels passed clear, solid shader and alpha-blended shader checks at
64x64, 257x257 and 1024x1024, in 225 ms. No GPU/MMU fault, SPI error or timeout
appeared.

The compositor uses the existing Aquamarine library: its sole-render-node
fallback pairs the display-only simpledrm device with Panfrost. No additional
Aquamarine patch was needed. Hyprland opens the render node and has Panfrost
buffer allocations; software forcing was disabled and Quickshell uses RHI.
The lock screen rendered and the owner confirmed normal unlock/app/scroll use.
An initial capture during DPMS wake was black; the later capture from the same
process rendered the lock screen. Capture was stopped before local PIN entry.
For this installed Lua Hyprland, the working wake command is
`hyprctl dispatch 'hl.dsp.dpms("on")'`.

`omamobile-bluejay-gpu.service` now stages the same exact module hashes and CPU
hold before SDDM. It requires explicit `/etc/omamobile/bluejay-gpu-enable`, which
is present only on this qualified development root. A persisted attempt marker,
30-second startup deadline, five-second stop deadline and systemd watchdog
bound failure; a retained marker skips the GPU on the next boot. The session
environment selects Panfrost only with the service's volatile ready marker and
render node; otherwise it explicitly restores llvmpipe/software rendering.
Package tests cover the opt-in policy, stale/ready fast paths and both renderer
environment branches. Device package version is 0.1.3.

Private evidence is `~/android/reference/bluejay-gpu-20261108`; the candidate used
by the project helper is `candidate-g1-validated`. Three exact-build modules were
added without replacing the root's touch, Wi-Fi or netfilter modules. Full GPU
DVFS, CPU DVFS, Vulkan, suspend and native panel modesetting remain unqualified.

Final fresh boot: `f0708eb4-e748-4456-abe1-5cb3bd3aa8c5`, same kernel as above.
The actual Hyprland process has `GALLIUM_DRIVER=panfrost`,
`LIBGL_ALWAYS_SOFTWARE=0` and open Panfrost render-node descriptors. All four
startup services and SDDM are active, all pending markers are absent, compositor
config errors are empty, and there are no failed system units. Wi-Fi-bound HTTPS
returns HTTP 200 with TLS verification 0; touch SPI errors/timeouts are zero.
No GPU faults appeared. The watchdog remains owned by systemd at 20 seconds;
automatic boot writes remain off and boot-success remains masked. No host
capture/wait jobs remain. The owner interaction check preceded this final reboot;
it was not repeated afterward.
Loading