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
80 changes: 80 additions & 0 deletions device/oriole/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,80 @@ Sources:
- `U/`: upstream Linux v7.0, `arch/arm64/boot/dts/exynos/google/gs101*.dts(i)`.
- `P/`: postmarketOS pmaports [`device/testing/device-google-oriole`](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/main/device/testing/device-google-oriole), [`soc-google-gs101`](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/main/device/testing/soc-google-gs101) and [`linux-postmarketos-gs101`](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/main/device/testing/linux-postmarketos-gs101) (7.0.6), which builds [gs101-mainline/linux @ d28cfa42](https://github.com/gs101-mainline/linux/tree/d28cfa4275b95e93f4b7a1e743de31b723bd21b8).

## 2026-11-08: offline audit of omitted startup safeguards

[V, recovered private checker and unit] The companion's boot check is gated
by `omamobile.oriole-staged`, requires private initramfs assets and an armed
handoff-watchdog process, and checks protected storage, the compositor,
shell IPC and staged touch state. Only after success does it disarm the
watchdog, record the kernel release and clear the persistent boot-in-progress
marker. The matching staged initramfs uses a leftover marker for guarded USB
rescue before providers. This is Linux startup/recovery state, not ABL
boot-success marking: the checker does not write boot metadata. Its private
paths, touch interface and rendering assumptions prevent treating it as a
generic public device-package service.

[V, recovered configuration] The companion separately retains cheetah's
`RebootWatchdogSec=1min`. The checker requires an open `/dev/watchdog0` and
checks disarm, but source prerequisites are not a public-kernel binding or
shutdown-reset test. No such standalone qualification was established by
this offline audit. Neither watchdog mechanism certifies slot success.

The README and descriptor now explicitly say that an image with this package
alone is not yet a supported install. Public startup/recovery integration and
its hardware qualification remain separate work. No private services,
battery code, boot-success writes or watchdog configuration were added;
no phone access or new hardware result is claimed.

## 2026-11-07: first-light 0.2.0 package installed with local safeguards

[V] Native `makepkg` build/check/package passed for `0.2.0-1` on the Pixel 6.
The build used a separate `BUILDDIR`, preserving the package's source tree
during makepkg clean-build preparation. Version 0.2.0 satisfies the existing
hardware packages' minimum device-package dependencies; a 0.1.0 transaction
was rejected by the normal dependency check before any package changes.

[V] On `7.3.0-rc6-oriole-hsi1-late-dev0-g4bd35d34abb9-dirty`, normal signed
`pacman -U` installed `omamobile-device-oriole 0.2.0-1` together with a private
`omamobile-oriole-local-safeguards 0.1.9-2` package. The latter preserves the
original boot-check/battery scripts and units, power-key policy and reboot
watchdog policy byte for byte. It is not part of this public package or a
standalone-image qualification. All archive signatures were verified against
the existing phone keyring; dependency, signature and hook checks stayed on.

[V] Fresh SSH, safeguard hashes, package ownership, enabled units, repository
configuration/channel and pacman database checks passed. The existing local
mirrorlist was retained, with the incoming default saved as `.pacnew`. A
laptop kernel log, owned marker and bounded rollback timer covered the
transaction; systemd's supported update marker prevented a udev retrigger.
The timer and only this test's markers were cleared after validation.

[V] `phone-smoke` passed every required check: slot B, 49-partition storage
guard, root, kernel health, USB and session. It still reported existing
error-level kernel messages and the backlight/NFC low-battery startup
refusals. Battery reported 70% Charging. No kernel fault was observed in the
transaction log. No reboot, flash, provider retry or shell restart occurred.
Rollback ownership transfer passed offline; live rollback and a boot of this
package combination remain untested. Do not replace an integration package
with this public package alone.

## 2026-11-07: first-light package native staging check

[V] Package source at `d32957dc3feb` passed `test/all` on the Pixel 6
(`aarch64`), running
`7.3.0-rc6-oriole-hsi1-late-dev0-g4bd35d34abb9-dirty`. The reboot helper
compiled and installation into a temporary directory passed the file,
USB-route, coldplug and disabled-sleep checks. Temporary files were removed.
The package was not installed; `omamobile-device-oriole 0.1.9-2` remains.

[V] A separate baseline `phone-smoke` report passed the required boot,
storage, root, kernel-health, USB and session checks. It also reported new
error-level kernel messages and failed backlight/NFC units; both units
reported `Battery outside development limits`. This is not a clean report
or an exact-package boot qualification. The first-light package omits the
installed boot-check, battery and reboot-watchdog safeguards, so replacing
the integration package still needs a qualified migration and rollback.

## 2026-10-31: build provenance and recovery limits

This describes the unpublished stack in the October 30 smoke report. It is
Expand Down Expand Up @@ -126,6 +200,12 @@ helper's logic or from a later backup. No new metadata write was attempted.
- [V, source] On the published kernel's `omamobile` branch, the S2MPG10 alarm callback reads `S2MPS14_REG_ST2` at offset `0x08`. On S2MPG10 that is `INT3M`; [Google's register definitions](https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/include/linux/mfd/samsung/s2mpg10-register.h) place `STATUS2` at `0x0d`, and its [RTC driver](https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/rtc/rtc-s2mpg10.c) reads the alarm-0 status bit there. The proposed kernel fix, [linux-omarchy-mobile#149](https://github.com/derekross/linux-omarchy-mobile/pull/149), is S2MPG10-specific; the S2MPG12 path remains unchanged. The test phone's unpublished kernel already contains the correction.
- [I] The smoke test does not exercise a live pending alarm, alarm delivery, suspend or wake. Those paths remain to be independently verified.

## 2026-10-17: coldplug audit on the first-light kernel

[V] On `7.3.0-rc6-omamobile-oriole-firstlight-g4bd35d34abb9-dirty`, a read-only audit of unbound platform, I2C and SPI devices found module matches for `clk_acpm`, `max77759_charger`, `gpio_max77759`, `arm_dsu_pmu`, `at24` and `max17042_battery`. The local device policy blocked both alias autoload and direct modprobe; dry runs confirmed the refusals. The audit did not load any of these modules, so it does not establish what each would do when loaded. These blocks are conservative bring-up policy, not proof of individual driver failure.

[V] The local native integration later used a separate experimental read-only `oriole-battery-readonly` provider, publishing `omamobile-battery`, to report battery telemetry; it did not use `max17042_battery`. Its kernel charging status remained Unknown. UPower inference and a separate charger-status observation do not establish charging control or prove that the upstream charger driver is safe. The public package contains neither that experimental provider nor its startup service; battery reporting is not guaranteed by this policy package.

## 2026-10-16: stage 0, part 2: a retail Pixel 6 (stock, bootloader locked)

Read-only queries (`adb shell getprop`, `/dev/block/by-name`, `fastboot getvar all`) of a stock phone; facts only, no serial numbers.
Expand Down
2 changes: 2 additions & 0 deletions device/oriole/device.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ NAME="Pixel 6"
SOC=gs101
# First string of the upstream DT root compatible (gs101-oriole.dts).
COMPATIBLE="google,gs101-oriole"
# This package alone is not yet a supported install: images omit the private
# staged-start/recovery safeguards. See packages/omamobile-device-oriole/README.md.
PACKAGE=omamobile-device-oriole

# --- Kernel and device tree ---
Expand Down
21 changes: 21 additions & 0 deletions packages/omamobile-device-oriole/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.
19 changes: 19 additions & 0 deletions packages/omamobile-device-oriole/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: MIT
pkgname=omamobile-device-oriole
pkgver=$(cat "${startdir:-.}/version")
pkgrel=1
pkgdesc="Pixel 6 first-light support: storage policy, USB networking and boot helpers"
arch=(aarch64)
url="https://github.com/derekross/omarchy-mobile"
license=(MIT)
depends=(bash systemd util-linux omamobile-keyring)
provides=(omamobile-device)
conflicts=(omamobile-device)
install=omamobile-device-oriole.install
makedepends=(gcc)
checkdepends=(python)
backup=(etc/UPower/UPower.conf.d/20-omamobile-critical-power.conf etc/pacman.d/omamobile-mirrorlist)

build() { "$startdir/build" "$srcdir/build"; }
check() { "$startdir/test/all"; }
package() { "$startdir/install" "$pkgdir" "$srcdir/build"; }
80 changes: 80 additions & 0 deletions packages/omamobile-device-oriole/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!-- SPDX-License-Identifier: MIT -->
# Pixel 6 first-light policy

**This package alone is not yet a supported Pixel 6 install.** An image
built from `device/oriole/device.conf` receives this package without the
private integration safeguards described below. Do not use that image as a
standalone installation or replace an integration package with it alone.

Minimal first-light policy package, version 0.2.0. No kernel, rootfs integration or
hardware qualification is supplied. Installation stages files only and enables
no services. The optional system setup command configures locale/time and
enables timesyncd.

Portable helpers, build script, USB network policy and storage udev policy
come from the cheetah package. The storage rules continue an existing
initramfs guard: they do not set partitions read-only themselves. A guarded
initramfs and matching kernel remain prerequisites. USB gadget creation and
networkd activation are also external prerequisites. USB has fallback metric
2000, below ordinary Wi-Fi preference.

All four sleep modes are disabled. UPower selects PowerOff on critical
battery. Coldplug blocks alias and explicit modprobe for clk_acpm,
max77759_charger, gpio_max77759, arm_dsu_pmu, at24 and max17042_battery.
The [coldplug audit](../../device/oriole/NOTES.md) found matching unbound devices and confirmed that
modprobe dry runs refused these modules; it did not load them or establish
their behavior. This package does not qualify the underlying hardware.
Built-in drivers are outside modprobe policy.

No battery startup, staged boot checker, automatic boot-success, radio,
charging or GS201 hardware services are included. Boot-control tooling is
omitted while slot marking remains on hold. Native ARM64 build and
installation passed with a private companion preserving
existing integration safeguards; see the 2026-11-07 entries in
[NOTES](../../device/oriole/NOTES.md). Standalone installation and a boot of
this package combination remain unqualified.

The PowerOff action has not been qualified for oriole; Linux power-off on other
Pixels can restart instead.

Run test/all for a native helper build and
staged installation checks. Version 0.2.0 sorts above the local integration
package 0.1.9-2, satisfying existing hardware-package version dependencies.
That integration package carries
boot and battery safeguards absent here. Replacing it requires a separately
qualified migration and rollback; do not remove it as a routine upgrade.

## Omitted startup safeguards and boot-success marking

The private companion's boot check is a staged-start guard, not a slot-success
marker. Its opt-in unit requires private initramfs assets, a matching kernel
and a bounded handoff-watchdog process. It checks protected storage, the
compositor, shell and staged touch state before disarming that watchdog and
clearing the persistent boot-in-progress marker. The matching initramfs uses a
leftover marker to select guarded USB rescue before starting providers.
The checker writes Linux state files; it does not mark slot B successful or
write boot metadata. See the [guard audit in NOTES](../../device/oriole/NOTES.md).

Those private assets and the companion's battery/startup policy are not a
portable device-package service. A supported standalone image needs a public,
matched startup/recovery path and its boot qualification first; this PR does
not import the private stack or enable services to approximate it.

Boot-success marking is separate and remains outside this package, pending
[#252](https://github.com/derekross/omarchy-mobile/issues/252) and Oriole's
qualification. On an unmarked B slot, ABL can exhaust its retry budget
(normally three attempts) and select A. The staged-start guard does not reset
that budget. With native Linux on userdata, selecting stock A is not a usable
Android recovery without deliberate userdata restoration; do not rely on an
automatic stock fallback. If stock Android does come up, decline any offer
to reset and take fresh read-only backups of the protected radio partitions
after any stock boot (`efs`, `efs_backup`, `modem_userdata`, `persist` and
`modem_a/b`) before further radio work.

The private companion also preserves `RebootWatchdogSec=1min`. That setting
only bounds a stuck shutdown when a usable watchdog driver is bound; it does
not replace the startup guard or mark a slot successful. The recovered checker
requires an open `/dev/watchdog0` and verifies disarm, but this audit does not
establish a watchdog-binding/shutdown-reset qualification for a standalone
public-kernel image. The copied cheetah setting is therefore deferred with the
other omitted safeguards, rather than presented as a qualified recovery path.
18 changes: 18 additions & 0 deletions packages/omamobile-device-oriole/bin/omamobile-setup-system
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Oriole's system setup: locale and time only, with no hardware services.
set -euo pipefail

[[ $(id -u) == 0 ]] || { echo "Run as root" >&2; exit 1; }
if [[ -n ${1:-} ]]; then
[[ $1 =~ ^[A-Za-z0-9_+-]+(/[A-Za-z0-9_+-]+)*$ && $1 != *..* &&
-f /usr/share/zoneinfo/$1 ]] || { echo "Invalid time zone" >&2; exit 1; }
fi

sed -i 's/^#\(en_US.UTF-8 UTF-8\)/\1/' /etc/locale.gen
locale-gen >/dev/null
printf 'LANG=en_US.UTF-8\n' > /etc/locale.conf
if [[ -n ${1:-} ]]; then
ln -sfn "/usr/share/zoneinfo/$1" /etc/localtime
fi
systemctl enable systemd-timesyncd.service >/dev/null
8 changes: 8 additions & 0 deletions packages/omamobile-device-oriole/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Compile the C tools 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:-}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: MIT
# Unsupported sleep modes are disabled. UPower 1.91.5's Auto policy can
# select Ignore when CanSleep is unavailable; keep depletion protection.
# Oriole power-off has not been qualified and may restart the phone.
[UPower]
CriticalPowerAction=PowerOff
18 changes: 18 additions & 0 deletions packages/omamobile-device-oriole/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
25 changes: 25 additions & 0 deletions packages/omamobile-device-oriole/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Stage files only. No service activation or boot-success writes.
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; }
for tool in reboot-to; do
install -Dm755 "$build/$tool" "$destination/usr/bin/$tool"
done
for tool in omamobile-setup-system; do
install -Dm755 "bin/$tool" "$destination/usr/bin/$tool"
done
while IFS= read -r -d '' file; do
install -Dm644 "$file" "$destination/usr/lib/${file#vendor/}"
done < <(find vendor -type f -print0)
while IFS= read -r -d '' file; do
install -Dm644 "$file" "$destination/etc/${file#config/}"
done < <(find config -type f -print0)
install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist"
for file in LICENSE; do
install -Dm644 "$file" "$destination/usr/share/licenses/omamobile-device-oriole/$file"
done
install -Dm644 version "$destination/usr/share/omamobile/device-oriole/version"
Loading