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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
293 changes: 293 additions & 0 deletions device/akita/BRINGUP-M2.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions device/akita/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ Sources:
- `S/`: Google's GPL zuma SoC device tree, [kernel/devices/google/zuma](https://android.googlesource.com/kernel/devices/google/zuma/+/refs/tags/android-16.0.0_r0.10/dts/) at the same tag.
- `H/`: [husky's notes](../husky/NOTES.md) and [descriptor](../husky/device.conf), for what the two zuma phones share.

## 2026-11-06: storage and the Arch root (M2)

UFS with the storage guard (gate c) and Arch on `userdata` (gate d). The steps and results are in [BRINGUP-M2](BRINGUP-M2.md). The kernel side is linux-omarchy-mobile#206, merged as `75b9c0b73`.

- **UFS links at stock's mode** [V]: `FAST series_B G_4 L_2`, with husky's three board nodes (VCC on `gpp0-1`). All 62 partitions appear on stock's device nodes, and the guard leaves exactly `UFS_RW` writable, in the initramfs and under Arch.
- **The disks attach before PID 1** [V]: at 0.26 s, with `/init` starting at 0.28 s, because UFS is built in. The guard has flagged every partition by 0.61 s, and nothing is mounted before then.
- **The kernel's default sleep is `deep`** [V]: `/sys/power/mem_sleep` reads `s2idle [deep]` under Arch. Linux has no zuma SoC sleep sequence, so `omamobile-device-akita` makes Suspend use `s2idle`, as the Pixel 7 Pro's package does.
- **`NV_PARTS` names the radio's partitions only** (the Pixel 7 Pro's list, all present on akita). Other per-phone partitions it doesn't name:
- `mfg_data`: factory data, which the Pixel 7 Pro's fingerprint stack reads a copy of ([cheetah's FINGERPRINT-PLAN](../cheetah/FINGERPRINT-PLAN.md));
- `trusty_persist`: Trusty's persistent storage ([tegu's FINGERPRINT-PLAN](../tegu/FINGERPRINT-PLAN.md));
- `pinfo`, `fips` and `blenv`, whose contents haven't been read [I].

None is on `UFS_RW`, so the guard keeps them read-only, and all are in M2.4's full backup. Since stage 0's clean backup, `mfg_data`, `pinfo`, `fips` and `blenv` are unchanged, and `trusty_persist` changed (stock ran) [V].
- **A second retail 8a passed M2.3, M2.4 and M2.6** on the same branch, with the same link, partition map and guard results ([#456](https://github.com/derekross/omarchy-mobile/pull/456)).

## 2026-11-03: first light (M1.3) and the console (M1.4)

Our kernel booted from slot B with the first-light board file, which has USB and no framebuffer. A second boot added the framebuffer. The steps and the builds are in [BRINGUP-M1](BRINGUP-M1.md).
Expand Down Expand Up @@ -111,6 +126,7 @@ The descriptor carries no comments; this table is its provenance.
| `VENDOR_PAGESIZE` | 0x800 | [V] | F/ `vendor_boot` and `vendor_kernel_boot` headers |
| `OS_VERSION`, `OS_PATCH_LEVEL` | 17.0.0, 2026-10 | [V] | F/ `init_boot` header; the build on both slots (R/) |
| `BOOT_IMAGES`, `UFS_RW` | the five boot images; their `_b` names and `userdata` | [V] | R/ `/dev/block/by-name`; F/ |
| `NV_PARTS`, `NV_BACKUP_EXTRA` | `efs efs_backup modem_userdata persist modem_a modem_b`; `devinfo` | [V] | R/ `/dev/block/by-name` has all seven, none on `UFS_RW`. They are cheetah's values: the partitions of AGENTS.md §1's checksum check, plus `devinfo`, whose slot flags change with every flash. They let `tools/nv-backup` back them up read-only from our own kernel ([BRINGUP-M2](BRINGUP-M2.md), M2.4) |
| `INITRAMFS_INIT` | the shared init | [V] | as husky |
| `PANEL_SIZE` | 1080x2400 | [V] | R/ `dumpsys display`; G/ `zuma-akita-display.dtsi` |
| `SIMPLEFB_TRIG_CON` | `0x19470030 0x3061` | [V] | DECON0 `TRIG_CON` read 0x3070 at handover on a booted 8a (2026-11-03, above); 0x3061 unmasks the trigger as on husky (H/), and with it the console reaches the panel (M1.4, above) |
Expand Down
91 changes: 91 additions & 0 deletions device/akita/build-u3-root
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# akita's test root image (BRINGUP-M2.md, M2.6), the one M2.7's rollback
# reinstalls: Arch Linux ARM's base tarball, checked by tools/lib/alarm.sh,
# with omamobile-device-akita staged by its own build and install, and the
# kernel modules of the slot B images, indexed by depmod. It needs no signed
# repository and runs no pacman, so it has no desktop and no
# omamobile-firstboot.
#
# device/akita/build-u3-root KERNEL_OUT [OUT_DIR]
#
# KERNEL_OUT is the kernel build the slot B images come from, with its modules
# tarball (KERNEL_OUT=... bin/omamobile modules). OUT_DIR (default
# out/akita/u3-root) gets omamobile-rootfs-u3-akita-aarch64.img.zst, its
# .sha256 and its MANIFEST, for tools/install-phone --rootfs. The MANIFEST
# names the tarball, package and modules by version and sha256, as
# tools/build-rootfs's does: the tarball is "latest", so a rebuild can differ. Needs docker. The image is assembled in
# Debian's own x86 container, which cross-compiles reboot-to.
set -euo pipefail

if [[ ${1:-} == --inside ]]; then
# In the container: /in/alarm.tar.gz, /in/pkg, /in/modules.tar.zst, /out.
export DEBIAN_FRONTEND=noninteractive
apt-get -qq update >/dev/null
apt-get -qq install -y --no-install-recommends libarchive-tools e2fsprogs zstd \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross kmod >/dev/null
R=/work/root
mkdir -p $R
bsdtar -xpf /in/alarm.tar.gz -C $R
cp -r /in/pkg /work/pkg
CC=aarch64-linux-gnu-gcc LDFLAGS=-static /work/pkg/build /work/pkg-build
/work/pkg/install $R /work/pkg-build
mkdir -p $R/usr/lib/modules
zstd -dc /in/modules.tar.zst | tar -C $R/usr/lib/modules -xf -
# The kernel build installs its modules without depmod (its container has
# no kmod), and this image runs no pacman, whose kmod hook would make the
# indexes: without modules.dep, modprobe finds nothing. Index the slot B
# kernel's release only; the base tarball brings its own kernel's modules.
depmod -b $R "$REL"
[ -s $R/usr/lib/modules/$REL/modules.dep ] || { echo "depmod wrote no modules.dep for $REL" >&2; exit 1; }
# What install-phone writes into, and the phone's name
install -d -m 0755 $R/etc/omamobile
install -d -m 0700 $R/root/.ssh
echo akita >$R/etc/hostname
# No password logins: root and Arch Linux ARM's alarm account are locked,
# and install-phone puts the owner's key in root's authorized_keys
sed -i -E 's/^(root|alarm):[^:]*:/\1:!:/' $R/etc/shadow
# systemd makes the machine id at first boot
: >$R/etc/machine-id
size=$(($(du -sm $R | cut -f1) * 13 / 10 + 512))
mke2fs -q -t ext4 -L omamobile-root -d $R /out/root.img "${size}M"
fsck=$(e2fsck -fn /out/root.img 2>&1) || { echo "$fsck" >&2; exit 1; }
chown "$OUT_UID:$OUT_GID" /out/root.img
exit 0
fi

repo=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
source "$repo/tools/lib/alarm.sh"
(($# >= 1 && $# <= 2)) || alarm_die "usage: device/akita/build-u3-root KERNEL_OUT [OUT_DIR]"
kout=$(readlink -f "$1")
out=${2:-$repo/out/akita/u3-root}
mkdir -p "$out" && out=$(readlink -f "$out")
[[ -f $kout/include/config/kernel.release ]] || alarm_die "no kernel build in $kout"
rel=$(<"$kout/include/config/kernel.release")
modules=$kout/modules-$rel.tar.zst
[[ -f $modules ]] || alarm_die "no $modules (run: KERNEL_OUT=$kout bin/omamobile modules)"
alarm_fetch

name=omamobile-rootfs-u3-akita-aarch64
rm -f "$out/root.img"
alarm_say "Assembling $name for $rel"
docker run --rm -e OUT_UID="$(id -u)" -e OUT_GID="$(id -g)" -e REL="$rel" \
-v "$ALARM_TARBALL:/in/alarm.tar.gz:ro" \
-v "$repo/packages/omamobile-device-akita:/in/pkg:ro" \
-v "$modules:/in/modules.tar.zst:ro" \
-v "$(readlink -f "${BASH_SOURCE[0]}"):/in/build-u3-root:ro" \
-v "$out:/out" \
debian:trixie-slim bash /in/build-u3-root --inside
zstd -q -19 -T0 -f --rm "$out/root.img" -o "$out/$name.img.zst"
(cd "$out" && sha256sum "$name.img.zst" >"$name.img.zst.sha256")
commit=$(git -C "$repo" rev-parse --short=12 HEAD)$(git -C "$repo" diff --quiet HEAD -- device/akita packages/omamobile-device-akita tools/lib 2>/dev/null || echo "-dirty")
{
echo "# akita's test root image (BRINGUP-M2, M2.6)"
echo "device: akita (Arch Linux ARM base + omamobile-device-akita)"
echo "built: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo "repository commit: $commit"
echo "arch linux arm tarball sha256: $(sha256sum <"$ALARM_TARBALL" | cut -d' ' -f1)"
echo "omamobile-device-akita: $(<"$repo/packages/omamobile-device-akita/version")"
echo "kernel modules: $rel (tarball sha256 $(sha256sum <"$modules" | cut -d' ' -f1))"
} >"$out/$name.MANIFEST"
alarm_say "$out/$name.img.zst"
2 changes: 2 additions & 0 deletions device/akita/device.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ OS_VERSION=17.0.0
OS_PATCH_LEVEL=2026-10
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"
NV_PARTS="efs efs_backup modem_userdata persist modem_a modem_b"
NV_BACKUP_EXTRA="devinfo"
INITRAMFS_INIT=/initramfs/init
SIMPLEFB_TRIG_CON="0x19470030 0x3061"
PANEL_SIZE=1080x2400
20 changes: 20 additions & 0 deletions device/akita/overlays/ufs-probe.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up probe, never default: the first boot with UFS on (BRINGUP-M2,
* M2.3). The board file's bootargs, plus omamobile.ufs-probe (the init lists
* every LUN and partition, with the storage guard's read-only flags, in
* /run/ufs-probe.txt and the kernel log) and omamobile.initramfs (no
* hand-over to Arch, so nothing runs on userdata). Set DTB_OVERLAYS="ufs-probe"
* in device.conf for that build only.
*
* An overlay replaces bootargs whole, so these are a copy: zuma-akita.dts's
* bootargs as of linux-omarchy-mobile#206 (omamobile 75b9c0b73), unchanged
* since the first-light board file (#192). If the board file's change,
* copy them again before reusing this, or the overlay silently reverts them.
*/
/dts-v1/;
/plugin/;

&{/chosen} {
bootargs = "console=tty0 fbcon=font:TER16x32 reboot=warm panic=10 softlockup_panic=1 nmi_watchdog=panic sysctl.kernel.panic_on_rcu_stall=1 clk_ignore_unused pd_ignore_unused rdinit=/init omamobile.ufs-probe omamobile.initramfs";
};
21 changes: 21 additions & 0 deletions packages/omamobile-device-akita/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Derek Ross

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 27 additions & 0 deletions packages/omamobile-device-akita/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: MIT
# Maintainer: Derek Ross <derekross@gmail.com>
pkgname=omamobile-device-akita
pkgver=$(cat "${startdir:-.}/version")
pkgrel=1
pkgdesc="Omarchy Mobile support for the Google Pixel 8a (akita): storage guard and USB networking"
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-akita.install
makedepends=(gcc)

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

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

package() {
"$startdir/install" "$pkgdir" "$srcdir/build"
}
19 changes: 19 additions & 0 deletions packages/omamobile-device-akita/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# omamobile-device-akita

Omarchy Mobile's first userspace package for the Google Pixel 8a (codename akita, Tensor G3 / zuma). Like the Pixel 8 Pro's first package, it hides the Android partitions from desktop tools, holds the USB address, and gives pacman the same `[omamobile]` repository as the Pixel 7 Pro. It does not drive the radio, the charger, or a camera, and it does not mark a boot slot successful.

| Path | Installs to | What it does |
| --- | --- | --- |
| `vendor/udev/rules.d/10-omamobile-storage.rules` | `/usr/lib/udev/rules.d` | Hides `sda` and every Android partition except `userdata` from desktop tools. Same rule as the Pixel 7 Pro. The initramfs stops its guard loop before `switch_root`; the kernel's read-only flags are what remain ([BRINGUP-M2](../../device/akita/BRINGUP-M2.md) test 8) |
| `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover, as the last gateway. A replug needs a reboot: this package does not close the MAX77759's USB2 switch again (the Pixel 8 Pro's rescue needs its `hsi2c_11` bus, which akita's board file doesn't have yet). Same file as the Pixel 8 Pro package |
| `vendor/systemd/logind.conf.d/10-omamobile-power-key.conf` | `/usr/lib/systemd/logind.conf.d` | A short power press does not power the phone off. Same drop-in as the Pixel 7 Pro. akita's forced-reset combination under our kernel is untested; on the Pixel 8 Pro it is Power + Volume Up held 15-30 s |
| `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/NetworkManager/conf.d` | Keeps NetworkManager off that link. Same file as the Pixel 8 Pro package |
| `vendor/systemd/sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd/sleep.conf.d` | Suspend means suspend-to-idle. The kernel's default on the 8a is `deep` (`/sys/power/mem_sleep` reads `s2idle [deep]`), which Linux can't wake from on zuma yet. No hibernation: there is no swap. The settings are the Pixel 7 Pro's; the test checks. Suspend itself is still untested on Tensor G3 (the Pixel 8 Pro's UFS-PLAN, U6) |
| `etc/omamobile-mirrorlist` | `/etc/pacman.d/omamobile-mirrorlist` | Where pacman finds the `[omamobile]` repository. Same file as the Pixel 7 Pro package |
| `omamobile-device-akita.install` | pacman hook | Adds `[omamobile]` to `pacman.conf` before `[omarchy]`, once, and keeps the channel a phone follows. Same script as the Pixel 7 Pro package |
| `src/reboot-to.c` | `/usr/bin/reboot-to` | Reboot with a reason the bootloader understands (`reboot-to bootloader` reaches fastboot on akita, [BRINGUP-M1](../../device/akita/BRINGUP-M1.md) test 3). Same bytes as the Pixel 7 Pro package; the test checks |
| `device.conf` | `/usr/share/omamobile/device.conf` | The descriptor, the same bytes as `device/akita/device.conf` |

`./build [DIR]` compiles `reboot-to` from this directory, `./install DESTDIR [DIR]` stages the files, and `test/all` checks the copies when it is run from the repository.

Not in this package: the boot-success marker, Wi-Fi, the charger, cameras, the USB replug rescue, the display start and the slot-B image hook. Each one stays out until it has its own runbook. There is no lid drop-in: akita has no hinge. Whether Plymouth needs the Pixel 8 Pro's retain-splash drop-in on simpledrm is still open ([BRINGUP-M2](../../device/akita/BRINGUP-M2.md), open questions).
8 changes: 8 additions & 0 deletions packages/omamobile-device-akita/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Compile reboot-to into BUILDDIR (default: build).
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:-}
26 changes: 26 additions & 0 deletions packages/omamobile-device-akita/device.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: MIT
# Each value's source is in NOTES.md, "What device.conf rests on".
CODENAME=akita
NAME="Pixel 8a"
SOC=zuma
COMPATIBLE="google,zuma-akita"
PACKAGE=omamobile-device-akita
DTB=exynos/google/zuma-akita.dtb
SOC_COMPATIBLE="b0-ipop:0x9865:1:0:1 b1-ipop:0x9865:1:1:1"
AVB_FOOTERS="boot:0x4000000 init_boot:0x800000"
AVB_ROLLBACK_INDEX=1791158400
AVB_SECURITY_PATCH=2026-10-05
DTBO_SOURCE=akita-m1-overlay.dts
DTBO_BOARD_ID=0x40406
DTBO_BOARD_REV=0x10000
VENDOR_CMDLINE="console=tty0 splash plymouth.graphical plymouth.force-scale=1 vt.global_cursor_default=0 clk_ignore_unused pd_ignore_unused printk.devkmsg=on bootconfig"
VENDOR_PAGESIZE=0x800
OS_VERSION=17.0.0
OS_PATCH_LEVEL=2026-10
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"
NV_PARTS="efs efs_backup modem_userdata persist modem_a modem_b"
NV_BACKUP_EXTRA="devinfo"
INITRAMFS_INIT=/initramfs/init
SIMPLEFB_TRIG_CON="0x19470030 0x3061"
PANEL_SIZE=1080x2400
18 changes: 18 additions & 0 deletions packages/omamobile-device-akita/etc/omamobile-mirrorlist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: MIT
# Where pacman gets Omarchy Mobile's packages ([omamobile] in /etc/pacman.conf).
#
# The one active Server line is the channel this phone follows:
# stable what has run on the Pixel 7 Pro; phones installed from a
# release follow it
# development every day's build, first; for builders and testers
# local the repository on the phone itself, /var/lib/omamobile/repo,
# filled from a build machine by tools/repo-push
#
# Switch with: sudo omamobile-update channel development (or stable, local)
# See which: omamobile-update check
#
# pacman keeps a changed copy of this file across upgrades (backup= in the
# device package); a new default then arrives as omamobile-mirrorlist.pacnew.
Server = https://pkgs.omamobile.org/stable/$arch
#Server = https://pkgs.omamobile.org/development/$arch
#Server = file:///var/lib/omamobile/repo/$arch
27 changes: 27 additions & 0 deletions packages/omamobile-device-akita/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Stage omamobile-device-akita into DESTDIR. Nothing is enabled that would
# mark a slot successful or start the radio, the charger, or a camera.
# ./install DESTDIR [BUILDDIR]
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"
install -Dm644 vendor/udev/rules.d/10-omamobile-storage.rules \
"$destination/usr/lib/udev/rules.d/10-omamobile-storage.rules"
install -Dm644 vendor/systemd/network/20-usb-gadget.network \
"$destination/usr/lib/systemd/network/20-usb-gadget.network"
install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \
"$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf"
install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \
"$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf"
install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \
"$destination/usr/lib/systemd/sleep.conf.d/10-omamobile.conf"
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-akita/LICENSE"
install -Dm644 version "$destination/usr/share/omamobile/device-akita/version"
Loading