Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
83cb33d
gitignore: keep private local notes out of Git
h4rkl Oct 26, 2026
8d27985
device-tegu: stage guarded first-light package
codex Oct 26, 2026
a954e35
device-tegu: track reboot-to source for clean builds
h4rkl Oct 26, 2026
0ac0320
device-tegu: pin Android 17 boot header values
h4rkl Oct 26, 2026
f2d338f
device-tegu: build eUSB PHY into first-light kernel
h4rkl Oct 26, 2026
6afbe7b
device-tegu: reflect merged image selector support
h4rkl Oct 26, 2026
0114177
device-tegu: describe package load gate without stale runbook
h4rkl Oct 26, 2026
bbb6047
Merge remote-tracking branch 'upstream/main' into tegu-device-package
h4rkl Oct 27, 2026
35e6dcd
device-tegu 0.1.1: seed clock before offline key setup
h4rkl Oct 27, 2026
b1cf364
device-tegu: Enable validated display trigger at boot
h4rkl Oct 27, 2026
bf81b85
device-tegu 0.1.1: install the tested display trigger
h4rkl Oct 27, 2026
a05e801
device-tegu 0.1.1: start touch after ACPM is ready
h4rkl Oct 27, 2026
d241f24
device-tegu 0.1.1: pack the qualified native boot recipe
h4rkl Oct 27, 2026
7552fd0
device-tegu: state the current release gate
h4rkl Oct 27, 2026
0d565e4
device-tegu 0.1.1: load the mailbox before touch power
h4rkl Oct 27, 2026
c830bfd
Merge upstream main into tegu-device-package
h4rkl Oct 27, 2026
9a6f434
device-tegu 0.1.1: address boot policy review
h4rkl Oct 27, 2026
e7f6f96
omamobile-firstboot 0.1.3: seed the clock before key setup
h4rkl Oct 27, 2026
259c47b
omamobile-firstboot 0.1.3: declare native test dependency
h4rkl Oct 27, 2026
3b95c0d
device-tegu: move shared clock fix to its own PR
h4rkl Oct 27, 2026
8ba80aa
Merge remote-tracking branch 'upstream/main' into tegu-device-package
h4rkl Oct 27, 2026
53a106f
device-tegu 0.1.1: prepare public sources and gate the touch driver
h4rkl Oct 27, 2026
3a05897
device-tegu: record public-kernel oldest-header boot control
h4rkl Oct 27, 2026
bbb667b
device-tegu 0.1.1: preserve modules and enable tested native display …
h4rkl Oct 27, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ out/
*.img
keys/
logs/
local/

# Python bytecode from running package code in place
__pycache__/
Expand Down
132 changes: 132 additions & 0 deletions device/tegu/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,3 +512,135 @@ condition and a known-good B rollback. Preserve stock A and the storage
guard. This entry is not an installation or diagnostic-flashing runbook.

The gated retest and required evidence are in [BRINGUP-M1](BRINGUP-M1.md).


## 2026-10-28: second contributor's native boot and touch

These results are from the PR #74 contributor's own Pixel 9a, a second
phone; they do not replace the first owner's results above. The last
verified Android build on this phone's slot A was `CP3A.261005.005`
(Android 17, October 2026). Subsequent stock recovery attempts failed;
slot A is not currently a qualified rollback on this phone. Recovery for
these trials uses privately retained, checksum-verified B images. Arch now
occupies userdata. No compatibility claim is made for the other owner's
`BP3A.250905.014` build or for booting September headers on this phone.

Kernel: `7.3.0-rc6-omamobile-push1-g9ea0e19f8dc2`, from the private
`omamobile-tegu-release` branch, based on public `omamobile` commit
`33267e524` plus the then-reviewed clock/binding changes and prototype tegu
board, USB, UFS and touch changes. It is not the tree now proposed in
[linux-omarchy-mobile #80](https://github.com/derekross/linux-omarchy-mobile/pull/80)
and [#81](https://github.com/derekross/linux-omarchy-mobile/pull/81).
Those public board and touch PRs are the integration target; the private
prototype overlays have been removed from this package PR.

The guarded `DEVICE=tegu bin/omamobile flash` path wrote only `boot_b`,
`init_boot_b`, `vendor_boot_b`, `vendor_kernel_boot_b` and `dtbo_b`, selected
B and rebooted. A second trial used an initramfs without builder SSH keys.
Both reached native Arch, Hyprland and the Omarchy shell on existing
userdata. The second boot retained all 1,783 matching modules. With device
package `0.1.1-2`, the 35-second timer loaded the Exynos mailbox before ACPM;
ACPM reported 16 usable channels and the S3908 registered at 35.48 seconds.
The owner had confirmed physical taps and swipes on the earlier prototype;
this kernel's new-boot check confirmed automatic input registration. Camera
inspection confirmed the password screen and keyboard after enabling DPMS.

This prototype uses ABL's simple framebuffer, not the native DRM panel
path in the other owner's integration. Its private image recipe used
October 2026 headers/AVB metadata and a DECON trigger write. Those settings
are not in the shared descriptor: it retains main's oldest-owner header
values, no AVB footer override or display register write, and an inactive
DTB selector pending public-kernel and cross-owner qualification.

`tools/phone-smoke` on that boot passed the required boot, storage-guard,
root, kernel-health, USB and session checks: 62 guarded partitions, ext4 on
userdata, no oops/BUG/WARN, and no failed systemd units. It found the
1080x2424 display and Synaptics touch input. GPU had no render node; buttons,
Wi-Fi, Bluetooth, battery/charging, audio, sensors and cameras were absent
or skipped. Clean installation, slot-success marking and those peripherals
remain unqualified. The review's later persistent touch marker is covered
by mocked failure/retry tests, not a new hardware cold-boot claim.

### Follow-up: recovery and persistent-marker device tests

On the same second phone and private `g9ea0e19f8dc2` kernel, native aarch64
package builds ran with checks enabled. Device package `0.1.1-3` passed a
normal reboot: the timer registered touch and removed its marker. A second
reboot with a deliberately retained, synced marker left touch absent and
logged that startup was skipped. With host kernel-log streaming and a
hardware watchdog, explicit `--retry` restored touch and cleared the marker.
A fresh SSH connection succeeded, the watchdog stopped cleanly, and the
camera confirmed the Omarchy lock screen after DPMS enable. Package
`0.1.1-4` then passed native build/check, installation integrity and retry
checks; its modular-touch behavior on the public kernel remains untested.

The stock-A recovery result above is superseded: all five live A boot-image
hashes matched the retained official October stock images. Selecting A
and requesting recovery reached Android's `No command` screen; recovery
ADB and shell responded, reporting slot A and `CP3A.261005.005`. Recovery
returned to fastboot and B returned to Omarchy without an image write or
userdata reset. This verifies recovery boot, not a full Android boot or
factory reset. As in the repository installer, restoring Android requires
resetting the userdata occupied by Arch; seamless dual boot is not claimed.
No newer metadata has been added to the shared tegu descriptor.

### Public base and oldest-header control on the second phone

The public board/touch base at `9386dfaa1d5d1b537ac23e47b65106ee679cfc2a`
built with the tegu fragment boots as
`7.3.0-rc6-omamobile-push1-g9386dfaa1d5d`. Its first five-image B trial
used Android 16 / September 2025 headers without AVB footers and returned
to fastboot: the screen reported `bootfailure`, and `enter-reason` reported
`boot failure`. No precise verification error or kernel crash log was
available, so that attempt alone did not establish a metadata rejection.

A controlled second trial kept every original image payload byte-identical
and added hash footers using the image tool's AOSP test key, rollback index
**0**, OS version **16**, and security patch **2025-09-05**. The same guarded
B-only flash path then booted Arch on userdata and restored USB/SSH. ACPM
reported 16 usable channels at 0.22 seconds; the guarded timer loaded the
modular touchscreen at 36.1 seconds, registered S3908 input and cleared
its marker. Smoke checks at 97 seconds passed boot, all 62 storage guards,
root, kernel health, USB, touch and buttons.

This base has no display driver: no framebuffer/DRM connector or graphical
session appeared, Plymouth failed, and the camera retained the Google logo.
Native-display qualification remains separate. Software `reboot-to bootloader`
also returned to normal boot, requiring physical fastboot. These results
show that this newer phone can boot the oldest shared header values with
index-zero footers; they do not qualify footers on the other owner's phone.
The shared descriptor remains unchanged, without an active selector or
footer/trigger overrides. No stock-A image or protected partition was written.

### Native DRM and package persistence on the second phone

The pinned display source tree `1175a53bf9b229319aa183b389071add6645eddc`
booted as `7.3.0-rc6-omamobile-push1-gde2e0689c517`, using the same older
headers and index-zero footer policy above, without an initramfs trigger
write. The initial boot exposed a userspace blocker: Arch's
`kernel-modules-hook` cleanup had removed the unowned, preinstalled modules
for the next kernel during the preceding base-kernel boot. Restoring the
matching archive and loading the drivers under log capture and a watchdog
produced a native `card0-DSI-1` connector and Omarchy on camera. The owner
confirmed physical touch response.

Device package `0.1.1-6` skips that cleanup while installed, enables native
DSI brightness commands following the other Tensor packages, and limits
refresh to the tested 60 Hz. Native aarch64 package builds/checks and
installation integrity checks passed. Backlight restoration passed after
enabling DSI commands. Temporary bring-up blacklists were removed.

A subsequent reboot retained all 1,782 modules and automatically initialized
native DRM at 3.66 seconds, then touch through the guarded timer. The panel
reported 1080x2424 at 60 Hz; DPMS wake restored the visible lock screen.
At 223 seconds, all required smoke checks passed: boot, 62-partition storage
guard, ext4 root, kernel health, USB and the Hyprland/Omarchy session. Touch
and buttons also passed. The firewall and backlight service were active
or completed successfully. The persistent marker was cleared.

Remaining limitations: Plymouth's early splash daemon crashes in `strcmp`
with no active console; no GPU render node is present; Wi-Fi, Bluetooth,
battery/charging, audio, sensors and cameras are not qualified by this
candidate. This tests an existing Arch installation, not a clean install.
No boot-success writer was enabled, and shared footer activation still
requires the other owner's boot result. Stock A was not written.
13 changes: 13 additions & 0 deletions device/tegu/kernel.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: GPL-2.0-only
# The USB gadget must come up in the initramfs before rootfs modules exist.
CONFIG_PHY_SNPS_EUSB2=y
# The public tegu board supplies that PHY through S2MPG14 over ACPM.
# Keep the whole supply chain available before mounting userdata.
CONFIG_EXYNOS_MBOX=y
CONFIG_EXYNOS_ACPM_PROTOCOL=y
CONFIG_MFD_SEC_ACPM=y
CONFIG_REGULATOR_S2MPS11=y
# Native DRM takes over the TG4C panel; no initramfs trigger write is needed.
CONFIG_DRM_PANEL_GOOGLE_TG4C=m
# Keep touch behind the persistent userspace hang marker.
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_SPI=m
14 changes: 14 additions & 0 deletions device/tegu/kernel.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT
# Public board/touch base: linux-omarchy-mobile PRs #80 and #81.
REPOSITORY https://github.com/W4HO-ham/linux-omarchy-mobile.git
BASE 9386dfaa1d5d1b537ac23e47b65106ee679cfc2a
# Native TG4C display: #88 drivers, #89 panel, #90 display bindings/DTS.
# GPU and CPU DVFS changes are separate qualification steps.
PICK 8770c91fde131ae79d6c547936bdea197b1bec45
PICK 0caf5f7d50c4eaca94e717b363309e122391bff0
PICK 3d414e3162f42162477389033bdc9a508e72ee0b
PICK 223b98abf9bef5a2d74688155678052b1464aa46
PICK ee633720ec86339915ef30a08a78750a6b2e19b3
PICK 0cfc47a0cb900269e0608bbccd33f33e50ed5c5a
PICK de5d1aa13a4886785b3476ddc8a70887fffd6f70
TREE 1175a53bf9b229319aa183b389071add6645eddc
44 changes: 44 additions & 0 deletions device/tegu/prepare-kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Prepare the pinned public tegu source in a new worktree. No build or flash.
# Usage: device/tegu/prepare-kernel EXISTING_KERNEL_REPOSITORY NEW_WORKTREE
set -euo pipefail
[[ $# == 2 ]] || { echo "usage: $0 KERNEL_REPOSITORY NEW_WORKTREE" >&2; exit 2; }
repo=$1
destination=$2
manifest=$(dirname -- "${BASH_SOURCE[0]}")/kernel.sources
destination=$(cd -- "$(dirname -- "$destination")" && printf '%s/%s' "$PWD" "$(basename -- "$destination")")
[[ ! -e $destination && ! -L $destination ]] || { echo 'destination already exists; use a new worktree' >&2; exit 1; }
git -C "$repo" rev-parse --git-dir >/dev/null

repository= base= tree=
picks=()
while read -r key value extra; do
case $key in ''|'#'*) continue ;; esac
[[ -z $extra ]] || { echo 'malformed kernel.sources entry' >&2; exit 1; }
case $key in
REPOSITORY)
[[ -z $repository && $value == https://github.com/*/*.git ]] || exit 1
repository=$value ;;
BASE|PICK|TREE)
[[ $value =~ ^[0-9a-f]{40}$ ]] || exit 1
case $key in
BASE) [[ -z $base ]] || exit 1; base=$value ;;
PICK) picks+=("$value") ;;
TREE) [[ -z $tree ]] || exit 1; tree=$value ;;
esac ;;
*) echo "unknown kernel.sources key: $key" >&2; exit 1 ;;
esac
done < "$manifest"
[[ -n $repository && -n $base && -n $tree ]] || exit 1

# Keep the caller's branches intact and preserve the public commits' authors.
git -C "$repo" fetch --no-tags "$repository" "$base" "${picks[@]}"
git -C "$repo" worktree add --detach "$destination" "$base"
for commit in "${picks[@]}"; do
git -C "$destination" cherry-pick "$commit"
done
actual=$(git -C "$destination" rev-parse 'HEAD^{tree}')
[[ $actual == "$tree" ]] || { echo 'prepared kernel source tree does not match manifest' >&2; exit 1; }
printf 'Prepared tegu source tree %s\n' "$actual"
echo 'Build using the repository kernel workflow with this KERNEL_DIR and a separate KERNEL_OUT.'
21 changes: 21 additions & 0 deletions packages/omamobile-device-tegu/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Derek Ross

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 26 additions & 0 deletions packages/omamobile-device-tegu/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: MIT
pkgname=omamobile-device-tegu
pkgver=$(cat "${startdir:-.}/version")
pkgrel=6
pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)"
arch=(aarch64)
url="https://github.com/derekross/omarchy-mobile"
license=(MIT)
depends=(bash coreutils grep kmod systemd omamobile-keyring)
provides=(omamobile-device)
conflicts=(omamobile-device)
backup=(etc/pacman.d/omamobile-mirrorlist)
install=omamobile-device-tegu.install
makedepends=(gcc)

build() {
"$startdir/build" "$srcdir/build"
}

check() {
"$startdir/test/all"
}

package() {
"$startdir/install" "$pkgdir" "$srcdir/build"
}
61 changes: 61 additions & 0 deletions packages/omamobile-device-tegu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- SPDX-License-Identifier: MIT -->
# Pixel 9a device package

Boot and touch userspace policy for `tegu`: guarded storage visibility, the
USB gadget network address, a bounded reboot watchdog, and delayed touch
startup. The package also provides `reboot-to` and the device descriptor.
It skips Arch's old-kernel module cleanup while installed: modules shipped
as tarballs are not pacman-owned, and must survive until their B-slot kernel
boots, as well as remain available for rollback.

Installing the package does not mark slot B successful or start Wi-Fi,
charging, audio, sensors, cameras, or other peripherals. When the tegu
touchscreen DT child is enabled, a timer loads the touchscreen after early
boot and checks that touch input registered. Before loading any drivers,
it writes and syncs a persistent marker at
`/var/lib/omamobile/tegu-touch-started`. A failed or hung start leaves that
marker behind, so subsequent boots skip the attempt. After inspecting the
previous boot's journal, explicitly retry with
`sudo /usr/lib/omamobile/tegu-touch-start --retry`. Success removes the marker.
The tegu kernel fragment builds touch as a module, and the package blocks
its automatic loading so the marker gates it. The public board needs ACPM
and its PMIC built in for early USB power; on older modular kernels the
service loads those dependencies first. The marker cannot gate built-in
drivers. The delay allows userspace to start; this package provides no USB rescue.

The packaged descriptor matches main's staged descriptor: Android 16 and
September 2025 header values, no AVB footer override or display register write,
and no active DTB selector. Image building remains gated pending qualification
against the public board DTS in kernel PRs
[#80](https://github.com/derekross/linux-omarchy-mobile/pull/80) and
[#81](https://github.com/derekross/linux-omarchy-mobile/pull/81).
Those trees differ from the private prototype that produced the recorded
hardware results. In particular, the public board also uses ACPM for USB PHY
supplies: its boot ordering must be qualified with this package's module
policy. Boot, native DRM at 60 Hz, touch and module retention have passed
on the second contributor's phone; see `device/tegu/NOTES.md` for the exact
source and image metadata. Cross-owner footer qualification and clean
installation remain pending. This is not yet an installable release.

## Building the public kernel candidate

`device/tegu/kernel.sources` pins the public board, touch and native TG4C
display changes and the resulting source-tree hash. From the repository root,
prepare a new worktree without changing an existing kernel branch:

```sh
device/tegu/prepare-kernel "$HOME/android/mainline/linux" "$HOME/android/mainline/wt-tegu"
KERNEL_DIR="$HOME/android/mainline/wt-tegu" \
KERNEL_OUT="$HOME/android/mainline/out-tegu" DEVICE=tegu bin/omamobile kernel
```

Use the toolchain and AOSP prerequisites in `CONTRIBUTING.md`. If
`omamobile.local.conf` sets `KERNEL_DIR` or `KERNEL_OUT`, update those values
too: that file takes precedence over the environment. The preparation step
fetches only public source commits and checks the resulting tree; it does
not build images or touch the phone. The pinned candidate excludes GPU and
CPU-frequency changes, which need separate qualification. Its intended
display path is native DRM, without a shared framebuffer register write.
The native path has passed on one phone. Shared descriptor activation
awaits the other owner's footer qualification; no newer rollback metadata
is introduced here.
Loading