Omamobile runs native Omarchy on mobile devices: Arch Linux ARM, Hyprland and Omarchy's own packages on a mainline Linux kernel, with no Android underneath. It works today on the Pixel 7 Pro (cheetah, Google Tensor G2 / gs201). We want help with two things: bringing up more devices (other Pixels first, since they share the most with it), and getting our device-tree and driver work merged upstream.
- Supported devices and their status: docs/DEVICES.md
- What's missing and the order we plan to tackle it: docs/ROADMAP.md
- AI coding agents: read AGENTS.md as well. It has the rules and the gotchas we learned the hard way.
- What has been learned on real hardware: device/cheetah/NOTES.md, newest first.
- Goals and principles
- What you need
- The safety model (read this first)
- The development loop
- Bringing up a new device
- Submitting changes
- Licensing and vendor firmware
- Omarchy-native. The phone runs Omarchy's own packages, shell and update path (
omarchy update). Phone-specific behaviour lives in Omamobile packages (omamobile-shell,omamobile-device-<codename>) that sit beside Omarchy's, asomarchy-macdoes for Apple Silicon. Changes Omarchy itself needs go upstream to Omarchy (patches/omarchy/holds them while they wait). Avoid one-off local hacks. - Upstream-able changes. The kernel is mainline plus one commit per logical change, written the way upstream wants it: bindings, then the driver, then the DTS. Mesa and Hyprland changes are kept as patch files with their upstream merge-request text (see
packages/mesa/UPSTREAM.md). Any change we can't send upstream needs a good reason, written down. - No Google Play services, and no Google apps. Android apps run in Waydroid. Where Google's proprietary userspace is needed (GNSS, fingerprint), it runs in a small chroot built from the user's own factory image, and only for the job it does.
- Safety first. Every Pixel holds calibration data that can't be replaced: IMEI, radio NV, sensor and display calibration. Bricking a phone or wiping that data is the worst thing this project can do. The safety model comes before speed, every time.
- Evidence over guesses. The plans mark each claim as checked ([V], with a source or a capture) or inferred ([I], to be checked on the device). Results from the phone go into the plan and into
NOTES.mdwith the kernel version that produced them.
- A supported or candidate Pixel with an unlockable bootloader. "OEM unlocking" must be allowed in Android's developer options. Carrier-locked phones often can't unlock. Unlocking (
fastboot flashing unlock) wipes the phone. - The factory image for exactly the build on your phone, from developers.google.com/android/images. Our scripts pull the firmware each driver needs from that image (§7). Keep it: it's also your restore path.
- A USB-C cable and a Linux laptop. USB is the only link to the phone during bring-up: networking (CDC NCM, the phone is
172.16.42.1) and a serial console (ACM). - Patience, and a phone you can afford to have out of action for a while.
docker: kernel builds run in thedocker/Dockerfileenvironment (Ubuntu 24.04).adb,fastboot(android-tools),lz4,zstd,cpio,python3,ssh, plusunzip,debugfs(e2fsprogs),simg2img/lpunpackanderofs-utilsfor firmware extraction.- Android's prebuilt clang and the AOSP boot-image tools.
bin/omamobiletakes clang fromCLANG_DIR, andmkbootimgandmkdtboimg.pyfromSRC_DIR(system/tools/mkbootimg,system/libufdt). Today these come from a LineageOS checkout (bin/lineage-ref sync, about 400 GB). A smaller setup also works: the AOSPplatform/prebuilts/clang/host/linux-x86,platform/system/tools/mkbootimgandplatform/system/libufdtprojects under~/android(plusplatform/external/avbfor a device withAVB_FOOTERS), withCLANG_DIRandSRC_DIRset inomamobile.local.conf. The initramfs build links against that clang's Android compiler-rt builtins. A lighter toolchain setup would make a good PR. - The kernel tree. Clone derekross/linux-omamobile to
~/omamobile-kernel/linux, or setKERNEL_DIR. Setups from before 2026-10-29 used~/android/mainline(the project began with Android-era names); the tools still find it, and moving is optional. Branchomamobileis the published kernel and the source of releases (tagskernel-<YYYY.MM.DD>, RELEASES §8): community pull requests and the maintainer's curated work land there, and it only moves forward. Base your kernel work on it. Some cheetah drivers the packages use (AoC, Trusty, the modem) are still being curated into it; theomamobile-intbranch on GitHub is an old integration snapshot (2026-10-18) that is no longer updated. - Google's GPL kernel for your device, as a reference for registers, clocks and power sequences (manifests at
android.googlesource.com/kernel/manifest, branches namedandroid-gs-<family>-…). The postmarketOS Tensor kernel is a useful second reference. - The host side of USB networking: give the laptop
172.16.42.2/24on the phone's USB network interface. A NetworkManager profile with a manual address works (see "Host setup" in NOTES.md).
Shared settings live in omamobile.conf. Override them in omamobile.local.conf, which is gitignored.
Every rule here exists because breaking it either bricks a phone or loses data no one can restore. If a step in a plan conflicts with this section, this section wins.
- Pixels have A/B slots. Omamobile only ever lives on slot B. Slot A keeps the stock factory build, so the phone always has a known-good system to fall back to and a way back to
fastboot(adb reboot bootloader). - We flash only these partitions: the device's boot images on slot B (its descriptor's
BOOT_IMAGES:boot_b,vendor_boot_banddtbo_b, plusinit_boot_bandvendor_kernel_boot_bwhere the phone has them), anduserdata, which holds the Arch root. Slot B's boot images are written bybin/omamobile flash(fastboot) andbin/omamobile push(over SSH), and on a release install also bylinux-omamobile's pacman hook,omamobile-boot-update(RELEASES §5.3, §12 decisions 3 and 10). The hook writes only when/etc/omamobile/boot-update.confsaysAUTO_WRITE=yes, which onlytools/install-phonewrites (or a human by hand, in an approved runbook such as KERNEL-UPDATE-PLAN); it writes only<image>_bfor the descriptor'sBOOT_IMAGES, each found by GPT name on the main LUN, on the storage guard's allowlist (UFS_RW) and left read-write (ro0) by the guard, which it never changes; it reads every image back, and never reboots. A development phone has no such file, sobin/omamobile pushstays its only writer. - Never flash
bootloader,abl,bl1/bl2/bl31,pbl,radio/modem,devinfo,persist,efs*,modem_userdata,vbmeta, or anything without an explicit_bsuffix, exceptuserdata(it has no slots) and only throughtools/install-phone, which pins the phone's serial, asks you to type the codename, checks an allowlist and runs a dry run first.fastboot flash boot …without a suffix writes whichever slot is active. - Qualcomm A/B phones (Pixel 4 family) store the slot flags in the partition table (GPT attributes), and flashing
boot_bclearsslot-successful:b. Marking slot B bootable means writing four GPT sectors on the boot LUN, which the storage guard can't block. It is allowed only as a narrow, per-device exception, written into this section before it is used: the device, the LUN, the sectors (LBAs 1, 2, last-1 and last), the attribute bit and the CRCs it rewrites. The device's plan records the slot flags before and after, the rollback for a corrupted GPT, and the way back (stock restored on slot A first, or the owner's written acceptance of buttons-only recovery). It runs by hand, once per install of slot B's boot image, never from a service or at boot. No device has an entry yet. - Never relock the bootloader (
fastboot flashing lock) while any non-stock image is on the phone. - Never flash a factory image older than the one installed. Pixels enforce bootloader anti-rollback.
- Before your first flash, check that both slots carry the same bootloader version (
fastboot getvar all). If they don't, never flash a bootloader partition to fix it: from stock Android, sideload the full OTA for your build twice, so each slot gets the same build. If that doesn't make them match, stop and ask in an issue. tools/install-phonechanges the bootloader's slot flags in two named cases. The first isfastboot --set-active=bafter its writes. The second belongs to the check above, where the bootloader reports only the current slot's version: for a device whose descriptor saysBOOTLOADER_SLOT_PROBE=yes, a first install reads the other slot itself with a round trip (--set-active=<other>,reboot bootloader, readversion-bootloader,--set-active=<first>,reboot bootloader, check). The maintainer adds that line after an attended run on the device is in its notes; no device has it yet, and the round trip has not run on any phone. It says what will happen and asks first (a yes typed on a terminal, or--measure-other-slotfrom a tool that asked you), and it flashes and erases nothing. It is still a write: the bootloader keeps the slot flags in its own storage (devinfoon our Pixels), and the installer prints both slots'slot-successful,slot-unbootable,slot-retry-countand, where reported,slot-fastboot-okbefore and after. Stock's slot can lose its successful mark too, and what that costs later is not measured. If a step fails while the phone still answers, it sets the first slot active again; if the phone isn't seen to leave and come back to its bootloader screen in time, it sends nothing more and prints the way back (the buttons, thenfastboot --set-active=<first>), which it also prints before it asks. It runs only with the phone on slot A, without--reinstall, and with a slot B that doesn't read as started and still startable (slot-successfulyes,slot-unbootableno):--set-activeclears a slot's successful mark, and once slot B is ours that costs boot tries on some phones and can end in a fallback to stock that erasesuserdata. The installer can't see what is on slot B, so say--reinstallwhenever it holds Omamobile. The round trip starts the other slot's bootloader before its version is known. On phones where Google warns that an older bootloader in the inactive slot can leave the phone unbootable (the Pixel 6, Pixel 8 and Pixel 10 families after their anti-rollback updates, on Google's factory images page), don't do it, by the tool or by hand: from stock Android, sideload the full OTA for your build so both slots get it. The installeromamobile-install(derekross/omamobile-installer) does the same round trip under the same rules, in a run that installs only; its record of a round trip that did not finish makes its next run offer to set slot A active first. Everywhere else the installer stops and asks for--bootloader-slots-match VERSION(INSTALL-EXPERIENCE-PLAN G4, D4, decided 2026-11-10).
Keeping stock on slot A is how we avoid bricking phones during development, not a requirement for every phone. A phone with a single set of boot partitions (no _a/_b names) can become a supported device. With no second slot, a failed boot can't fall back to stock, so these rules replace the slot B rules above for that phone:
- The device's entry comes first. Before any flash, the port adds its phone here: the codename, the boot partitions the installer writes (normally
bootalone, plusdtboorvendor_bootwhere the phone needs them), and how to reach fastboot or the vendor's download mode by the buttons. A device PR never writes its own exception into AGENTS.md or this file. - We write only the boot partitions the entry names, and
userdata. Throughbin/omamobile flash/pushandtools/install-phone, with the serial pinned, the codename typed, the allowlist checked and a dry run first. No tool may write a partition named on its command line, and nothing is written from a rooted stock Android, where the storage guard doesn't run. - A full read-only backup before the first flash, of every partition except
userdataandsuper, checked against checksums taken on the phone, stored outside the repository (§3.3). It includes stock's boot partitions, which are the way back: the device's notes say how to write them back by the buttons, step by step, and the owner reads that before the first flash. - The storage guard works the same way: every other partition read-only from the first moment, the allowlist by name. Partitions that hold calibration or identity (
persist,modemst*,fsg,efsor the phone's equivalents) are never mounted. Read the files you need withdebugfsor from the backup. - The initramfs's no-USB-host panic needs a review for the phone. On an A/B phone it hands over to stock on slot A; on a single-slot phone it would restart into the same image. The device's descriptor and plan say what happens instead (stay up with the screen lit, or reboot into fastboot) before the first boot.
- Everything else in this section still applies: never relock with a non-stock image, never flash an older factory image, the backup rules, the hang safety nets.
Phones with an entry:
| Device | Boot partition the installer may write | Fastboot by buttons | Forced restart |
|---|---|---|---|
Xiaomi Mi 8 (dipper) |
boot only; stock dtbo stays untouched |
Power off, then hold Volume Down + Power until FASTBOOT appears. | Hold Power alone for 10 seconds; confirmed to restart into Android under the Omamobile kernel. |
UFS holds the per-device calibration. The initramfs (initramfs/init) guards it before anything else runs:
- It sets every SCSI disk and partition read-only (
blockdev --setro) as soon as it appears, and keeps a watcher running for the life of PID 1. - The only exceptions are an allowlist of GPT partition names: the device's
BOOT_IMAGESon slot B, anduserdata. - It deletes the whole-disk node of the main LUN (
/dev/sda), so nothing can write across partitions. The boot LUNs stay read-only at the disk level. - In Arch,
10-omamobile-storage.ruleskeeps the whole-disk node unusable and hides the Android partitions from desktop tools. - The one write outside the allowlist is the boot-success marker (
omamobile-boot-success). It opens exactlydevinfofor a single verified write of the slot flag bytes, then sets it read-only again.
A new device gets this guard before its UFS driver is ever enabled. Check the device's LUN layout and partition names first, because the allowlist works by name.
Before you touch radios, the PMIC, the AoC or Trusty, take a read-only copy of efs, efs_backup, modem_userdata, persist, modem_a/modem_b and devinfo. Better still, copy every partition except userdata and super.
- Read them with
ddover SSH from the guarded initramfs, or from a rooted reference Android. - Store them outside the repository (we use
~/android/reference/) with aSHA256SUMSfile. - Re-check the checksums before radio work. MODEM-PLAN.md M0.1 shows how; it finds each partition by
PARTNAMEin/sys/class/block/*/uevent, because the Arch root has no/dev/disk/by-partlabellinks. - Take a fresh backup after any stock Android boot, including a fallback to slot A. Stock's modem stack writes
efs,persistandmodem_userdata, so the old checksums no longer match, and a later mismatch would no longer tell you whether something of ours wrote there. - These files contain your IMEI and serial numbers. They must never be committed, posted or attached to an issue.
Bring-up steps hang phones. Plan for it before you start:
- Capture the log first. The stage tools (
tools/wifi-w1-capture,acpm-stage,aoc-stage,fingerprint-capture) open one SSH connection that streams/dev/kmsgintologs/before a second connection touches the hardware. The last line before a hang is then already on the laptop. - Arm the hardware watchdog for risky loads. Pass
--watchdog: an s3c2410 watchdog (about 15 s) with a feeder loop. A full hang then ends in a warm reset by itself, and pstore keeps the console (--pstoresaves it afterwards). - Use dead-man switches for anything that can cut the USB link (USB-C, firewall, network changes). The step runs detached on the phone and undoes itself unless the laptop confirms over a new SSH login. If even the undo doesn't bring USB back, the watchdog resets the phone into the known-good setup. See
tools/usbc-deadman. The quick version for a config change issystemd-run --unit=x-deadman --on-active=90 <undo command>: test with a fresh connection, then stop the timer. - Use hang markers for anything that runs at boot. Write and
synca marker before touching the hardware, and remove it once the step has finished. If the next boot finds the marker, it skips the step. Seeomamobile-wifi-startandomamobile-aoc-start. - Shutdown hangs end in a watchdog reset after a minute (
RebootWatchdogSec=1min,10-omamobile-reboot-watchdog.conf). A hang inside the kernel'sdevice_shutdownisn't covered: an oops that leaves a device lock held (as unloading the AoC modules once did) needs a forced restart. - When the phone hangs:
- Wait about 2 minutes. A dead-man undo, a watchdog reset or
panic=10may bring it back on its own. - Unplug and replug the cable once.
- Force a restart: hold Power for about 30 s until the phone is off, then press Power. On the Pixel 8 Pro, hold Power + Volume Up for 15-30 s; Power alone does nothing under our kernel (BRINGUP-M1 test 23).
- Reach fastboot by hand: with the phone off, hold Volume Down, add Power, and keep both held about 20 s until "Fastboot Mode" appears. Letting go early lands on the unlocked-bootloader warning, which carries on booting slot B.
- From fastboot, flash known-good images to slot B, or
fastboot --set-active=ato boot stock Android.bin/omamobile flashrefuses a phone whosecurrent-slotisa, since a release installed on slot A looks the same from fastboot; for a development phone that fell back to stock on slot A, runbin/omamobile flash --from-slot-a(it warns, then writes slot B and makes it active).
- Wait about 2 minutes. A dead-man undo, a watchdog reset or
- Slot fallback: a slot B that hasn't been marked successful falls back to stock slot A after the bootloader's retries run out. Once
omamobile-boot-successhas marked slot B, don't rely on that fallback: use fastboot. Keep a known-good image set (we keep one in~/omamobile-kernel/known-good).
- PMU registers are secure-only. Plain
/dev/memwrites are silently ignored, and a single/dev/memread of a PMU G3D register crashed the phone (GPU-PLAN.md). That includesdebugfs/regmap/*pmu*/registers, which reads the same range raw. Go through the kernel'sexynos-pmuregmap, which uses an SMC. - Read only registers you know are powered and clocked. On an unpowered block a read aborts the SoC (SError): the AoC PCU while the AoC is in reset, the PCIe ELBI while the PHY is isolated, some HSI2 SysMMU groups. On a first probe, read one register per call.
- Our
devmemisdevmem ADDR [VALUE]. The second argument is a value to write, not a width:devmem ADDR 32writes 0x20 to ADDR. This has bitten us once already, on a live display register.
- Plans run in gates. Read-only probes come first, then a single write, then a driver probe, then real use. Every step has an expected result, a stop condition and a rollback (§5.5).
- One change per boot. If two new things break together, you learn nothing.
- New DT nodes are
status = "disabled"in the board DTS and switched on by a bring-up overlay (device/cheetah/overlays/). When a feature has passed every gate, it becomes default-on in a separate commit. - Blacklist the module before installing a DTB that enables its node, so it can't autoload. Load it by hand with
dmesg -wrunning. - Remove bring-up blacklists (
/etc/modprobe.d/omamobile-*-bringup.conf) when the feature moves into the device package. A stale one once left the GPU unbound. The same goes for a package's own modprobe file copied to/etc/modprobe.dby hand: a file there replaces the package's/usr/lib/modprobe.dfile of the same name, so the package's later changes never apply. - Don't unload a bring-up module to retry unless its exit path is known good. On cheetah,
rmmodof the AoC modules left freed drivers on the platform bus, oopsed the deferred-probe worker and hung every shutdown after it. Reboot instead.
# Kernel: defconfig + kernel/configs/omamobile.config (+ device/<codename>/kernel.config), built in the container
bin/omamobile kernel # Image, DTBs, modules into $KERNEL_OUT
bin/omamobile modules # stripped modules tarball for the Arch root
bin/omamobile initramfs # Alpine + dropbear + the shared initramfs/init
bin/omamobile images # boot, init_boot, vendor_boot, vendor_kernel_boot, dtbo
# A first install: packages, root image, then the installer (phone in fastboot)
tools/build-packages # [omamobile] for aarch64 into out/repo, signed
tools/build-rootfs # out/omamobile-rootfs-<device>-<date>-aarch64.img.zst
tools/install-phone --dry-run # checks, questions, the exact commands; then without --dry-run
# after the first boot: a read-only backup of the modem's partitions into DIR (REINSTALL-RUNBOOK 4a)
tools/phone-provision --first-install --nv-backup DIR FACTORY.zip # firmware and per-phone data
# Phone in fastboot (developer loop, or when Linux won't boot)
bin/omamobile fastboot # get there without buttons, if possible
bin/omamobile flash # flash the five *_b images, set slot B active, boot
# Phone running our Linux (normal loop: no fastboot)
bin/omamobile push # modules-push if needed, write slot B over SSH, verify, reboot
bin/omamobile modules-push # modules only, no reboot
tools/phone-ssh <command> # root@172.16.42.1 over USB
tools/phone-mirror # the phone's screen in a window here, mouse and keyboard included (omamobile-mirror)-
An SSH key that needs a touch per connection (a security key): set
OMAMOBILE_SSH_SHARE=1, andtools/phone-ssh(sopushtoo) shares one connection and asks once. Check that SSH still works after a USB or firewall step withtools/phone-ssh --fresh, which never shares. -
An explicit SSH connection: set
OMAMOBILE_SSH_HOST(user@host),OMAMOBILE_SSH_KEY(identity file) orOMAMOBILE_SSH_KNOWN_HOSTS(strict host-key checking with that file).OMAMOBILE_SSH_HOST_KEY_ALIASselects the name in the known-hosts file when native Linux and recovery share the USB address but have different keys. These options need Python 3 and keep shared connections separate for each target, identity, known-hosts file and host-key alias. -
To pin the phone's host key: set
OMAMOBILE_SSH_KNOWN_HOSTS=tofu. The first call records the key of whoever answers at the USB address inomamobile/phone-ssh/known_hostsunder$XDG_DATA_HOME(else~/.local/share), and a later call refuses a changed key. It is opt-in because more than one server answers there by design: a call made while the initramfs'sdropbearis up pins a key that is new at every boot, so pin from the installed system, and delete the file to start over after a reinstall. It needs Python 3, and keeps its shared connections apart from unpinned ones. -
The device comes from
DEVICE(defaultcheetah, inomamobile.conf) and its descriptordevice/<codename>/device.conf:DEVICE=<codename> bin/omamobile images. How builds and releases work for several devices: docs/RELEASES.md. -
One worktree per subsystem branch. Each branch gets its own output directory (
KERNEL_DIR=~/omamobile-kernel/wt-gnss KERNEL_OUT=~/omamobile-kernel/out-gnss bin/omamobile kernel), so builds don't step on each other. -
The kernel command line goes in the DTB (
/chosen/bootargs), not invendor_boot: the Pixel bootloader (ABL) ignores the vendor_boot cmdline. -
Building a DTB with a bring-up overlay (the helper the runbooks use):
O=$KERNEL_OUT D=$O/arch/arm64/boot/dts/exynos/google/gs201-cheetah.dtb ov() { # ov NAME...: rebuild the DTB from default + overlays, then images cp -n "$D" "$D.default"; local o= n for n; do $O/scripts/dtc/dtc -q -I dts -O dtb -o out/$n.dtbo device/cheetah/overlays/$n.dtso; o="$o out/$n.dtbo"; done $O/scripts/dtc/fdtoverlay -i "$D.default" -o "$D" $o bin/omamobile images } # rollback: cp "$D.default" "$D"; bin/omamobile images && bin/omamobile push
Don't rely on the applied node order: where a driver numbers things by node order (an ASoC card numbers its PCMs by DAI link order), make the driver order them explicitly.
-
Packages build natively on the phone:
tools/phone-install-package packages/<name>builds one with makepkg and installs it with pacman. The maintainer publishes the signed[omamobile]repository withtools/build-packages(built on the laptop, in an Arch Linux ARM container under qemu-user; no phone needed, the default) andtools/repo-push.tools/repo-buildbuilds on a connected phone instead, an opt-in shortcut for the packages that take hours under qemu (Mesa, Hyprland, libcamera). -
Shell UI can be developed on the desktop in a nested Hyprland:
phone/dev/run-desktop(phone/README.md). -
Getting Arch onto
userdata(an ext4 Arch Linux ARM root with Omarchy's packages, which the initramfs hands over to):tools/build-packagesfillsout/repo,tools/build-rootfsbuilds the root image from it, andtools/install-phone(phone in fastboot) asks for the user name, password, Wi-Fi and SSH key, writes them into a local copy of the image, and flashes only slot B's boot images anduserdata. On the first boot the initramfs grows the image to the whole partition andomamobile-firstbootcreates the user and runs Omarchy's setup; then, after a read-only backup of the modem's partitions (REINSTALL-RUNBOOK section 4a),tools/phone-provision --nv-backup DIR FACTORY.zipputs back Google's firmware (from your own factory image) and the phone's own data (the NV checksums from that backup, the modem's board id from the phone's bootconfig).--dry-runshows every command first. Flashinguserdataerases stock Android's data: slot A will need a factory reset if you ever boot it again. The full gated procedure: REINSTALL-RUNBOOK; the design: docs/RELEASES.md §6.
The order below is the one that worked for cheetah. Expect each step to take longer than you think.
On stock Android, before you change anything:
bin/omamobile capture <codename>-stock # over adb; or in fastboot: getvar all- Without root this saves
getprop, the partition list (/dev/block/by-name), cpuinfo, meminfo, the kernel command line and the vendor module list. - With root it also saves
/sys/firmware/fdt(the live device tree, which is what the bootloader actually handed the kernel, overlays included),dmesg,/proc/iomem,/proc/interrupts,/proc/modulesand the vendor firmware list. Get root from a userdebug LineageOS build (bin/lineage-ref) or your usual root method. - Decompile the device tree with
dtc -I dtb -O dts live.dtb > live.dts. - Run
fastboot getvar allin fastboot as well: it gives partition sizes, slot state and bootloader versions. - The cheetah captures behind every plan were made exactly this way. The plans cite them as
R/live.dts:<line>,R/iomem.txtand so on. - Captures contain serial numbers, the IMEI and MAC addresses. Keep them in
~/android/reference/, never in the repository. When you need a fact from one in a commit or a plan, quote the fact, not the file.
| Your device | SoC | Start from |
|---|---|---|
| Pixel 7, 7a, Fold, Tablet | gs201 (Tensor G2) | our gs201.dtsi and every gs201 driver; mostly a board DTS |
| Pixel 6, 6 Pro, 6a | gs101 (Tensor) | upstream mainline gs101.dtsi, gs101-oriole.dts and gs101-raven.dts; much of our gs201 work was ported from gs101 |
| Pixel 8, 8 Pro, 8a | zuma (Tensor G3) | under way on the Pixel 8 Pro (husky): zuma's PMU, watchdogs, USB PHY and pin controllers are in linux-omamobile, the device tree is in review; use gs201 as the pattern for the rest |
| Pixel 9 family | zumapro (Tensor G4) | under way on the Pixel 9a (tegu): its UFS host and PHY, core clocks, pin controllers, ACPM, SPI chip selects, the GPU's cache hash and the inherited display are in linux-omamobile; the board DTS isn't public yet |
| Pixel 10 family | laguna (Tensor G5) | not started; a new SoC vendor generation, expect more differences |
The same SoC does not mean the same board. The panel, touch controller, PMIC rails, GPIO assignments, battery model and firmware names all differ between phones. Never copy interrupt numbers between SoCs: gs201's GIC SPIs differ from gs101's, and gs201's EINT numbering even skips EINT19.
- The board DTS lives in the kernel repository (linux-omamobile), not here. Start from the SoC
.dtsi(arch/arm64/boot/dts/exynos/google/gs201.dtsiorgs101.dtsi) and from the live stock DT. Add<soc>-<codename>.dtswithcompatible = "google,<soc>-<codename>", "google,<soc>", plus its entry inDocumentation/devicetree/bindings/arm/google.yaml. - Read BRINGUP-M1.md §1 (the boot chain) and §4 (the minimal DTS) first. The Pixel bootloader has rules of its own:
- It picks the base DTB by
/soc_id(gs101, gs201; ship one copy per silicon revision) or by the children of/soc_compatible(zuma, and gs201's IPOP package on the Pixel 7a; one DTB carries them all; descriptor keySOC_COMPATIBLE). - It requires
/chosen/bootargsand an empty/ectnode. - It applies a board
dtbokeyed byboard_id/board_rev. Ship a trivial one with your device's IDs (fromgetprop ro.boot.dtbo_idxand the stockdtbo.img). - It applies a debug-policy overlay from the
dpmpartition, so build with-@and add the label stubs it targets. - It injects
/memoryand the framebuffer carve-out itself. - It leaves the cluster watchdogs running, which resets the phone after about 60 s unless a watchdog driver takes them over.
- It picks the base DTB by
- Check every stock
reserved-memorynode against/proc/iomem. Firmware that writes into RAM the kernel thinks is free corrupts data silently. Mind the cell sizes: on gs201 eachregentry is 12 bytes, and a wrong length makes the kernel ignore the property without a word. - Write the device descriptor,
device/<codename>/device.conf, starting from cheetah's: the DTB name, thesoc_idvalues (from the live DT andfastboot getvar all), the board dtbo source and itsboard_id/board_rev, the boot images the phone has (fastboot getvar alllists the partitions; older Pixels lackinit_bootandvendor_kernel_boot), the storage-guard allowlist and the panel size. Then everybin/omamobilecommand takes the device from the environment:DEVICE=<codename> bin/omamobile images. docs/RELEASES.md §3 describes each key and whatbin/omamobilechecks. The allowlist (UFS_RW) may only name the slot B boot images (boot_b,init_boot_b,vendor_boot_b,vendor_kernel_boot_b,dtbo_b) anduserdata, must holduserdataand everyBOOT_IMAGESentry, and the build refuses anything else. - The initramfs
initis shared (initramfs/init). Do not copy it. SetINITRAMFS_INIT=/initramfs/init. The display trigger isSIMPLEFB_TRIG_CON="0xADDR 0xVALUE"in the descriptor, one or more pairs on that one line.bin/omamobile initramfswrites each pair into the image, and the init runs them only when the board's first compatible string matches the descriptor'sCOMPATIBLE. Leave the key unset and the init writes no display register. Never put another phone's address in the descriptor.probe()runs only whenBRINGUP_PROBE=1and the board's first compatible string matchesCOMPATIBLE. Those reads cover every display DMA channel, so leave the key unset until this phone's panels are driven.bin/omamobile initramfspacksUFS_RWinto the image as well, and the init's storage guard reads it at boot; a missing or malformed list leaves every partition read-only (bin/omamobile initramfs-config <dir>shows what gets packed). The USB gadget's product string isUSB_PRODUCT, orNAMEwithout it. The rest of the per-device init (the main LUN) is still step 2 of the release track (ROADMAP §3.8).
Each stage has a plan document for cheetah. Use it as the map and the template for your device.
| # | Stage | What "works" means | cheetah plan |
|---|---|---|---|
| 1 | First light: kernel boots from slot B, console on the bootloader's framebuffer (simple-framebuffer), USB gadget networking, SSH, watchdogs handled, panic=10 |
ssh root@172.16.42.1 |
BRINGUP-M1.md |
| 2 | Clocks, pinctrl, storage: the SoC clock driver, then UFS with the read-only guard, then the Arch root on userdata |
Arch boots from UFS | BRINGUP-M1.md, NOTES.md |
| 3 | Touch and buttons (SPI/I2C touch controller, gpio-keys) |
Hyprland sees touch, evtest sees keys |
NOTES.md |
| 4 | GPU: Panthor plus the Mesa model-table patch (packages/mesa) |
Hyprland renders on the GPU | GPU-PLAN.md |
| 5 | Display: simpledrm, then a DSI command path (brightness), then a flip-only KMS driver and the panel's high refresh rate | brightness slider, 120 Hz, DPMS | DISPLAY-PLAN.md |
| 6 | I2C, fuel gauge, battery model | correct capacity and temperature | WIFI-BATTERY-PLAN.md B1 |
| 7 | Wi-Fi (PCIe controller, brcmfmac, DMA confinement) | connects, no hangs | WIFI-BATTERY-PLAN.md W1-W4 |
| 8 | Bluetooth (UART, hci_bcm) | pairing, A2DP audio | BLUETOOTH-PLAN.md |
| 9 | Haptics and torch | feedbackd buzzes, torch tile | HAPTICS-TORCH-PLAN.md |
| 10 | ACPM (the firmware power manager): GPU DVFS, PMIC, thermal | GPU scales | ACPM-PLAN.md |
| 11 | CPU idle, UFS power | measured drain drops | POWER-PLAN.md |
| 12 | USB-C and charging (TCPC, role switch, charger, temperature guard) | replug works, charges safely | USB-C-PLAN.md |
| 13 | Suspend (s2idle, then deep sleep) | sleeps and wakes on Power | SUSPEND-PLAN.md |
| 14 | AoC (audio and sensor DSP, started through the GSA and Trusty), then sensors, then speakers and mics | services online; auto-rotate; sound | AOC-PLAN.md, USF-PROTOCOL.md, AUDIO-PLAN.md |
| 15 | GNSS, NFC, modem, cameras | a fix; calls and data later | RADIOS-CAMERA-PLAN.md, GNSS-PLAN.md, MODEM-PLAN.md |
| 16 | Fingerprint (Trusty, the RPMB, Google's HAL in a chroot) | unlocks Omarchy's lock | FINGERPRINT-PLAN.md, FINGERPRINT-RESEARCH.md |
Stages 1-5 make a usable phone on a desk. After stage 2, most stages are independent of each other, so pick what you care about.
Write device/<codename>/<SUBSYSTEM>-PLAN.md before you write code. Every cheetah plan has the same shape:
- Status line (dated): which branch and worktree, what was built, what has run on the phone.
- Goal, in order of value.
- Path abbreviations for citations (
G/= Google's GPL kernel,R/= your stock capture,L/= our kernel). - Facts with evidence. Each is marked [V] (checked, with
file:line) or [I] (an inference to check on the device). - Design and options, with the reason for the choice.
- What was built: a table of kernel commits and repo changes.
- Risks, and what would hurt the phone.
- A gated runbook. Each step lists the commands, Expect/Pass, a stop condition, a Rollback and a risk level. Read-only steps come first.
- Results, appended with dates and the kernel release that produced them, plus open questions.
Findings that matter beyond one subsystem go into device/<codename>/NOTES.md, newest first.
| Change | Repository | Branch or path |
|---|---|---|
| Kernel: drivers, bindings, DTS | derekross/linux-omamobile | fork it, branch off omamobile, one subsystem per branch (omamobile-<subsystem>, e.g. omamobile-gs101-oriole-dts), and open a pull request against omamobile |
| Device notes, plans, descriptor, bring-up overlays | this repository | device/<codename>/ (descriptor device.conf), overlays in device/<codename>/overlays/ |
| Device support package | this repository | packages/omamobile-device-<codename>/ |
| Shell, sensors, GNSS, Mesa, Hyprland | this repository | packages/<name>/ |
| Omarchy changes | upstream Omarchy first | patches/omarchy/ while they wait |
| Tools | this repository | tools/, bin/ |
Device tree nodes go in the kernel; overlays only switch them on. A new block (a sensor, a regulator, a bus) is described in the board DTS in linux-omamobile with status = "disabled", next to its binding and driver. The .dtso files in this repository's device/<codename>/overlays/ only set nodes to "okay" (and add bring-up-only tweaks) for one gated test boot; once a node is proven, it is enabled in the DTS itself and its overlay goes away. A driver, binding or DTS change never belongs in this repository, and a bring-up overlay never belongs in the kernel.
-
One subsystem per branch. Inside it, one logical change per commit, in upstream order:
dt-bindings:first, then the driver, thenarm64: dts:. Each commit must build. -
Prefixes follow
git log --oneline <file>for the files you touch, for exampleclk: samsung: gs201: …,arm64: dts: exynos: google: gs201-cheetah: …,dt-bindings: soc: google: …. -
Messages explain why, with evidence: the stock DT line, Google's GPL source, and what was measured on the phone. Use the imperative mood and wrap at 72 columns.
-
Checks before you open a PR:
scripts/checkpatch.pl --stricton each patch;- a build with
W=1and no new warnings; make dt_binding_check DT_SCHEMA_FILES=<your schemas>;make CHECK_DTBS=y W=1 exynos/google/<soc>-<codename>.dtb(ordt-validate), with no new warnings, also with your bring-up overlays applied.
The plans record these results (for example HAPTICS-TORCH-PLAN.md).
tools/kernel-pr-check --build OUT --merge BASEin this repository runs the sign-off, prefix, checkpatch and identifier checks on your branch's commits and theW=1,dtbs_checkanddt_binding_checkbuilds on your branch merged onto the current base, comparing device-tree warnings against that base; CI and the review run it the same way. If it says "rebase needed", rebase ontoomamobile. -
Shared drivers leave the Pixel 7 Pro as it is. Most drivers serve several phones: the display engine and DSI, the Synaptics touch controller, Broadcom Wi-Fi, the NFC core, UFS, ACPM, the PMU. The reference phone runs them every day, so put new behaviour behind your SoC's or board's match data (a compatible string, a per-SoC table entry, a quirk flag), and show in the pull request that cheetah's code is unchanged: identical objects, or, where a flag is tested inside a shared function, a per-function diff showing that only your SoC's path changes. Remember that per-SoC data also reaches every board that binds it through a fallback compatible. A change that alters the Pixel 7 Pro on purpose needs a reason that holds there too (a bug it also has, with the evidence) and merges only after it has run on that phone.
-
New hardware is
disabledby default. A separate, later commit turns it on once it has passed on the phone. One exception: a board node whose pins, flags and driver are already proven on another phone with the same SoC (the Pixel Fold's volume keys, wired as the Pixel 7 Pro's) may be added enabled in one commit, once it has passed on your phone; say which phone's node it matches. -
Code imported from Google's GPL tree keeps its copyright and is marked as such. Port it to upstream APIs and style before proposing it for
omamobile. -
Sending upstream: the published
omamobilebranch sits on one squashed commit that holds the tree of the upstream tag (seetools/publish-kernel). Rebase your commits onto the real tag (git rebase --onto v7.3-rc6 <squashed base>), runscripts/get_maintainer.pl, and followDocumentation/process/submitting-patches.rst. -
Sign-off and AI tools. Upstream needs your own
Signed-off-by:(the DCO). If an AI assistant helped, followDocumentation/process/coding-assistants.rst: the human signs off, the AI never does, and its help is credited with anAssisted-by:tag.tools/kernel-pr-checkandtools/publish-kernelfail a commit without its author's human sign-off, but aCo-Authored-By:trailer only draws a warning (the maintainer's decision, 2026-11-02): AI may assist; a human tests, verifies and signs off.
- Commit subjects name the area, then say what changed:
omamobile-gnss: package GNSS with location on demand,device-cheetah 0.1.15: reconnect USB after a replug,shell 0.1.17: …,DISPLAY-PLAN: D3b-1b result, …,NOTES: …. When a commit changes a package, bump itsversionfile and put the new version in the subject. - Bodies explain the why and what was tested. Wrap at 72 columns. If an AI assistant co-wrote the commit, end with a
Co-Authored-By:trailer, as the history does. - Every file has an SPDX header (§7).
- Describe what something is built from, not which other project it's based on. Docs, the README, device notes and the website don't name or compare other mobile Linux projects or distributions: say "Arch Linux ARM with the
linux-megikernel", not "based on X". Citing a properly licensed source for a fact (upstream Linux, Google's GPL kernel, postmarketOS, Mesa, Omarchy) is fine, and expected. - Packages follow the existing layout:
PKGBUILD,install,version,README.md, andtest/all, which must pass. Device packages are namedomamobile-device-<codename>. Nothing in them is enabled unless it's safe at boot, with hang markers where needed. - Keep identifying data out. No Wi-Fi names, MAC or Bluetooth addresses, serial numbers, IMEIs, account names or captures: use placeholders such as
<SSID>. Screenshots must not show any of these either. - Open a PR with what you ran on the phone, the kernel release, and the plan section it follows, after the checks and the smoke test in §6.5. Kernel PRs go to your fork's topic branch against linux-omamobile's
omamobile; everything else to this repository'smain. A new device's first PR here is usually itsdevice/<codename>/device.confand notes (§5).
Add a row to docs/DEVICES.md in the same PR as your device notes. Only claim "works" for what you've verified on your own phone, and link the notes entry that shows it.
Every pull request runs the same checks in CI (.github/workflows/checks.yml), and a reviewer looks at a PR only once they pass. Run them yourself first; none needs a phone:
tools/pr-check origin/main # no identifiers, no blobs, no AI Signed-off-by, scripts parse
tests/all # the installer, the images, the storage guard and the rest
tests/packages # every package's own test/all (or name the ones you touched)Then run the smoke test on your own phone, booted into the build your change is in:
tools/phone-smoke # from the laptop, over tools/phone-sshIt is read-only and safe on a phone in use: no writes, no register reads, no sound, vibration or torch. It checks the boot slot, the storage guard, the root on userdata, kernel health, USB, the session, and then the display, GPU, touch, buttons, Wi-Fi, Bluetooth, battery, sound cards, sensors and cameras as evidence, with the units that failed in this boot and, from the journal, on the install's first boot. Its report names no phone (no serial, MAC, SSID or command line). Paste the report into the pull request, with the plan steps your change passed. A change to a package, the kernel or a device needs a report from the phone it affects; a change to docs or tools that never runs on a phone doesn't.
A pull request that touches a device also states which phone it was tested on. We can't check that you own the phone, so we rely on you: say exactly what ran, what didn't, and what you didn't test.
The pull request template (.github/pull_request_template.md) has the checklist.
-
This repository is MIT (LICENSE), except where a file's SPDX header says otherwise. That covers the tools, packages, docs, bring-up overlays, the initramfs and the fingerprint and GNSS chroot pieces. Packages that are installed on their own also carry their own MIT
LICENSE. Every file of ours starts with an SPDX header; new files getSPDX-License-Identifier: MIT. -
Kernel patches are GPL-2.0 (
GPL-2.0-only, or whatever the subsystem uses), and so are the DTS files that go into the kernel. In this repository, the boarddtbosource (cheetah-m1-overlay.dts) is GPL-2.0-only for the same reason. -
Exceptions keep their upstream licence:
- the port of Google's Apache-2.0 boot-control code keeps that licence and Google's notice (
omamobile-bootctl.c, withLICENSE.Apache-2.0beside it); - PKGBUILDs derived from Arch's are 0BSD;
- patches to Mesa, Hyprland and Omarchy are under those projects' licences;
- a package can be GPL-3.0 as a whole, because it is built on GPL-3.0 sources or because its author chose that licence, as the apps (
omacam,omatel,omaphone,omamessages) and the keyboard layouts inomamobile-shellare. It is a program of its own in its ownpackages/<name>/folder: the PKGBUILD'slicense=says so, the licence text is beside it (COPYING), every upstream copyright and licence notice stays in the files and patches it came with, and its README names the upstream project and version. Nothing from it is copied into, or linked with, the MIT tools and packages; they may start it or talk to it as a separate program.
- the port of Google's Apache-2.0 boot-control code keeps that licence and Google's notice (
-
Only use code from properly licensed sources. Google's GPL kernel, upstream Linux, postmarketOS and Mesa are fine. Leaked or unlicensed code is not, and neither is decompiled proprietary code: describe protocols (as USF-PROTOCOL.md does), don't copy code.
-
Google's proprietary firmware and binaries are never committed, attached or redistributed. That covers Wi-Fi, Bluetooth, haptics, AoC and GNSS firmware, vendor HALs and libraries, calibration and tuning files. Our scripts take them from the user's own factory image on the user's own machine:
tools/extract-vendor-firmware: firmware, renamed to what mainline drivers request;tools/extract-vendor-chrootandtools/extract-fingerprint-vendor: the minimal Android trees for the GNSS and fingerprint chroots, with aMANIFESTof checksums.
A new device adds its own mapping to these scripts, not the files.