From 83cb33d1ea7080aa2875eb9e0c4e7b8c7088a8b7 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Mon, 26 Oct 2026 17:18:16 +1300 Subject: [PATCH 01/21] gitignore: keep private local notes out of Git Ignore local development playbooks and captures so tegu work can retain private context without exposing it in public changes. Co-Authored-By: Codex --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 14b43f718..543e21d76 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ out/ *.img keys/ logs/ +local/ # Python bytecode from running package code in place __pycache__/ From 8d27985229dda44fa5d42cffbb8ab845ff8a4cbb Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 26 Oct 2026 17:44:25 +1300 Subject: [PATCH 02/21] device-tegu: stage guarded first-light package Provide tegu-only userspace policy for the first native root: keep the storage guard in force, configure USB networking, and bound a hung shutdown. Keep slot-success marking and peripheral startup absent until the board and recovery gates pass. The package stages cleanly on the Linux build host; tests/all passes there. This does not make the staged descriptor installable. --- packages/omamobile-device-tegu/LICENSE | 21 +++++++++++ packages/omamobile-device-tegu/PKGBUILD | 26 ++++++++++++++ packages/omamobile-device-tegu/README.md | 11 ++++++ packages/omamobile-device-tegu/build | 7 ++++ packages/omamobile-device-tegu/device.conf | 35 +++++++++++++++++++ .../etc/omamobile-mirrorlist | 6 ++++ packages/omamobile-device-tegu/install | 18 ++++++++++ .../omamobile-device-tegu.install | 24 +++++++++++++ packages/omamobile-device-tegu/test/all | 34 ++++++++++++++++++ .../conf.d/10-omamobile-usb.conf | 5 +++ .../systemd/network/20-usb-gadget.network | 14 ++++++++ .../10-omamobile-reboot-watchdog.conf | 7 ++++ .../udev/rules.d/10-omamobile-storage.rules | 8 +++++ packages/omamobile-device-tegu/version | 1 + tests/all | 2 +- 15 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 packages/omamobile-device-tegu/LICENSE create mode 100644 packages/omamobile-device-tegu/PKGBUILD create mode 100644 packages/omamobile-device-tegu/README.md create mode 100755 packages/omamobile-device-tegu/build create mode 100644 packages/omamobile-device-tegu/device.conf create mode 100644 packages/omamobile-device-tegu/etc/omamobile-mirrorlist create mode 100755 packages/omamobile-device-tegu/install create mode 100644 packages/omamobile-device-tegu/omamobile-device-tegu.install create mode 100755 packages/omamobile-device-tegu/test/all create mode 100644 packages/omamobile-device-tegu/vendor/NetworkManager/conf.d/10-omamobile-usb.conf create mode 100644 packages/omamobile-device-tegu/vendor/systemd/network/20-usb-gadget.network create mode 100644 packages/omamobile-device-tegu/vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf create mode 100644 packages/omamobile-device-tegu/vendor/udev/rules.d/10-omamobile-storage.rules create mode 100644 packages/omamobile-device-tegu/version diff --git a/packages/omamobile-device-tegu/LICENSE b/packages/omamobile-device-tegu/LICENSE new file mode 100644 index 000000000..aecd59624 --- /dev/null +++ b/packages/omamobile-device-tegu/LICENSE @@ -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. diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD new file mode 100644 index 000000000..393fcd883 --- /dev/null +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: MIT +pkgname=omamobile-device-tegu +pkgver=$(cat "${startdir:-.}/version") +pkgrel=1 +pkgdesc="Omarchy Mobile first-light support for the Google Pixel 9a (tegu)" +arch=(aarch64) +url="https://github.com/derekross/omarchy-mobile" +license=(MIT) +depends=(bash 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" +} diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md new file mode 100644 index 000000000..32d37dfb8 --- /dev/null +++ b/packages/omamobile-device-tegu/README.md @@ -0,0 +1,11 @@ +# Pixel 9a device package + +First-light userspace policy for `tegu`: guarded storage visibility, the +USB gadget network address, and a bounded reboot watchdog. The package +also provides the generic `reboot-to` command and the device descriptor. + +Installing the package does not mark slot B successful or start Wi-Fi, +charging, audio, sensors, cameras, or other peripherals. The public kernel +board source and image selector are still required before a device load. +The supervised bring-up gates are in +[`device/tegu/BRINGUP-M1.md`](../../device/tegu/BRINGUP-M1.md). diff --git a/packages/omamobile-device-tegu/build b/packages/omamobile-device-tegu/build new file mode 100755 index 000000000..1d7d8eeb2 --- /dev/null +++ b/packages/omamobile-device-tegu/build @@ -0,0 +1,7 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" +out=${1:-build} +mkdir -p "$out" +${CC:-cc} ${CFLAGS:--O2} -Wall -Wextra -o "$out/reboot-to" src/reboot-to.c ${LDFLAGS:-} diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf new file mode 100644 index 000000000..80bc14ffc --- /dev/null +++ b/packages/omamobile-device-tegu/device.conf @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: MIT +# Pixel 9a first-light descriptor. See NOTES.md. +# Data only: this is a staged port, not an installable release. +CODENAME=tegu +NAME="Pixel 9a" +USB_PRODUCT="Pixel 9a (M1)" +SOC=zumapro +COMPATIBLE="google,zumapro-tegu" +PACKAGE=omamobile-device-tegu + +DTB=exynos/google/zumapro-tegu.dtb +# Deliberately no SOC_IDS: this loader uses /soc_compatible matching. +# Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 +# (NOTES.md). Shared support is reviewed separately in #27. +# SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" +# Keep both selector keys unset: #27 accepts either one. Activate only +# with the public DTB and required AVB footer values in a later PR. +# Do not use a dummy soc_id or borrow gs201's values to bypass the check. + +DTBO_SOURCE=tegu-m1-overlay.dts +DTBO_BOARD_ID=0x60b06 +DTBO_BOARD_REV=0x10000 +VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" +VENDOR_PAGESIZE=0x800 +# Official BP3A init_boot header; both OTA/AVB and stock-A checks: NOTES.md. +OS_VERSION=16.0.0 +OS_PATCH_LEVEL=2025-09 +BOOT_METHOD=android-v4 +BOOT_IMAGES="boot init_boot vendor_boot vendor_kernel_boot dtbo" +UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" + +INITRAMFS_INIT=/initramfs/init +PANEL_SIZE=1080x2424 +# No BRINGUP_PROBE or SIMPLEFB_TRIG_CON: those gs201 display accesses do +# not apply here. The prototype's G4 trigger handling needs its own change. diff --git a/packages/omamobile-device-tegu/etc/omamobile-mirrorlist b/packages/omamobile-device-tegu/etc/omamobile-mirrorlist new file mode 100644 index 000000000..b272b8fca --- /dev/null +++ b/packages/omamobile-device-tegu/etc/omamobile-mirrorlist @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: MIT +# Where pacman gets Omarchy Mobile's packages ([omamobile] in /etc/pacman.conf). +# While the project is private, the repository lives on the phone and is +# filled from the build machine (tools/repo-push). Once it's public, this +# becomes a URL, delivered by a package update. +Server = file:///var/lib/omamobile/repo/$arch diff --git a/packages/omamobile-device-tegu/install b/packages/omamobile-device-tegu/install new file mode 100755 index 000000000..011364245 --- /dev/null +++ b/packages/omamobile-device-tegu/install @@ -0,0 +1,18 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Stage only the first-light policy; boot-success and peripheral services +# require separate device qualification. +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" +destination=${1:?Usage: ./install DESTDIR [BUILDDIR]} +build=${2:-build} +[[ $destination == /* && $destination != "/" ]] || { echo "Use an absolute staging directory" >&2; exit 1; } + +install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" +while IFS= read -r -d '' file; do + install -Dm644 "$file" "$destination/usr/lib/${file#vendor/}" +done < <(find vendor -type f -print0) +install -Dm644 device.conf "$destination/usr/share/omamobile/device.conf" +install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist" +install -Dm644 LICENSE "$destination/usr/share/licenses/omamobile-device-tegu/LICENSE" +install -Dm644 version "$destination/usr/share/omamobile/device-tegu/version" diff --git a/packages/omamobile-device-tegu/omamobile-device-tegu.install b/packages/omamobile-device-tegu/omamobile-device-tegu.install new file mode 100644 index 000000000..60517fa32 --- /dev/null +++ b/packages/omamobile-device-tegu/omamobile-device-tegu.install @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: MIT +# Add the [omamobile] repository to pacman.conf, before [omarchy] so its +# builds (e.g. Mesa with Mali-G710 support) win. Added once; never removed +# automatically, so a user's edits stay. +add_repository() { + local conf=/etc/pacman.conf + grep -q '^\[omamobile\]' "$conf" && return + local entry='[omamobile]\nInclude = /etc/pacman.d/omamobile-mirrorlist\n' + if grep -q '^\[omarchy\]' "$conf"; then + sed -i "0,/^\[omarchy\]/s//${entry//\//\\/}\n[omarchy]/" "$conf" + elif grep -q '^\[core\]' "$conf"; then + sed -i "0,/^\[core\]/s//${entry//\//\\/}\n[core]/" "$conf" + else + printf '\n[omamobile]\nInclude = /etc/pacman.d/omamobile-mirrorlist\n' >>"$conf" + fi +} + +post_install() { + add_repository +} + +post_upgrade() { + add_repository +} diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all new file mode 100755 index 000000000..a5588b40a --- /dev/null +++ b/packages/omamobile-device-tegu/test/all @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT + +bash -n build install omamobile-device-tegu.install +cmp -s device.conf ../../device/tegu/device.conf +./build "$tmp/build" +./install "$tmp/root" "$tmp/build" + +for file in \ + usr/bin/reboot-to \ + usr/lib/udev/rules.d/10-omamobile-storage.rules \ + usr/lib/systemd/network/20-usb-gadget.network \ + usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \ + usr/lib/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf \ + usr/share/omamobile/device.conf \ + usr/share/omamobile/device-tegu/version \ + etc/pacman.d/omamobile-mirrorlist; do + test -f "$tmp/root/$file" +done +grep -q 'KERNEL=="sda", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" +grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" +for absent in \ + usr/bin/omamobile-boot-success \ + usr/bin/omamobile-bootctl \ + usr/lib/systemd/system/omamobile-boot-success.service \ + usr/bin/omamobile-wifi-start \ + usr/bin/omamobile-camera-start; do + test ! -e "$tmp/root/$absent" +done +echo 'ok - tegu package stages first-light policy only' diff --git a/packages/omamobile-device-tegu/vendor/NetworkManager/conf.d/10-omamobile-usb.conf b/packages/omamobile-device-tegu/vendor/NetworkManager/conf.d/10-omamobile-usb.conf new file mode 100644 index 000000000..252de6e15 --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/NetworkManager/conf.d/10-omamobile-usb.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: the USB gadget link to the host (usb0) is configured by +# systemd-networkd; NetworkManager manages everything else (Wi-Fi later). +[keyfile] +unmanaged-devices=interface-name:usb0 diff --git a/packages/omamobile-device-tegu/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-tegu/vendor/systemd/network/20-usb-gadget.network new file mode 100644 index 000000000..4e30191f6 --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/network/20-usb-gadget.network @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: USB networking to the host. The initramfs sets up the USB +# gadget (CDC NCM) before handing over to Arch; this gives it an address. +# The host shares its internet over this link (NetworkManager "shared" +# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +[Match] +Name=usb0 + +[Network] +Address=172.16.42.1/24 +Gateway=172.16.42.2 +DNS=1.1.1.1 +DNS=9.9.9.9 +ConfigureWithoutCarrier=yes diff --git a/packages/omamobile-device-tegu/vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf b/packages/omamobile-device-tegu/vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf new file mode 100644 index 000000000..9764faba8 --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/system.conf.d/10-omamobile-reboot-watchdog.conf @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: if shutdown hangs (a driver stuck in remove(), say), let the +# hardware watchdog reset the phone after a minute instead of leaving it +# on the shutdown splash until someone holds Power. systemd's default is +# 10 minutes. Nothing holds the watchdog while the system runs. +[Manager] +RebootWatchdogSec=1min diff --git a/packages/omamobile-device-tegu/vendor/udev/rules.d/10-omamobile-storage.rules b/packages/omamobile-device-tegu/vendor/udev/rules.d/10-omamobile-storage.rules new file mode 100644 index 000000000..89c02cf30 --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/udev/rules.d/10-omamobile-storage.rules @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile storage guard, continued in Arch. The initramfs marks every UFS +# partition read-only except slot B's boot images and userdata, and removes +# the whole-disk node of the main LUN. udev would recreate /dev/sda, so make +# the whole-disk node inaccessible and keep desktop tools from touching any +# Android partition. +SUBSYSTEM=="block", KERNEL=="sda", MODE="0000", ENV{UDISKS_IGNORE}="1" +SUBSYSTEM=="block", KERNEL=="sd[a-d][0-9]*", ENV{ID_PART_ENTRY_NAME}!="userdata", ENV{UDISKS_IGNORE}="1" diff --git a/packages/omamobile-device-tegu/version b/packages/omamobile-device-tegu/version new file mode 100644 index 000000000..6e8bf73aa --- /dev/null +++ b/packages/omamobile-device-tegu/version @@ -0,0 +1 @@ +0.1.0 diff --git a/tests/all b/tests/all index d06659ec9..59925eadc 100755 --- a/tests/all +++ b/tests/all @@ -20,7 +20,7 @@ sh -n device/flame/initramfs/init sh -n device/flame/initramfs/build bash -n tools/build-flame-probe echo "ok - scripts parse" -for t in tests/pr-check tests/kernel-pr-check tests/install-phone tests/phone-provision tests/initramfs-grow tests/images-layout tests/device-overlays tests/simplefb-trigger tests/storage-guard tests/usb-product tests/boot-method tests/flame-probe packages/omamobile-firstboot/test/all packages/omamobile-device-felix/test/all; do +for t in tests/pr-check tests/kernel-pr-check tests/install-phone tests/phone-provision tests/initramfs-grow tests/images-layout tests/device-overlays tests/simplefb-trigger tests/storage-guard tests/usb-product tests/boot-method tests/flame-probe packages/omamobile-firstboot/test/all packages/omamobile-device-felix/test/all packages/omamobile-device-tegu/test/all; do echo "# $t" "$t" done From a954e353aea8d4318cc7c52830d010f9730fbf9f Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Mon, 26 Oct 2026 18:17:55 +1300 Subject: [PATCH 03/21] device-tegu: track reboot-to source for clean builds The package needs its reboot-to helper at build time, but packages/.gitignore ignores src directories. Track this tegu copy explicitly so a clean checkout can build the package. --- .../omamobile-device-tegu/src/reboot-to.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/omamobile-device-tegu/src/reboot-to.c diff --git a/packages/omamobile-device-tegu/src/reboot-to.c b/packages/omamobile-device-tegu/src/reboot-to.c new file mode 100644 index 000000000..f79e948ed --- /dev/null +++ b/packages/omamobile-device-tegu/src/reboot-to.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +// reboot-to: reboot with a reason the Pixel bootloader understands, +// e.g. "reboot-to bootloader" lands in fastboot. +// The kernel's syscon-reboot-mode driver stores the reason in the PMU +// before the reset; busybox reboot can't pass one. +#include +#include +#include + +/* From (stable ABI); musl's sysroot has no kernel headers */ +#define LINUX_REBOOT_MAGIC1 0xfee1dead +#define LINUX_REBOOT_MAGIC2 672274793 +#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 + +int main(int argc, char **argv) +{ + const char *reason = argc > 1 ? argv[1] : "bootloader"; + + sync(); + syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, + LINUX_REBOOT_CMD_RESTART2, reason); + perror("reboot"); + return 1; +} From 0ac03209250204b5235ea415ba0269186f6cb8a2 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Mon, 26 Oct 2026 18:18:59 +1300 Subject: [PATCH 04/21] device-tegu: pin Android 17 boot header values The currently running stock Pixel 9a and the verified CP3A.261005.005 factory init_boot header agree on Android 17 and the October 2026 patch level. Keep the image selector disabled until the board and AVB gates pass. --- device/tegu/device.conf | 7 ++++--- packages/omamobile-device-tegu/device.conf | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/device/tegu/device.conf b/device/tegu/device.conf index 80bc14ffc..021d83fc3 100644 --- a/device/tegu/device.conf +++ b/device/tegu/device.conf @@ -22,9 +22,10 @@ DTBO_BOARD_ID=0x60b06 DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 -# Official BP3A init_boot header; both OTA/AVB and stock-A checks: NOTES.md. -OS_VERSION=16.0.0 -OS_PATCH_LEVEL=2025-09 +# Official CP3A.261005.005 Android 17 init_boot header, checked against the +# currently booted stock A build. The descriptor remains disabled for packing. +OS_VERSION=17.0.0 +OS_PATCH_LEVEL=2026-10 BOOT_METHOD=android-v4 BOOT_IMAGES="boot init_boot vendor_boot vendor_kernel_boot dtbo" UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf index 80bc14ffc..021d83fc3 100644 --- a/packages/omamobile-device-tegu/device.conf +++ b/packages/omamobile-device-tegu/device.conf @@ -22,9 +22,10 @@ DTBO_BOARD_ID=0x60b06 DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 -# Official BP3A init_boot header; both OTA/AVB and stock-A checks: NOTES.md. -OS_VERSION=16.0.0 -OS_PATCH_LEVEL=2025-09 +# Official CP3A.261005.005 Android 17 init_boot header, checked against the +# currently booted stock A build. The descriptor remains disabled for packing. +OS_VERSION=17.0.0 +OS_PATCH_LEVEL=2026-10 BOOT_METHOD=android-v4 BOOT_IMAGES="boot init_boot vendor_boot vendor_kernel_boot dtbo" UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" From f2d338f7e60f664b3029cb48382f941d4fa67924 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Mon, 26 Oct 2026 22:35:54 +1300 Subject: [PATCH 05/21] device-tegu: build eUSB PHY into first-light kernel The tegu USB gadget runs in the guarded initramfs before root filesystem modules are available. Build the Synopsys eUSB2 PHY into the kernel so the high-speed link can probe at that stage. --- device/tegu/kernel.config | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 device/tegu/kernel.config diff --git a/device/tegu/kernel.config b/device/tegu/kernel.config new file mode 100644 index 000000000..b53bf0f16 --- /dev/null +++ b/device/tegu/kernel.config @@ -0,0 +1,3 @@ +# 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 From 6afbe7b4724cda0f71b4664925c9e2ac3ead6291 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 10:51:54 +1300 Subject: [PATCH 06/21] device-tegu: reflect merged image selector support The shared SOC_COMPATIBLE packer is now on upstream main. Keep tegu gated until its public DTB and AVB values are qualified, while removing stale review wording from both descriptor copies. --- device/tegu/device.conf | 6 +++--- packages/omamobile-device-tegu/device.conf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/device/tegu/device.conf b/device/tegu/device.conf index 021d83fc3..d177027eb 100644 --- a/device/tegu/device.conf +++ b/device/tegu/device.conf @@ -11,10 +11,10 @@ PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb # Deliberately no SOC_IDS: this loader uses /soc_compatible matching. # Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 -# (NOTES.md). Shared support is reviewed separately in #27. +# (NOTES.md). The shared selector landed in #27; this device stays gated. # SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" -# Keep both selector keys unset: #27 accepts either one. Activate only -# with the public DTB and required AVB footer values in a later PR. +# Keep both selector keys unset. Activate only with the public DTB and +# qualified AVB footer values in a later PR. # Do not use a dummy soc_id or borrow gs201's values to bypass the check. DTBO_SOURCE=tegu-m1-overlay.dts diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf index 021d83fc3..d177027eb 100644 --- a/packages/omamobile-device-tegu/device.conf +++ b/packages/omamobile-device-tegu/device.conf @@ -11,10 +11,10 @@ PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb # Deliberately no SOC_IDS: this loader uses /soc_compatible matching. # Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 -# (NOTES.md). Shared support is reviewed separately in #27. +# (NOTES.md). The shared selector landed in #27; this device stays gated. # SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" -# Keep both selector keys unset: #27 accepts either one. Activate only -# with the public DTB and required AVB footer values in a later PR. +# Keep both selector keys unset. Activate only with the public DTB and +# qualified AVB footer values in a later PR. # Do not use a dummy soc_id or borrow gs201's values to bypass the check. DTBO_SOURCE=tegu-m1-overlay.dts From 0114177822f54d1e818b18bbf38d621085f7508b Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:34:36 +1300 Subject: [PATCH 07/21] device-tegu: describe package load gate without stale runbook --- packages/omamobile-device-tegu/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index 32d37dfb8..d84ee4b29 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -5,7 +5,6 @@ USB gadget network address, and a bounded reboot watchdog. The package also provides the generic `reboot-to` command and the device descriptor. Installing the package does not mark slot B successful or start Wi-Fi, -charging, audio, sensors, cameras, or other peripherals. The public kernel -board source and image selector are still required before a device load. -The supervised bring-up gates are in -[`device/tegu/BRINGUP-M1.md`](../../device/tegu/BRINGUP-M1.md). +charging, audio, sensors, cameras, or other peripherals. A reviewed board +DTB, qualified image selector and AVB values, and USB/UFS boot evidence are +still required before a device load. From 35e6dcdd700564600d21f7cc1a89fb73c9dcc709 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:46:11 +1300 Subject: [PATCH 08/21] device-tegu 0.1.1: seed clock before offline key setup Tegu first light has no usable wall clock before network time. On the first full Omarchy boot, the clock predated the bundled package keys, so pacman-key skipped them and firstboot finished with a trust warning. Raise only a stale clock to the installed keyring file timestamp before omamobile-firstboot. This lets the signed local repository initialise without depending on a particular build host or network connection. Verified with the tegu package test, an arm64 package build, and on-device unit verification and start. The existing installed keyring was repaired after setting current time. --- .../bin/omamobile-tegu-clock-floor | 14 ++++++++++++++ packages/omamobile-device-tegu/install | 4 ++++ .../system/omamobile-tegu-clock-floor.service | 9 +++++++++ packages/omamobile-device-tegu/version | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor create mode 100644 packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor b/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor new file mode 100644 index 000000000..9ee6a36e2 --- /dev/null +++ b/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor @@ -0,0 +1,14 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# The tegu first-light kernel has no usable wall clock before network time. +# Pacman rejects keyring keys created after that clock. The keyring file is +# already part of the installed, verified root image and gives a safe floor. +set -euo pipefail + +keyring=/usr/share/pacman/keyrings/omamobile.gpg +floor=$(stat -c %Y "$keyring") +now=$(date -u +%s) +[[ $floor =~ ^[0-9]+$ && $now =~ ^[0-9]+$ ]] +if ((now < floor)); then + date -u -s "@$floor" >/dev/null +fi diff --git a/packages/omamobile-device-tegu/install b/packages/omamobile-device-tegu/install index 011364245..3c4ebf517 100755 --- a/packages/omamobile-device-tegu/install +++ b/packages/omamobile-device-tegu/install @@ -9,9 +9,13 @@ build=${2:-build} [[ $destination == /* && $destination != "/" ]] || { echo "Use an absolute staging directory" >&2; exit 1; } install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" +install -Dm755 bin/omamobile-tegu-clock-floor "$destination/usr/lib/omamobile/tegu-clock-floor" while IFS= read -r -d '' file; do install -Dm644 "$file" "$destination/usr/lib/${file#vendor/}" done < <(find vendor -type f -print0) +install -d "$destination/usr/lib/systemd/system/multi-user.target.wants" +ln -sfn ../omamobile-tegu-clock-floor.service \ + "$destination/usr/lib/systemd/system/multi-user.target.wants/omamobile-tegu-clock-floor.service" install -Dm644 device.conf "$destination/usr/share/omamobile/device.conf" install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist" install -Dm644 LICENSE "$destination/usr/share/licenses/omamobile-device-tegu/LICENSE" diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service new file mode 100644 index 000000000..1e5ee33de --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MIT +[Unit] +Description=Seed the tegu clock before offline package key setup +ConditionPathExists=/usr/share/pacman/keyrings/omamobile.gpg +Before=omamobile-firstboot.service + +[Service] +Type=oneshot +ExecStart=/usr/lib/omamobile/tegu-clock-floor diff --git a/packages/omamobile-device-tegu/version b/packages/omamobile-device-tegu/version index 6e8bf73aa..17e51c385 100644 --- a/packages/omamobile-device-tegu/version +++ b/packages/omamobile-device-tegu/version @@ -1 +1 @@ -0.1.0 +0.1.1 From b1cf364c11127917c400642ba24dd8139132e2c6 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:26:58 +1300 Subject: [PATCH 09/21] device-tegu: Enable validated display trigger at boot ABL leaves the tegu command-mode display trigger masked after its splash. The live register read 0x3070; 0x3061 sent the simpledrm framebuffer to the panel while Hyprland and Omarchy Shell were running. Pack the board-checked trigger pair into the tegu initramfs so the desktop appears after boot. --- device/tegu/device.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/device/tegu/device.conf b/device/tegu/device.conf index d177027eb..818dcb258 100644 --- a/device/tegu/device.conf +++ b/device/tegu/device.conf @@ -32,5 +32,7 @@ UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" INITRAMFS_INIT=/initramfs/init PANEL_SIZE=1080x2424 -# No BRINGUP_PROBE or SIMPLEFB_TRIG_CON: those gs201 display accesses do -# not apply here. The prototype's G4 trigger handling needs its own change. +# DECON0's command-mode trigger is masked by ABL after the splash. Live tegu +# registers read 0x3070; clearing the mask and enabling the trigger produced +# the Omarchy desktop through the 1080x2424 simple framebuffer. +SIMPLEFB_TRIG_CON="0x19470030 0x3061" From bf81b85b51545f35e7971eb0f4ae3fc5c5a27f25 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:41:50 +1300 Subject: [PATCH 10/21] device-tegu 0.1.1: install the tested display trigger The package installs a copy of the device descriptor. The booted tegu descriptor gained the board-checked DECON trigger, but the package copy did not, so package tests failed and an installed package would leave the screen at the boot splash. Keep the installed descriptor identical to the boot-tested source. The tegu package test passes in the Linux build environment. --- packages/omamobile-device-tegu/device.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf index d177027eb..818dcb258 100644 --- a/packages/omamobile-device-tegu/device.conf +++ b/packages/omamobile-device-tegu/device.conf @@ -32,5 +32,7 @@ UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" INITRAMFS_INIT=/initramfs/init PANEL_SIZE=1080x2424 -# No BRINGUP_PROBE or SIMPLEFB_TRIG_CON: those gs201 display accesses do -# not apply here. The prototype's G4 trigger handling needs its own change. +# DECON0's command-mode trigger is masked by ABL after the splash. Live tegu +# registers read 0x3070; clearing the mask and enabling the trigger produced +# the Omarchy desktop through the 1080x2424 simple framebuffer. +SIMPLEFB_TRIG_CON="0x19470030 0x3061" From a05e801eef141c5262dae7701c10d4abba6af7e0 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:45:09 +1300 Subject: [PATCH 11/21] device-tegu 0.1.1: start touch after ACPM is ready The S3908 child waits for S2MPG14 regulators. Keep ACPM and PMIC modules from autoloading during early boot, then load them through a tegu timer after the USB rescue path is available. Fail the service if touch input does not appear. On the Pixel 9a, a native B cold boot reached systemd before the timer, then registered Synaptics TouchComm input at 35 seconds without manual commands. The package staging test passed on Linux and the phone stayed responsive over USB. --- packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/README.md | 10 +++++--- .../bin/omamobile-tegu-touch-start | 23 +++++++++++++++++++ packages/omamobile-device-tegu/install | 4 ++++ packages/omamobile-device-tegu/test/all | 7 +++++- .../modprobe.d/10-omamobile-tegu-touch.conf | 5 ++++ .../system/omamobile-tegu-touch-start.service | 8 +++++++ .../system/omamobile-tegu-touch-start.timer | 11 +++++++++ 8 files changed, 65 insertions(+), 5 deletions(-) create mode 100755 packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start create mode 100644 packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf create mode 100644 packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service create mode 100644 packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.timer diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index 393fcd883..874809bbc 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Omarchy Mobile first-light support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" license=(MIT) -depends=(bash systemd omamobile-keyring) +depends=(bash coreutils grep kmod systemd omamobile-keyring) provides=(omamobile-device) conflicts=(omamobile-device) backup=(etc/pacman.d/omamobile-mirrorlist) diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index d84ee4b29..0eef32365 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -5,6 +5,10 @@ USB gadget network address, and a bounded reboot watchdog. The package also provides the generic `reboot-to` command and the device descriptor. Installing the package does not mark slot B successful or start Wi-Fi, -charging, audio, sensors, cameras, or other peripherals. A reviewed board -DTB, qualified image selector and AVB values, and USB/UFS boot evidence are -still required before a device load. +charging, audio, sensors, cameras, or other peripherals. When the tegu +touchscreen DT child is enabled, a timer starts ACPM and the S2MPG14 PMIC +after early boot and checks that touch input registered. The package keeps +these modules from loading before the USB rescue path is available. + +A reviewed board DTB, qualified image selector and AVB values, and USB/UFS +boot evidence are still required before a device load. diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start new file mode 100755 index 000000000..75dd5c16c --- /dev/null +++ b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start @@ -0,0 +1,23 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +set -euo pipefail + +base=/sys/firmware/devicetree/base +touch_node=$base/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0 + +[[ -f $touch_node/status ]] || exit 0 +[[ $(tr -d '\0' < "$touch_node/status") == okay ]] || exit 0 +[[ $(tr -d '\0' < "$base/compatible") == *google,zumapro-tegu* ]] || exit 0 + +modprobe acpm_protocol +modprobe sec_acpm + +for ((i = 0; i < 20; i++)); do + if grep -F 'Name="Synaptics TouchComm Touchscreen"' /proc/bus/input/devices >/dev/null; then + exit 0 + fi + sleep 0.5 +done + +echo 'tegu touchscreen did not bind after ACPM and S2MPG14 started' >&2 +exit 1 diff --git a/packages/omamobile-device-tegu/install b/packages/omamobile-device-tegu/install index 3c4ebf517..da575d3e2 100755 --- a/packages/omamobile-device-tegu/install +++ b/packages/omamobile-device-tegu/install @@ -10,12 +10,16 @@ build=${2:-build} install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" install -Dm755 bin/omamobile-tegu-clock-floor "$destination/usr/lib/omamobile/tegu-clock-floor" +install -Dm755 bin/omamobile-tegu-touch-start "$destination/usr/lib/omamobile/tegu-touch-start" while IFS= read -r -d '' file; do install -Dm644 "$file" "$destination/usr/lib/${file#vendor/}" done < <(find vendor -type f -print0) install -d "$destination/usr/lib/systemd/system/multi-user.target.wants" ln -sfn ../omamobile-tegu-clock-floor.service \ "$destination/usr/lib/systemd/system/multi-user.target.wants/omamobile-tegu-clock-floor.service" +install -d "$destination/usr/lib/systemd/system/timers.target.wants" +ln -sfn ../omamobile-tegu-touch-start.timer \ + "$destination/usr/lib/systemd/system/timers.target.wants/omamobile-tegu-touch-start.timer" install -Dm644 device.conf "$destination/usr/share/omamobile/device.conf" install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist" install -Dm644 LICENSE "$destination/usr/share/licenses/omamobile-device-tegu/LICENSE" diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all index a5588b40a..720df0022 100755 --- a/packages/omamobile-device-tegu/test/all +++ b/packages/omamobile-device-tegu/test/all @@ -12,6 +12,10 @@ cmp -s device.conf ../../device/tegu/device.conf for file in \ usr/bin/reboot-to \ + usr/lib/omamobile/tegu-touch-start \ + usr/lib/modprobe.d/10-omamobile-tegu-touch.conf \ + usr/lib/systemd/system/omamobile-tegu-touch-start.service \ + usr/lib/systemd/system/omamobile-tegu-touch-start.timer \ usr/lib/udev/rules.d/10-omamobile-storage.rules \ usr/lib/systemd/network/20-usb-gadget.network \ usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \ @@ -23,6 +27,7 @@ for file in \ done grep -q 'KERNEL=="sda", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" +test "$(readlink "$tmp/root/usr/lib/systemd/system/timers.target.wants/omamobile-tegu-touch-start.timer")" = ../omamobile-tegu-touch-start.timer for absent in \ usr/bin/omamobile-boot-success \ usr/bin/omamobile-bootctl \ @@ -31,4 +36,4 @@ for absent in \ usr/bin/omamobile-camera-start; do test ! -e "$tmp/root/$absent" done -echo 'ok - tegu package stages first-light policy only' +echo 'ok - tegu package stages boot policy and guarded touch startup' diff --git a/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf new file mode 100644 index 000000000..dde13b14a --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# The touchscreen supplies are started after userspace is up. +blacklist acpm_protocol +blacklist sec_acpm +blacklist s2mps11 diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service new file mode 100644 index 000000000..9b66aa74e --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: MIT +[Unit] +Description=Start Pixel 9a touchscreen power and input +ConditionPathExists=/sys/firmware/devicetree/base/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0 + +[Service] +Type=oneshot +ExecStart=/usr/lib/omamobile/tegu-touch-start diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.timer b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.timer new file mode 100644 index 000000000..abb45e9fd --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.timer @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT +[Unit] +Description=Start Pixel 9a touchscreen after early boot + +[Timer] +OnBootSec=35s +AccuracySec=1s +Unit=omamobile-tegu-touch-start.service + +[Install] +WantedBy=timers.target From d241f244a499d3093dde970785c352bc13574bbb Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:53:29 +1300 Subject: [PATCH 12/21] device-tegu 0.1.1: pack the qualified native boot recipe Select both observed tegu IPOP revisions, apply the staged watchdog, USB, UFS and touch overlays, and use the October Android 17 partition sizes and AVB metadata. Keep package descriptor synchronized with the image builder. The public recipe rebuilt all five images and the overlaid DTB byte-for-byte from the working touch-child bundle with the same frozen kernel and initramfs. The device cold booted Omarchy and registered S3908 touch after the delayed ACPM start; physical taps and swipes were confirmed. The public tegu kernel and signed root image remain separate release dependencies. --- device/tegu/device.conf | 22 ++++++++++++---------- device/tegu/overlays/tegu-touch.dtso | 15 +++++++++++++++ device/tegu/overlays/tegu-ufs.dtso | 13 +++++++++++++ device/tegu/overlays/tegu-usb.dtso | 11 +++++++++++ device/tegu/overlays/tegu-watchdogs.dtso | 10 ++++++++++ packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/README.md | 12 +++++++----- packages/omamobile-device-tegu/device.conf | 22 ++++++++++++---------- packages/omamobile-device-tegu/install | 2 +- 9 files changed, 82 insertions(+), 27 deletions(-) create mode 100644 device/tegu/overlays/tegu-touch.dtso create mode 100644 device/tegu/overlays/tegu-ufs.dtso create mode 100644 device/tegu/overlays/tegu-usb.dtso create mode 100644 device/tegu/overlays/tegu-watchdogs.dtso diff --git a/device/tegu/device.conf b/device/tegu/device.conf index 818dcb258..123c5c53e 100644 --- a/device/tegu/device.conf +++ b/device/tegu/device.conf @@ -1,6 +1,5 @@ # SPDX-License-Identifier: MIT -# Pixel 9a first-light descriptor. See NOTES.md. -# Data only: this is a staged port, not an installable release. +# Pixel 9a (tegu) boot descriptor. See NOTES.md. CODENAME=tegu NAME="Pixel 9a" USB_PRODUCT="Pixel 9a (M1)" @@ -9,13 +8,16 @@ COMPATIBLE="google,zumapro-tegu" PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb -# Deliberately no SOC_IDS: this loader uses /soc_compatible matching. -# Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 -# (NOTES.md). The shared selector landed in #27; this device stays gated. -# SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" -# Keep both selector keys unset. Activate only with the public DTB and -# qualified AVB footer values in a later PR. -# Do not use a dummy soc_id or borrow gs201's values to bypass the check. +# ABL chooses the tegu DTB from the two stock IPOP silicon revisions. +SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" + +# Keep unqualified peripherals disabled in the base DTB. +DTB_OVERLAYS="tegu-watchdogs tegu-usb tegu-ufs tegu-touch" + +# Stock CP3A.261005.005 partition sizes and October 2026 AVB metadata. +AVB_FOOTERS="boot:67108864 init_boot:8388608 vendor_boot:67108864 vendor_kernel_boot:67108864 dtbo:16777216" +AVB_ROLLBACK_INDEX=1791158400 +AVB_SECURITY_PATCH=2026-10-05 DTBO_SOURCE=tegu-m1-overlay.dts DTBO_BOARD_ID=0x60b06 @@ -23,7 +25,7 @@ DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 # Official CP3A.261005.005 Android 17 init_boot header, checked against the -# currently booted stock A build. The descriptor remains disabled for packing. +# currently booted stock A build. OS_VERSION=17.0.0 OS_PATCH_LEVEL=2026-10 BOOT_METHOD=android-v4 diff --git a/device/tegu/overlays/tegu-touch.dtso b/device/tegu/overlays/tegu-touch.dtso new file mode 100644 index 000000000..d1d8f8cf7 --- /dev/null +++ b/device/tegu/overlays/tegu-touch.dtso @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +/dts-v1/; +/plugin/; + +/* The device package starts ACPM and S2MPG14 after early boot. */ +&ap2apm_mailbox { status = "okay"; }; +&apm_sram { status = "okay"; }; +&acpm_ipc { status = "okay"; }; +&{/firmware/power-management/pmic-1} { status = "okay"; }; + +&pinctrl_custom { status = "okay"; }; +&sysreg_hsi0 { status = "okay"; }; +&usi20 { status = "okay"; }; +&spi20 { status = "okay"; }; +&{/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0} { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-ufs.dtso b/device/tegu/overlays/tegu-ufs.dtso new file mode 100644 index 000000000..85525ab9e --- /dev/null +++ b/device/tegu/overlays/tegu-ufs.dtso @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +/dts-v1/; +/plugin/; + +/* Enable guarded UFS access to the Arch root on userdata. */ +&cmu_peric0 { status = "okay"; }; +&pinctrl_peric0 { status = "okay"; }; +&cmu_hsi2 { status = "okay"; }; +&pinctrl_hsi2ufs { status = "okay"; }; +&sysreg_hsi2 { status = "okay"; }; +&ufs_vcc { status = "okay"; }; +&ufs_phy { status = "okay"; }; +&ufs { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-usb.dtso b/device/tegu/overlays/tegu-usb.dtso new file mode 100644 index 000000000..a4e8f671f --- /dev/null +++ b/device/tegu/overlays/tegu-usb.dtso @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +/dts-v1/; +/plugin/; + +/* The boot USB gadget is the recovery and rootfs link. */ +&usb_firmware_supply { status = "okay"; }; +&cmu_hsi0 { status = "okay"; }; +&usb_hsphy { status = "okay"; }; +&usb32drd { status = "okay"; }; +&usb { status = "okay"; }; +&usb_dwc3 { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-watchdogs.dtso b/device/tegu/overlays/tegu-watchdogs.dtso new file mode 100644 index 000000000..38a09d93a --- /dev/null +++ b/device/tegu/overlays/tegu-watchdogs.dtso @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +/dts-v1/; +/plugin/; + +/* Take over both cluster watchdogs left running by ABL. */ +&cmu_top { status = "okay"; }; +&cmu_misc { status = "okay"; }; +&pmu_system_controller { status = "okay"; }; +&watchdog_cl0 { status = "okay"; }; +&watchdog_cl1 { status = "okay"; }; diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index 874809bbc..57307bf9d 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omamobile-device-tegu pkgver=$(cat "${startdir:-.}/version") pkgrel=1 -pkgdesc="Omarchy Mobile first-light support for the Google Pixel 9a (tegu)" +pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" license=(MIT) diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index 0eef32365..f0e30c6f4 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -1,8 +1,8 @@ # Pixel 9a device package -First-light userspace policy for `tegu`: guarded storage visibility, the -USB gadget network address, and a bounded reboot watchdog. The package -also provides the generic `reboot-to` command and the device descriptor. +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. Installing the package does not mark slot B successful or start Wi-Fi, charging, audio, sensors, cameras, or other peripherals. When the tegu @@ -10,5 +10,7 @@ touchscreen DT child is enabled, a timer starts ACPM and the S2MPG14 PMIC after early boot and checks that touch input registered. The package keeps these modules from loading before the USB rescue path is available. -A reviewed board DTB, qualified image selector and AVB values, and USB/UFS -boot evidence are still required before a device load. +The descriptor selects both tested tegu silicon revisions and packs the +qualified boot overlays with the stock partition sizes and AVB metadata. +The board DTB and required kernel drivers must come from a matching tegu +kernel build. A release also needs a root image containing this package. diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf index 818dcb258..123c5c53e 100644 --- a/packages/omamobile-device-tegu/device.conf +++ b/packages/omamobile-device-tegu/device.conf @@ -1,6 +1,5 @@ # SPDX-License-Identifier: MIT -# Pixel 9a first-light descriptor. See NOTES.md. -# Data only: this is a staged port, not an installable release. +# Pixel 9a (tegu) boot descriptor. See NOTES.md. CODENAME=tegu NAME="Pixel 9a" USB_PRODUCT="Pixel 9a (M1)" @@ -9,13 +8,16 @@ COMPATIBLE="google,zumapro-tegu" PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb -# Deliberately no SOC_IDS: this loader uses /soc_compatible matching. -# Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 -# (NOTES.md). The shared selector landed in #27; this device stays gated. -# SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" -# Keep both selector keys unset. Activate only with the public DTB and -# qualified AVB footer values in a later PR. -# Do not use a dummy soc_id or borrow gs201's values to bypass the check. +# ABL chooses the tegu DTB from the two stock IPOP silicon revisions. +SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" + +# Keep unqualified peripherals disabled in the base DTB. +DTB_OVERLAYS="tegu-watchdogs tegu-usb tegu-ufs tegu-touch" + +# Stock CP3A.261005.005 partition sizes and October 2026 AVB metadata. +AVB_FOOTERS="boot:67108864 init_boot:8388608 vendor_boot:67108864 vendor_kernel_boot:67108864 dtbo:16777216" +AVB_ROLLBACK_INDEX=1791158400 +AVB_SECURITY_PATCH=2026-10-05 DTBO_SOURCE=tegu-m1-overlay.dts DTBO_BOARD_ID=0x60b06 @@ -23,7 +25,7 @@ DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 # Official CP3A.261005.005 Android 17 init_boot header, checked against the -# currently booted stock A build. The descriptor remains disabled for packing. +# currently booted stock A build. OS_VERSION=17.0.0 OS_PATCH_LEVEL=2026-10 BOOT_METHOD=android-v4 diff --git a/packages/omamobile-device-tegu/install b/packages/omamobile-device-tegu/install index da575d3e2..c1948a18e 100755 --- a/packages/omamobile-device-tegu/install +++ b/packages/omamobile-device-tegu/install @@ -1,6 +1,6 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Stage only the first-light policy; boot-success and peripheral services +# Install tested boot and touch policy; boot-success and other peripherals # require separate device qualification. set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")" From 7552fd0ada7c1d45e50600bedaed948a0092be26 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Tue, 27 Oct 2026 22:06:47 +1300 Subject: [PATCH 13/21] device-tegu: state the current release gate The boot recipe and device package now reach native Omarchy with working touch on slot B. Keep the first-light summary aligned with the qualified source while naming the public kernel, signed root image and clean install still needed for a release. --- device/tegu/NOTES.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 31ad87f8e..04bdadf92 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -1,10 +1,10 @@ # Pixel 9a (tegu): first light -2026-10-22: verified on one retail Pixel 9a, Tensor G4 (`zumapro`). -This is an experimental integration, not a supported release or installer -qualification. Kernel, image-tool and package changes need separate PRs. -The descriptor here intentionally fails closed with current public tools. +Verified on one retail Pixel 9a, Tensor G4 (`zumapro`). The tegu boot recipe +and device package boot native Omarchy with working touch on slot B. This is +still an experimental integration: a public matching kernel, signed root +image, and clean installer test are required for an installable release. Tested kernel: `7.3.0-rc6-omamobile-tegu-tn3-g1cb4bd36f3be-dirty`, private branch `omamobile-tegu-touch-power`, worktree/output `wt-touch-power` / From 0d565e43bd596298fe7085d590f63acae5a5434b Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 08:59:57 +1300 Subject: [PATCH 14/21] device-tegu 0.1.1: load the mailbox before touch power The current mainline kernel builds exynos_mailbox as a module. Starting ACPM before it leaves all 16 channels unusable, so S2MPG14 cannot supply the Synaptics controller. Load the mailbox before ACPM and keep the startup scoped to tegu. The new B kernel booted Omarchy and registered touch after loading the mailbox first. The tegu package staging test passes on Linux; pkgrel 2 upgrades the on-device package. Use coreutils for the descriptor test so a minimal build root does not need cmp. --- packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start | 3 +++ packages/omamobile-device-tegu/test/all | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index 57307bf9d..c86c7593c 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT pkgname=omamobile-device-tegu pkgver=$(cat "${startdir:-.}/version") -pkgrel=1 +pkgrel=2 pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start index 75dd5c16c..d88d639aa 100755 --- a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start +++ b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start @@ -9,6 +9,9 @@ touch_node=$base/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0 [[ $(tr -d '\0' < "$touch_node/status") == okay ]] || exit 0 [[ $(tr -d '\0' < "$base/compatible") == *google,zumapro-tegu* ]] || exit 0 +# On current mainline kernels the Exynos mailbox is modular. ACPM can probe +# without it, but then all channels are skipped and the PMIC cannot power touch. +modprobe exynos_mailbox modprobe acpm_protocol modprobe sec_acpm diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all index 720df0022..5860ea980 100755 --- a/packages/omamobile-device-tegu/test/all +++ b/packages/omamobile-device-tegu/test/all @@ -6,7 +6,8 @@ tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT bash -n build install omamobile-device-tegu.install -cmp -s device.conf ../../device/tegu/device.conf +test "$(sha256sum device.conf | cut -d' ' -f1)" = \ + "$(sha256sum ../../device/tegu/device.conf | cut -d' ' -f1)" ./build "$tmp/build" ./install "$tmp/root" "$tmp/build" From 9a6f434008742f3769279e3a7043aa2e6f4d0d8a Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 10:37:04 +1300 Subject: [PATCH 15/21] device-tegu 0.1.1: address boot policy review Restore the shared descriptor to the oldest owner firmware values and leave image selection gated. Remove prototype-only overlays in favor of the public board and touch series. Preserve the first owner notes and append the second phone results with their limits. Persist a touch-start marker before loading drivers, retain it on failure, and require an explicit retry after an incomplete start. Handle the public and prototype DT paths, remove the ineffective regulator blacklist, and move the clock floor to a separate firstboot change. Linux tests/all passes with environment-dependent skips. Image layout and overlay checks also pass with the AOSP and kernel build tools. Mocked package tests cover module order, marker persistence, retry, timeout and disabled nodes. Hardware smoke evidence predates this review change and is recorded separately. Co-Authored-By: Codex --- device/tegu/NOTES.md | 56 ++++++++++++- device/tegu/device.conf | 33 ++++---- device/tegu/overlays/tegu-touch.dtso | 15 ---- device/tegu/overlays/tegu-ufs.dtso | 13 --- device/tegu/overlays/tegu-usb.dtso | 11 --- device/tegu/overlays/tegu-watchdogs.dtso | 10 --- packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/README.md | 24 ++++-- .../bin/omamobile-tegu-clock-floor | 14 ---- .../bin/omamobile-tegu-touch-start | 53 ++++++++++-- packages/omamobile-device-tegu/device.conf | 33 ++++---- packages/omamobile-device-tegu/install | 4 - packages/omamobile-device-tegu/test/all | 5 +- .../omamobile-device-tegu/test/touch-start | 80 +++++++++++++++++++ .../modprobe.d/10-omamobile-tegu-touch.conf | 1 - .../system/omamobile-tegu-clock-floor.service | 9 --- .../system/omamobile-tegu-touch-start.service | 2 +- 17 files changed, 232 insertions(+), 133 deletions(-) delete mode 100644 device/tegu/overlays/tegu-touch.dtso delete mode 100644 device/tegu/overlays/tegu-ufs.dtso delete mode 100644 device/tegu/overlays/tegu-usb.dtso delete mode 100644 device/tegu/overlays/tegu-watchdogs.dtso delete mode 100644 packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor create mode 100755 packages/omamobile-device-tegu/test/touch-start delete mode 100644 packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 04bdadf92..d021bb4e5 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -1,10 +1,10 @@ # Pixel 9a (tegu): first light -Verified on one retail Pixel 9a, Tensor G4 (`zumapro`). The tegu boot recipe -and device package boot native Omarchy with working touch on slot B. This is -still an experimental integration: a public matching kernel, signed root -image, and clean installer test are required for an installable release. +2026-10-22: verified on one retail Pixel 9a, Tensor G4 (`zumapro`). +This is an experimental integration, not a supported release or installer +qualification. Kernel, image-tool and package changes need separate PRs. +The descriptor here intentionally fails closed with current public tools. Tested kernel: `7.3.0-rc6-omamobile-tegu-tn3-g1cb4bd36f3be-dirty`, private branch `omamobile-tegu-touch-power`, worktree/output `wt-touch-power` / @@ -512,3 +512,51 @@ 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. diff --git a/device/tegu/device.conf b/device/tegu/device.conf index 123c5c53e..80bc14ffc 100644 --- a/device/tegu/device.conf +++ b/device/tegu/device.conf @@ -1,5 +1,6 @@ # SPDX-License-Identifier: MIT -# Pixel 9a (tegu) boot descriptor. See NOTES.md. +# Pixel 9a first-light descriptor. See NOTES.md. +# Data only: this is a staged port, not an installable release. CODENAME=tegu NAME="Pixel 9a" USB_PRODUCT="Pixel 9a (M1)" @@ -8,33 +9,27 @@ COMPATIBLE="google,zumapro-tegu" PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb -# ABL chooses the tegu DTB from the two stock IPOP silicon revisions. -SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" - -# Keep unqualified peripherals disabled in the base DTB. -DTB_OVERLAYS="tegu-watchdogs tegu-usb tegu-ufs tegu-touch" - -# Stock CP3A.261005.005 partition sizes and October 2026 AVB metadata. -AVB_FOOTERS="boot:67108864 init_boot:8388608 vendor_boot:67108864 vendor_kernel_boot:67108864 dtbo:16777216" -AVB_ROLLBACK_INDEX=1791158400 -AVB_SECURITY_PATCH=2026-10-05 +# Deliberately no SOC_IDS: this loader uses /soc_compatible matching. +# Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 +# (NOTES.md). Shared support is reviewed separately in #27. +# SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" +# Keep both selector keys unset: #27 accepts either one. Activate only +# with the public DTB and required AVB footer values in a later PR. +# Do not use a dummy soc_id or borrow gs201's values to bypass the check. DTBO_SOURCE=tegu-m1-overlay.dts DTBO_BOARD_ID=0x60b06 DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 -# Official CP3A.261005.005 Android 17 init_boot header, checked against the -# currently booted stock A build. -OS_VERSION=17.0.0 -OS_PATCH_LEVEL=2026-10 +# Official BP3A init_boot header; both OTA/AVB and stock-A checks: NOTES.md. +OS_VERSION=16.0.0 +OS_PATCH_LEVEL=2025-09 BOOT_METHOD=android-v4 BOOT_IMAGES="boot init_boot vendor_boot vendor_kernel_boot dtbo" UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" INITRAMFS_INIT=/initramfs/init PANEL_SIZE=1080x2424 -# DECON0's command-mode trigger is masked by ABL after the splash. Live tegu -# registers read 0x3070; clearing the mask and enabling the trigger produced -# the Omarchy desktop through the 1080x2424 simple framebuffer. -SIMPLEFB_TRIG_CON="0x19470030 0x3061" +# No BRINGUP_PROBE or SIMPLEFB_TRIG_CON: those gs201 display accesses do +# not apply here. The prototype's G4 trigger handling needs its own change. diff --git a/device/tegu/overlays/tegu-touch.dtso b/device/tegu/overlays/tegu-touch.dtso deleted file mode 100644 index d1d8f8cf7..000000000 --- a/device/tegu/overlays/tegu-touch.dtso +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT -/dts-v1/; -/plugin/; - -/* The device package starts ACPM and S2MPG14 after early boot. */ -&ap2apm_mailbox { status = "okay"; }; -&apm_sram { status = "okay"; }; -&acpm_ipc { status = "okay"; }; -&{/firmware/power-management/pmic-1} { status = "okay"; }; - -&pinctrl_custom { status = "okay"; }; -&sysreg_hsi0 { status = "okay"; }; -&usi20 { status = "okay"; }; -&spi20 { status = "okay"; }; -&{/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0} { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-ufs.dtso b/device/tegu/overlays/tegu-ufs.dtso deleted file mode 100644 index 85525ab9e..000000000 --- a/device/tegu/overlays/tegu-ufs.dtso +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -/dts-v1/; -/plugin/; - -/* Enable guarded UFS access to the Arch root on userdata. */ -&cmu_peric0 { status = "okay"; }; -&pinctrl_peric0 { status = "okay"; }; -&cmu_hsi2 { status = "okay"; }; -&pinctrl_hsi2ufs { status = "okay"; }; -&sysreg_hsi2 { status = "okay"; }; -&ufs_vcc { status = "okay"; }; -&ufs_phy { status = "okay"; }; -&ufs { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-usb.dtso b/device/tegu/overlays/tegu-usb.dtso deleted file mode 100644 index a4e8f671f..000000000 --- a/device/tegu/overlays/tegu-usb.dtso +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT -/dts-v1/; -/plugin/; - -/* The boot USB gadget is the recovery and rootfs link. */ -&usb_firmware_supply { status = "okay"; }; -&cmu_hsi0 { status = "okay"; }; -&usb_hsphy { status = "okay"; }; -&usb32drd { status = "okay"; }; -&usb { status = "okay"; }; -&usb_dwc3 { status = "okay"; }; diff --git a/device/tegu/overlays/tegu-watchdogs.dtso b/device/tegu/overlays/tegu-watchdogs.dtso deleted file mode 100644 index 38a09d93a..000000000 --- a/device/tegu/overlays/tegu-watchdogs.dtso +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -/dts-v1/; -/plugin/; - -/* Take over both cluster watchdogs left running by ABL. */ -&cmu_top { status = "okay"; }; -&cmu_misc { status = "okay"; }; -&pmu_system_controller { status = "okay"; }; -&watchdog_cl0 { status = "okay"; }; -&watchdog_cl1 { status = "okay"; }; diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index c86c7593c..9f06f95dd 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT pkgname=omamobile-device-tegu pkgver=$(cat "${startdir:-.}/version") -pkgrel=2 +pkgrel=3 pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index f0e30c6f4..5883442bc 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -1,3 +1,4 @@ + # Pixel 9a device package Boot and touch userspace policy for `tegu`: guarded storage visibility, the @@ -7,10 +8,21 @@ startup. The package also provides `reboot-to` and the device descriptor. 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 starts ACPM and the S2MPG14 PMIC -after early boot and checks that touch input registered. The package keeps -these modules from loading before the USB rescue path is available. +after early boot and checks that touch input registered. Before loading the +mailbox, ACPM and PMIC 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 delay allows userspace to start; this package does not provide USB rescue. -The descriptor selects both tested tegu silicon revisions and packs the -qualified boot overlays with the stock partition sizes and AVB metadata. -The board DTB and required kernel drivers must come from a matching tegu -kernel build. A release also needs a root image containing this package. +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. This is not yet an installable release. diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor b/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor deleted file mode 100644 index 9ee6a36e2..000000000 --- a/packages/omamobile-device-tegu/bin/omamobile-tegu-clock-floor +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: MIT -# The tegu first-light kernel has no usable wall clock before network time. -# Pacman rejects keyring keys created after that clock. The keyring file is -# already part of the installed, verified root image and gives a safe floor. -set -euo pipefail - -keyring=/usr/share/pacman/keyrings/omamobile.gpg -floor=$(stat -c %Y "$keyring") -now=$(date -u +%s) -[[ $floor =~ ^[0-9]+$ && $now =~ ^[0-9]+$ ]] -if ((now < floor)); then - date -u -s "@$floor" >/dev/null -fi diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start index d88d639aa..5b9005ca7 100755 --- a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start +++ b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start @@ -2,13 +2,54 @@ # SPDX-License-Identifier: MIT set -euo pipefail -base=/sys/firmware/devicetree/base -touch_node=$base/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0 +# Tests use a scratch root with fake commands, as omamobile-firstboot does. +root=${OMAMOBILE_TEGU_ROOT:-} +if [[ -n $root ]]; then + [[ $root == /* && $root != / && -d $root ]] || exit 2 +fi +base=$root/sys/firmware/devicetree/base +state=$root/var/lib/omamobile +marker=$state/tegu-touch-started -[[ -f $touch_node/status ]] || exit 0 -[[ $(tr -d '\0' < "$touch_node/status") == okay ]] || exit 0 +case ${1:-} in + ''|--retry) ;; + *) echo 'usage: tegu-touch-start [--retry]' >&2; exit 2 ;; +esac +[[ -f $base/compatible ]] || exit 0 [[ $(tr -d '\0' < "$base/compatible") == *google,zumapro-tegu* ]] || exit 0 +# Public kernel PR #81 uses /soc; the first-light prototype used /soc@0. +touch_node= +for node in "$base"/soc{,@0}/usi@111d00c0/spi@111d0000/touchscreen@0; do + [[ -d $node ]] && { touch_node=$node; break; } +done +[[ -n $touch_node ]] || exit 0 +# Missing status means enabled in DT. Respect disabled parents as well. +node=$touch_node +while [[ $node != "$base" ]]; do + if [[ -f $node/status ]]; then + case $(tr -d '\0' < "$node/status") in + okay|ok) ;; + *) exit 0 ;; + esac + fi + node=${node%/*} +done + +[[ ${1:-} == --retry ]] && rm -f "$marker" +if [[ -e $marker ]]; then + echo 'tegu touch: previous start did not finish; leaving touch power alone' + echo 'inspect the previous boot log, then run /usr/lib/omamobile/tegu-touch-start --retry' + exit 0 +fi + +# Persist before loading any driver. Keep the marker on failures and hangs +# so the next boot cannot repeat the same hardware operation automatically. +umask 077 +mkdir -p "$state" +date -Is > "$marker" +sync -f "$marker" 2>/dev/null || sync + # On current mainline kernels the Exynos mailbox is modular. ACPM can probe # without it, but then all channels are skipped and the PMIC cannot power touch. modprobe exynos_mailbox @@ -16,7 +57,9 @@ modprobe acpm_protocol modprobe sec_acpm for ((i = 0; i < 20; i++)); do - if grep -F 'Name="Synaptics TouchComm Touchscreen"' /proc/bus/input/devices >/dev/null; then + if grep -F 'Name="Synaptics TouchComm Touchscreen"' "$root/proc/bus/input/devices" >/dev/null; then + rm -f "$marker" + sync -f "$state" 2>/dev/null || sync exit 0 fi sleep 0.5 diff --git a/packages/omamobile-device-tegu/device.conf b/packages/omamobile-device-tegu/device.conf index 123c5c53e..80bc14ffc 100644 --- a/packages/omamobile-device-tegu/device.conf +++ b/packages/omamobile-device-tegu/device.conf @@ -1,5 +1,6 @@ # SPDX-License-Identifier: MIT -# Pixel 9a (tegu) boot descriptor. See NOTES.md. +# Pixel 9a first-light descriptor. See NOTES.md. +# Data only: this is a staged port, not an installable release. CODENAME=tegu NAME="Pixel 9a" USB_PRODUCT="Pixel 9a (M1)" @@ -8,33 +9,27 @@ COMPATIBLE="google,zumapro-tegu" PACKAGE=omamobile-device-tegu DTB=exynos/google/zumapro-tegu.dtb -# ABL chooses the tegu DTB from the two stock IPOP silicon revisions. -SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" - -# Keep unqualified peripherals disabled in the base DTB. -DTB_OVERLAYS="tegu-watchdogs tegu-usb tegu-ufs tegu-touch" - -# Stock CP3A.261005.005 partition sizes and October 2026 AVB metadata. -AVB_FOOTERS="boot:67108864 init_boot:8388608 vendor_boot:67108864 vendor_kernel_boot:67108864 dtbo:16777216" -AVB_ROLLBACK_INDEX=1791158400 -AVB_SECURITY_PATCH=2026-10-05 +# Deliberately no SOC_IDS: this loader uses /soc_compatible matching. +# Stock IPOP candidates: product_id 0x9875, major 0, minor 0/1, pkg_mode 1 +# (NOTES.md). Shared support is reviewed separately in #27. +# SOC_COMPATIBLE="a0-ipop:0x9875:0:0:1 a1-ipop:0x9875:0:1:1" +# Keep both selector keys unset: #27 accepts either one. Activate only +# with the public DTB and required AVB footer values in a later PR. +# Do not use a dummy soc_id or borrow gs201's values to bypass the check. DTBO_SOURCE=tegu-m1-overlay.dts DTBO_BOARD_ID=0x60b06 DTBO_BOARD_REV=0x10000 VENDOR_CMDLINE="console=tty0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig" VENDOR_PAGESIZE=0x800 -# Official CP3A.261005.005 Android 17 init_boot header, checked against the -# currently booted stock A build. -OS_VERSION=17.0.0 -OS_PATCH_LEVEL=2026-10 +# Official BP3A init_boot header; both OTA/AVB and stock-A checks: NOTES.md. +OS_VERSION=16.0.0 +OS_PATCH_LEVEL=2025-09 BOOT_METHOD=android-v4 BOOT_IMAGES="boot init_boot vendor_boot vendor_kernel_boot dtbo" UFS_RW="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" INITRAMFS_INIT=/initramfs/init PANEL_SIZE=1080x2424 -# DECON0's command-mode trigger is masked by ABL after the splash. Live tegu -# registers read 0x3070; clearing the mask and enabling the trigger produced -# the Omarchy desktop through the 1080x2424 simple framebuffer. -SIMPLEFB_TRIG_CON="0x19470030 0x3061" +# No BRINGUP_PROBE or SIMPLEFB_TRIG_CON: those gs201 display accesses do +# not apply here. The prototype's G4 trigger handling needs its own change. diff --git a/packages/omamobile-device-tegu/install b/packages/omamobile-device-tegu/install index c1948a18e..6958f3521 100755 --- a/packages/omamobile-device-tegu/install +++ b/packages/omamobile-device-tegu/install @@ -9,14 +9,10 @@ build=${2:-build} [[ $destination == /* && $destination != "/" ]] || { echo "Use an absolute staging directory" >&2; exit 1; } install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" -install -Dm755 bin/omamobile-tegu-clock-floor "$destination/usr/lib/omamobile/tegu-clock-floor" install -Dm755 bin/omamobile-tegu-touch-start "$destination/usr/lib/omamobile/tegu-touch-start" while IFS= read -r -d '' file; do install -Dm644 "$file" "$destination/usr/lib/${file#vendor/}" done < <(find vendor -type f -print0) -install -d "$destination/usr/lib/systemd/system/multi-user.target.wants" -ln -sfn ../omamobile-tegu-clock-floor.service \ - "$destination/usr/lib/systemd/system/multi-user.target.wants/omamobile-tegu-clock-floor.service" install -d "$destination/usr/lib/systemd/system/timers.target.wants" ln -sfn ../omamobile-tegu-touch-start.timer \ "$destination/usr/lib/systemd/system/timers.target.wants/omamobile-tegu-touch-start.timer" diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all index 5860ea980..dd232d594 100755 --- a/packages/omamobile-device-tegu/test/all +++ b/packages/omamobile-device-tegu/test/all @@ -5,7 +5,7 @@ cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT -bash -n build install omamobile-device-tegu.install +bash -n build install omamobile-device-tegu.install bin/omamobile-tegu-touch-start test "$(sha256sum device.conf | cut -d' ' -f1)" = \ "$(sha256sum ../../device/tegu/device.conf | cut -d' ' -f1)" ./build "$tmp/build" @@ -30,6 +30,8 @@ grep -q 'KERNEL=="sda", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobil grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" test "$(readlink "$tmp/root/usr/lib/systemd/system/timers.target.wants/omamobile-tegu-touch-start.timer")" = ../omamobile-tegu-touch-start.timer for absent in \ + usr/lib/omamobile/tegu-clock-floor \ + usr/lib/systemd/system/omamobile-tegu-clock-floor.service \ usr/bin/omamobile-boot-success \ usr/bin/omamobile-bootctl \ usr/lib/systemd/system/omamobile-boot-success.service \ @@ -37,4 +39,5 @@ for absent in \ usr/bin/omamobile-camera-start; do test ! -e "$tmp/root/$absent" done +test/touch-start echo 'ok - tegu package stages boot policy and guarded touch startup' diff --git a/packages/omamobile-device-tegu/test/touch-start b/packages/omamobile-device-tegu/test/touch-start new file mode 100755 index 000000000..e2ed9b122 --- /dev/null +++ b/packages/omamobile-device-tegu/test/touch-start @@ -0,0 +1,80 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Exercise the persistent hang marker without loading hardware drivers. +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." +script=$PWD/bin/omamobile-tegu-touch-start +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT +export OMAMOBILE_TEGU_ROOT=$tmp/root +export TEST_LOG=$tmp/calls +export TEST_MARKER=$OMAMOBILE_TEGU_ROOT/var/lib/omamobile/tegu-touch-started +base=$OMAMOBILE_TEGU_ROOT/sys/firmware/devicetree/base +input=$OMAMOBILE_TEGU_ROOT/proc/bus/input/devices +mkdir -p "$base" "$tmp/bin" "${input%/*}" +export PATH=$tmp/bin:$PATH +cat > "$tmp/bin/modprobe" <<'EOF' +#!/bin/bash +set -euo pipefail +test -s "$TEST_MARKER" +grep -qx synced "$TEST_LOG" +echo "$1" >> "$TEST_LOG" +[[ ${FAIL_MODULE:-} != "$1" ]] +EOF +cat > "$tmp/bin/sync" <<'EOF' +#!/bin/bash +echo synced >> "$TEST_LOG" +EOF +printf '#!/bin/bash\nexit 0\n' > "$tmp/bin/sleep" +chmod +x "$tmp/bin/"* +printf 'google,zumapro-tegu\0' > "$base/compatible" + +# Both the public /soc path (implicit status) and prototype /soc@0 path. +for soc in soc soc@0; do + touch_node=$base/$soc/usi@111d00c0/spi@111d0000/touchscreen@0 + mkdir -p "$touch_node" + [[ $soc != soc@0 ]] || printf 'okay\0' > "$touch_node/status" + printf 'N: Name="Synaptics TouchComm Touchscreen"\n' > "$input" + : > "$TEST_LOG" + "$script" + test ! -e "$TEST_MARKER" + actual=$(grep -v '^synced$' "$TEST_LOG") + test "$actual" = $'exynos_mailbox\nacpm_protocol\nsec_acpm' + rm -r "$base/$soc" +done +echo 'ok - both DT paths start mailbox before ACPM and remove a successful marker' + +mkdir -p "$touch_node" +printf 'disabled\0' > "${touch_node%/*}/status" +: > "$TEST_LOG" +"$script" +test ! -s "$TEST_LOG" +rm "${touch_node%/*}/status" +printf 'google,zuma-husky\0' > "$base/compatible" +"$script" +test ! -s "$TEST_LOG" +printf 'google,zumapro-tegu\0' > "$base/compatible" +echo 'ok - disabled ancestors and other boards do not load drivers' + +if FAIL_MODULE=acpm_protocol "$script"; then + echo 'not ok - driver failure was ignored' >&2; exit 1 +fi +test -s "$TEST_MARKER" +: > "$TEST_LOG" +"$script" > "$tmp/skipped" +test ! -s "$TEST_LOG" +test -s "$TEST_MARKER" +echo 'ok - failure retains the marker and the next start skips all drivers' + +"$script" --retry +test ! -e "$TEST_MARKER" +echo 'ok - explicit retry can recover and clear the marker' + +: > "$input" +: > "$TEST_LOG" +if "$script" 2> "$tmp/timeout"; then + echo 'not ok - missing input was accepted' >&2; exit 1 +fi +test -s "$TEST_MARKER" +grep -q 'did not bind' "$tmp/timeout" +echo 'ok - input timeout also retains the marker' diff --git a/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf index dde13b14a..feb0783f9 100644 --- a/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf +++ b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf @@ -2,4 +2,3 @@ # The touchscreen supplies are started after userspace is up. blacklist acpm_protocol blacklist sec_acpm -blacklist s2mps11 diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service deleted file mode 100644 index 1e5ee33de..000000000 --- a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-clock-floor.service +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: MIT -[Unit] -Description=Seed the tegu clock before offline package key setup -ConditionPathExists=/usr/share/pacman/keyrings/omamobile.gpg -Before=omamobile-firstboot.service - -[Service] -Type=oneshot -ExecStart=/usr/lib/omamobile/tegu-clock-floor diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service index 9b66aa74e..dde2b337f 100644 --- a/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service +++ b/packages/omamobile-device-tegu/vendor/systemd/system/omamobile-tegu-touch-start.service @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT [Unit] Description=Start Pixel 9a touchscreen power and input -ConditionPathExists=/sys/firmware/devicetree/base/soc@0/usi@111d00c0/spi@111d0000/touchscreen@0 +ConditionPathExistsGlob=/sys/firmware/devicetree/base/soc*/usi@111d00c0/spi@111d0000/touchscreen@0 [Service] Type=oneshot From e7f6f96adec30ef2e9f22a213cd37650a51776ae Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 10:36:52 +1300 Subject: [PATCH 16/21] omamobile-firstboot 0.1.3: seed the clock before key setup Phones without an RTC can start before the installed signing keys were created. Use the newest public keyring timestamp in the verified root image as a clock floor before GnuPG creates or imports keys, without moving an accurate clock backwards. The Linux firstboot tests cover an old clock, an accurate clock, absent keyrings, and ordering before pacman-key. Move this shared policy out of the tegu package. Co-Authored-By: Codex --- .../bin/omamobile-firstboot | 14 +++++++++++ packages/omamobile-firstboot/test/all | 23 +++++++++++++++++++ packages/omamobile-firstboot/version | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/omamobile-firstboot/bin/omamobile-firstboot b/packages/omamobile-firstboot/bin/omamobile-firstboot index f951476b1..597bac603 100755 --- a/packages/omamobile-firstboot/bin/omamobile-firstboot +++ b/packages/omamobile-firstboot/bin/omamobile-firstboot @@ -211,6 +211,20 @@ step() { } s_keyring() { + # A phone without a working RTC can boot before its signing keys existed. + # Installed public keyrings are part of the verified root image; use their + # newest mtime as a floor before GnuPG creates or imports keys offline. + # Never move a valid clock backwards, and do nothing without a keyring. + local keyring stamp floor=0 now + for keyring in "$ROOT"/usr/share/pacman/keyrings/*.gpg; do + [[ -f $keyring ]] || continue + stamp=$(stat -c %Y "$keyring") + ((stamp <= floor)) || floor=$stamp + done + now=$(date -u +%s) + if ((now < floor)); then + date -u -s "@$floor" >/dev/null + fi if [[ ! -f $ROOT/etc/pacman.d/gnupg/trustdb.gpg ]]; then pacman-key --init fi diff --git a/packages/omamobile-firstboot/test/all b/packages/omamobile-firstboot/test/all index 429925390..403030cf7 100755 --- a/packages/omamobile-firstboot/test/all +++ b/packages/omamobile-firstboot/test/all @@ -121,6 +121,15 @@ pass "values are data, never executed" # --- a whole run against fakes ------------------------------------------------ F=$t/fakes; mkdir -p "$F"; CALLS=$t/calls; : > "$CALLS" fake() { printf '#!/bin/bash\n%s\n' "$2" > "$F/$1"; chmod +x "$F/$1"; } +export REAL_DATE=$(command -v date) TEST_NOW=1 +fake date 'case "$*" in + "-u +%s") echo "$TEST_NOW" ;; + "-u -s "*) echo "clock-set ${3#@}" >> "$CALLS" ;; + *) "$REAL_DATE" "$@" ;; +esac' +mkdir -p "$R/usr/share/pacman/keyrings" +touch -d @2000000000 "$R/usr/share/pacman/keyrings/archlinuxarm.gpg" +touch -d @2000000060 "$R/usr/share/pacman/keyrings/omamobile.gpg" for cmd in pacman-key systemctl ufw chown hostname nmcli usermod omamobile-setup-system; do fake "$cmd" 'echo "$(basename "$0") $*" >> "$CALLS"' done @@ -146,6 +155,9 @@ run() { OMAMOBILE_FIRSTBOOT_ROOT=$R OMARCHY_PATH=$O OMAMOBILE_LOCK_PAM=$F/lock-p good > "$R/etc/omamobile/firstboot.conf" run || { cat "$t/run.out"; fail "a run with a good conf succeeds"; } +grep -qx 'clock-set 2000000060' "$CALLS" || fail "clock advances to the newest installed keyring" +[[ $(head -1 "$CALLS") == 'clock-set 2000000060' ]] || fail "clock is seeded before pacman-key" +pass "an offline clock is seeded before creating and importing keys" [[ ! -e $R/etc/omamobile/firstboot.conf ]] || fail "the conf is deleted after a run" [[ -f $R/var/lib/omamobile/firstboot/done ]] || fail "the run is recorded" grep -q '^useradd -m -G wheel,audio,video,input -s /bin/bash -c Alice Example alice$' "$CALLS" || fail "the user gets the groups and name" @@ -181,11 +193,22 @@ pass "the lock's PAM file comes from lock-pam, not omarchy-apply-lock" run || fail "without a conf, nothing to do" [[ ! -s $CALLS ]] || fail "without a conf, nothing runs" good | sed '/^WIFI_/d' > "$R/etc/omamobile/firstboot.conf" +export TEST_NOW=2000000100 run || { cat "$t/run.out"; fail "a second run succeeds"; } +grep -q '^clock-set' "$CALLS" && fail "an accurate clock is never moved backwards" grep -q '^usermod -aG wheel,audio,video,input' "$CALLS" || fail "a second run updates the user it made" [[ $(grep -cxF "$KEY" "$R/home/alice/.ssh/authorized_keys") == 1 ]] || fail "a second run doesn't duplicate the key" pass "running again is safe" +: > "$CALLS" +rm "$R/usr/share/pacman/keyrings/"*.gpg +export TEST_NOW=1 +good > "$R/etc/omamobile/firstboot.conf" +run || { cat "$t/run.out"; fail "a root without keyrings still runs"; } +grep -q '^clock-set' "$CALLS" && fail "no keyrings means no clock adjustment" +grep -q '^pacman-key --populate' "$CALLS" || fail "key setup still runs without a floor" +pass "missing keyrings leave the clock alone" + # An essential step failing keeps the conf (minus the Wi-Fi secret) for the next boot rm -f "$R/var/lib/omamobile/firstboot/user" sed -i '/^alice:/d' "$R/etc/passwd" diff --git a/packages/omamobile-firstboot/version b/packages/omamobile-firstboot/version index d917d3e26..b1e80bb24 100644 --- a/packages/omamobile-firstboot/version +++ b/packages/omamobile-firstboot/version @@ -1 +1 @@ -0.1.2 +0.1.3 From 259c47bcb41146d4359553596bfc438b021d65e1 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:00:38 +1300 Subject: [PATCH 17/21] omamobile-firstboot 0.1.3: declare native test dependency The package check uses cmp, which is absent from the minimal phone root. Declare diffutils as a check dependency so makepkg can run the full tests in a fresh build environment. Built with checks enabled on aarch64 tegu, installed 0.1.3-2, and ran the installed keyring setup against an isolated keyring root. Clock seeding and real pacman-key initialization and population passed. Co-Authored-By: Codex --- packages/omamobile-firstboot/PKGBUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/omamobile-firstboot/PKGBUILD b/packages/omamobile-firstboot/PKGBUILD index 73453d21d..f87949f17 100644 --- a/packages/omamobile-firstboot/PKGBUILD +++ b/packages/omamobile-firstboot/PKGBUILD @@ -2,12 +2,13 @@ # Maintainer: Derek Ross pkgname=omamobile-firstboot pkgver=$(cat "${startdir:-.}/version") -pkgrel=1 +pkgrel=2 pkgdesc="Omarchy Mobile first boot: the user, SSH key, firewall and Omarchy's setup from the installer's answers" arch=(any) url="https://github.com/derekross/omarchy-mobile" license=(MIT) depends=(bash coreutils grep sed gawk shadow sudo systemd openssh ufw networkmanager pacman util-linux) +checkdepends=(diffutils) backup=(etc/ssh/sshd_config.d/10-omamobile.conf) install=omamobile-firstboot.install From 3b95c0dd246d9d190794e8ef17b2d30db3f8244c Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:09:27 +1300 Subject: [PATCH 18/21] device-tegu: move shared clock fix to its own PR Keep the tegu review focused on device support. The shared omamobile-firstboot clock floor and native check dependency are carried by the firstboot-clock-floor branch instead. Co-Authored-By: Codex --- packages/omamobile-firstboot/PKGBUILD | 3 +-- .../bin/omamobile-firstboot | 14 ----------- packages/omamobile-firstboot/test/all | 23 ------------------- packages/omamobile-firstboot/version | 2 +- 4 files changed, 2 insertions(+), 40 deletions(-) diff --git a/packages/omamobile-firstboot/PKGBUILD b/packages/omamobile-firstboot/PKGBUILD index f87949f17..73453d21d 100644 --- a/packages/omamobile-firstboot/PKGBUILD +++ b/packages/omamobile-firstboot/PKGBUILD @@ -2,13 +2,12 @@ # Maintainer: Derek Ross pkgname=omamobile-firstboot pkgver=$(cat "${startdir:-.}/version") -pkgrel=2 +pkgrel=1 pkgdesc="Omarchy Mobile first boot: the user, SSH key, firewall and Omarchy's setup from the installer's answers" arch=(any) url="https://github.com/derekross/omarchy-mobile" license=(MIT) depends=(bash coreutils grep sed gawk shadow sudo systemd openssh ufw networkmanager pacman util-linux) -checkdepends=(diffutils) backup=(etc/ssh/sshd_config.d/10-omamobile.conf) install=omamobile-firstboot.install diff --git a/packages/omamobile-firstboot/bin/omamobile-firstboot b/packages/omamobile-firstboot/bin/omamobile-firstboot index 597bac603..f951476b1 100755 --- a/packages/omamobile-firstboot/bin/omamobile-firstboot +++ b/packages/omamobile-firstboot/bin/omamobile-firstboot @@ -211,20 +211,6 @@ step() { } s_keyring() { - # A phone without a working RTC can boot before its signing keys existed. - # Installed public keyrings are part of the verified root image; use their - # newest mtime as a floor before GnuPG creates or imports keys offline. - # Never move a valid clock backwards, and do nothing without a keyring. - local keyring stamp floor=0 now - for keyring in "$ROOT"/usr/share/pacman/keyrings/*.gpg; do - [[ -f $keyring ]] || continue - stamp=$(stat -c %Y "$keyring") - ((stamp <= floor)) || floor=$stamp - done - now=$(date -u +%s) - if ((now < floor)); then - date -u -s "@$floor" >/dev/null - fi if [[ ! -f $ROOT/etc/pacman.d/gnupg/trustdb.gpg ]]; then pacman-key --init fi diff --git a/packages/omamobile-firstboot/test/all b/packages/omamobile-firstboot/test/all index 403030cf7..429925390 100755 --- a/packages/omamobile-firstboot/test/all +++ b/packages/omamobile-firstboot/test/all @@ -121,15 +121,6 @@ pass "values are data, never executed" # --- a whole run against fakes ------------------------------------------------ F=$t/fakes; mkdir -p "$F"; CALLS=$t/calls; : > "$CALLS" fake() { printf '#!/bin/bash\n%s\n' "$2" > "$F/$1"; chmod +x "$F/$1"; } -export REAL_DATE=$(command -v date) TEST_NOW=1 -fake date 'case "$*" in - "-u +%s") echo "$TEST_NOW" ;; - "-u -s "*) echo "clock-set ${3#@}" >> "$CALLS" ;; - *) "$REAL_DATE" "$@" ;; -esac' -mkdir -p "$R/usr/share/pacman/keyrings" -touch -d @2000000000 "$R/usr/share/pacman/keyrings/archlinuxarm.gpg" -touch -d @2000000060 "$R/usr/share/pacman/keyrings/omamobile.gpg" for cmd in pacman-key systemctl ufw chown hostname nmcli usermod omamobile-setup-system; do fake "$cmd" 'echo "$(basename "$0") $*" >> "$CALLS"' done @@ -155,9 +146,6 @@ run() { OMAMOBILE_FIRSTBOOT_ROOT=$R OMARCHY_PATH=$O OMAMOBILE_LOCK_PAM=$F/lock-p good > "$R/etc/omamobile/firstboot.conf" run || { cat "$t/run.out"; fail "a run with a good conf succeeds"; } -grep -qx 'clock-set 2000000060' "$CALLS" || fail "clock advances to the newest installed keyring" -[[ $(head -1 "$CALLS") == 'clock-set 2000000060' ]] || fail "clock is seeded before pacman-key" -pass "an offline clock is seeded before creating and importing keys" [[ ! -e $R/etc/omamobile/firstboot.conf ]] || fail "the conf is deleted after a run" [[ -f $R/var/lib/omamobile/firstboot/done ]] || fail "the run is recorded" grep -q '^useradd -m -G wheel,audio,video,input -s /bin/bash -c Alice Example alice$' "$CALLS" || fail "the user gets the groups and name" @@ -193,22 +181,11 @@ pass "the lock's PAM file comes from lock-pam, not omarchy-apply-lock" run || fail "without a conf, nothing to do" [[ ! -s $CALLS ]] || fail "without a conf, nothing runs" good | sed '/^WIFI_/d' > "$R/etc/omamobile/firstboot.conf" -export TEST_NOW=2000000100 run || { cat "$t/run.out"; fail "a second run succeeds"; } -grep -q '^clock-set' "$CALLS" && fail "an accurate clock is never moved backwards" grep -q '^usermod -aG wheel,audio,video,input' "$CALLS" || fail "a second run updates the user it made" [[ $(grep -cxF "$KEY" "$R/home/alice/.ssh/authorized_keys") == 1 ]] || fail "a second run doesn't duplicate the key" pass "running again is safe" -: > "$CALLS" -rm "$R/usr/share/pacman/keyrings/"*.gpg -export TEST_NOW=1 -good > "$R/etc/omamobile/firstboot.conf" -run || { cat "$t/run.out"; fail "a root without keyrings still runs"; } -grep -q '^clock-set' "$CALLS" && fail "no keyrings means no clock adjustment" -grep -q '^pacman-key --populate' "$CALLS" || fail "key setup still runs without a floor" -pass "missing keyrings leave the clock alone" - # An essential step failing keeps the conf (minus the Wi-Fi secret) for the next boot rm -f "$R/var/lib/omamobile/firstboot/user" sed -i '/^alice:/d' "$R/etc/passwd" diff --git a/packages/omamobile-firstboot/version b/packages/omamobile-firstboot/version index b1e80bb24..d917d3e26 100644 --- a/packages/omamobile-firstboot/version +++ b/packages/omamobile-firstboot/version @@ -1 +1 @@ -0.1.3 +0.1.2 From 53a106f4f736c88d6843218d33915b1713027287 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:24:57 +1300 Subject: [PATCH 19/21] device-tegu 0.1.1: prepare public sources and gate the touch driver The public board needs ACPM for early USB power, so gate the modular touchscreen itself behind the synced startup marker. Pin the public board, touch and native display source tree and provide a worktree preparation command instead of depending on private patches. Native aarch64 package checks, installation integrity and retry pass. The existing private kernel also passed automatic startup, cross-boot marker skip, guarded retry and stock A recovery boot. Public-source reproduction and display schema checks pass; public-kernel hardware qualification remains pending, so the descriptor stays gated with the oldest shared metadata. Co-Authored-By: Codex --- device/tegu/NOTES.md | 23 ++++++++++ device/tegu/kernel.config | 10 +++++ device/tegu/kernel.sources | 14 ++++++ device/tegu/prepare-kernel | 44 +++++++++++++++++++ packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/README.md | 33 ++++++++++++-- .../bin/omamobile-tegu-touch-start | 2 + .../omamobile-device-tegu/test/touch-start | 2 +- .../modprobe.d/10-omamobile-tegu-touch.conf | 4 +- 9 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 device/tegu/kernel.sources create mode 100755 device/tegu/prepare-kernel diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index d021bb4e5..a2f0176c9 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -560,3 +560,26 @@ 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. diff --git a/device/tegu/kernel.config b/device/tegu/kernel.config index b53bf0f16..4694ae357 100644 --- a/device/tegu/kernel.config +++ b/device/tegu/kernel.config @@ -1,3 +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 diff --git a/device/tegu/kernel.sources b/device/tegu/kernel.sources new file mode 100644 index 000000000..10fe45cdc --- /dev/null +++ b/device/tegu/kernel.sources @@ -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 diff --git a/device/tegu/prepare-kernel b/device/tegu/prepare-kernel new file mode 100755 index 000000000..5e5c04934 --- /dev/null +++ b/device/tegu/prepare-kernel @@ -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.' diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index 9f06f95dd..6c6d09815 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT pkgname=omamobile-device-tegu pkgver=$(cat "${startdir:-.}/version") -pkgrel=3 +pkgrel=4 pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index 5883442bc..cef5a5935 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -7,14 +7,18 @@ startup. The package also provides `reboot-to` and the device descriptor. 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 starts ACPM and the S2MPG14 PMIC -after early boot and checks that touch input registered. Before loading the -mailbox, ACPM and PMIC drivers, it writes and syncs a persistent marker at +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 delay allows userspace to start; this package does not provide USB rescue. +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, @@ -26,3 +30,24 @@ 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. 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. +Hardware qualification and descriptor activation remain pending. diff --git a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start index 5b9005ca7..330dbfe2e 100755 --- a/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start +++ b/packages/omamobile-device-tegu/bin/omamobile-tegu-touch-start @@ -55,6 +55,8 @@ sync -f "$marker" 2>/dev/null || sync modprobe exynos_mailbox modprobe acpm_protocol modprobe sec_acpm +# Public boards need ACPM for early USB power; gate the touch driver itself. +modprobe synaptics_tcm for ((i = 0; i < 20; i++)); do if grep -F 'Name="Synaptics TouchComm Touchscreen"' "$root/proc/bus/input/devices" >/dev/null; then diff --git a/packages/omamobile-device-tegu/test/touch-start b/packages/omamobile-device-tegu/test/touch-start index e2ed9b122..b9e3878bb 100755 --- a/packages/omamobile-device-tegu/test/touch-start +++ b/packages/omamobile-device-tegu/test/touch-start @@ -39,7 +39,7 @@ for soc in soc soc@0; do "$script" test ! -e "$TEST_MARKER" actual=$(grep -v '^synced$' "$TEST_LOG") - test "$actual" = $'exynos_mailbox\nacpm_protocol\nsec_acpm' + test "$actual" = $'exynos_mailbox\nacpm_protocol\nsec_acpm\nsynaptics_tcm' rm -r "$base/$soc" done echo 'ok - both DT paths start mailbox before ACPM and remove a successful marker' diff --git a/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf index feb0783f9..0253c9ecf 100644 --- a/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf +++ b/packages/omamobile-device-tegu/vendor/modprobe.d/10-omamobile-tegu-touch.conf @@ -1,4 +1,6 @@ # SPDX-License-Identifier: MIT -# The touchscreen supplies are started after userspace is up. +# Explicitly loaded by the guarded touch service. ACPM is built in when +# required for early USB power; these entries also cover modular kernels. blacklist acpm_protocol blacklist sec_acpm +blacklist synaptics_tcm From 3a058972255ab68fe83722c4f82e2d3e9f6b07a4 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:50:22 +1300 Subject: [PATCH 20/21] device-tegu: record public-kernel oldest-header boot control The footer-free images returned to fastboot. Adding index-zero AVB footers to byte-identical payloads booted the public board and touch kernel with Android 16 and September 2025 metadata on the newer phone. Record actual smoke results and limits without changing the shared descriptor or claiming cross-owner display qualification. Co-Authored-By: Codex --- device/tegu/NOTES.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index a2f0176c9..03187959d 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -583,3 +583,31 @@ 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. From bbb667bf9012d4f6d5c37e61dfa26583eb57c2c5 Mon Sep 17 00:00:00 2001 From: harkl <89045610+h4rkl@users.noreply.github.com> Date: Wed, 28 Oct 2026 12:07:14 +1300 Subject: [PATCH 21/21] device-tegu 0.1.1: preserve modules and enable tested native display policy Arch kernel-modules-hook removes unowned future-kernel modules, leaving a flashed kernel without display, touch or firewall modules. Skip that cleanup while the tegu package is installed. Enable native DSI brightness commands as on the other Tensor packages and cap refresh at the tested 60 Hz. Native aarch64 package checks and integrity checks passed. A subsequent public-kernel boot retained all 1782 modules, automatically initialized DRM and touch, and passed every required phone-smoke check. Camera and owner testing confirmed the visible Omarchy lock screen and touch; backlight restore and firewall passed. Record the remaining Plymouth failure, missing GPU/peripherals and cross-owner footer qualification limits. Co-Authored-By: Codex --- device/tegu/NOTES.md | 33 +++++++++++++++++++ packages/omamobile-device-tegu/PKGBUILD | 2 +- packages/omamobile-device-tegu/README.md | 12 +++++-- packages/omamobile-device-tegu/test/all | 2 ++ .../modprobe.d/omamobile-tegu-display.conf | 5 +++ .../10-omamobile-tegu.conf | 5 +++ 6 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 packages/omamobile-device-tegu/vendor/modprobe.d/omamobile-tegu-display.conf create mode 100644 packages/omamobile-device-tegu/vendor/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 03187959d..83401833d 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -611,3 +611,36 @@ 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. diff --git a/packages/omamobile-device-tegu/PKGBUILD b/packages/omamobile-device-tegu/PKGBUILD index 6c6d09815..c613fdb71 100644 --- a/packages/omamobile-device-tegu/PKGBUILD +++ b/packages/omamobile-device-tegu/PKGBUILD @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT pkgname=omamobile-device-tegu pkgver=$(cat "${startdir:-.}/version") -pkgrel=4 +pkgrel=6 pkgdesc="Omarchy Mobile boot and touch support for the Google Pixel 9a (tegu)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" diff --git a/packages/omamobile-device-tegu/README.md b/packages/omamobile-device-tegu/README.md index cef5a5935..19625dd89 100644 --- a/packages/omamobile-device-tegu/README.md +++ b/packages/omamobile-device-tegu/README.md @@ -4,6 +4,9 @@ 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 @@ -29,7 +32,10 @@ against the public board DTS in kernel PRs 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. This is not yet an installable release. +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 @@ -50,4 +56,6 @@ 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. -Hardware qualification and descriptor activation remain pending. +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. diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all index dd232d594..a0b6d0731 100755 --- a/packages/omamobile-device-tegu/test/all +++ b/packages/omamobile-device-tegu/test/all @@ -15,6 +15,8 @@ for file in \ usr/bin/reboot-to \ usr/lib/omamobile/tegu-touch-start \ usr/lib/modprobe.d/10-omamobile-tegu-touch.conf \ + usr/lib/modprobe.d/omamobile-tegu-display.conf \ + usr/lib/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf \ usr/lib/systemd/system/omamobile-tegu-touch-start.service \ usr/lib/systemd/system/omamobile-tegu-touch-start.timer \ usr/lib/udev/rules.d/10-omamobile-storage.rules \ diff --git a/packages/omamobile-device-tegu/vendor/modprobe.d/omamobile-tegu-display.conf b/packages/omamobile-device-tegu/vendor/modprobe.d/omamobile-tegu-display.conf new file mode 100644 index 000000000..ce6eccd16 --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/modprobe.d/omamobile-tegu-display.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# Native DSI commands provide panel brightness, as on the other Tensor phones. +options gs_dsim_cmd allow_tx=1 +# Keep the qualified refresh rate until 120 Hz is tested on this package. +options gs_decon max_refresh=60 diff --git a/packages/omamobile-device-tegu/vendor/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf b/packages/omamobile-device-tegu/vendor/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf new file mode 100644 index 000000000..1a70b8ccd --- /dev/null +++ b/packages/omamobile-device-tegu/vendor/systemd/system/linux-modules-cleanup.service.d/10-omamobile-tegu.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +[Unit] +# Our B-slot kernels use modules tarballs, not pacman-owned kernel packages. +# Keep running, next-boot and rollback modules while this device package exists. +ConditionPathExists=!/usr/share/omamobile/device-tegu/version