Commit Graph
122 Commits
Author SHA1 Message Date
kanoqwq db4e5d2a14 feat(dashboard): backport verified controls and USB LAN management
Add task-based lock verification, traffic reset, AP-aware hotspot control and USB state/ownership policies. Preserve platform boot, AT and hotplug contracts; include translations, packaging inventories and regression fixtures.
2026-10-10 14:52:10 +08:00
kanoqwq 9fac259e93 fix(dashboard): place live update hint beside serving label 2026-10-10 13:48:23 +08:00
kanoqwq d882579ccc fix(dashboard): keep lock refresh indicators in stable heading slots 2026-10-10 13:46:18 +08:00
kanoqwq 85d179c789 docs: record dashboard backport live deployment and acceptance workflow 2026-10-10 13:34:59 +08:00
kanoqwq 50a7fcd00b feat(dashboard): backport staged refresh and SMS layout from E5
Split lightweight rates from status polling, publish cellular stages early, decode UCS2 operators, and retain MU300 adapters and identity/SMS behavior. Include three-language UI, configuration migration, package inventory guards, and offline regressions.
2026-10-10 13:29:14 +08:00
kanoqwq f09267150b fix: backport upstream Wi-Fi and installer stability fixes
Select reviewed fixes from upstream main a5da67f: WCN power serialization and PCIe cleanup (1f6e825, 1196cf2), firmware log policy (f0323bf), AP DNS ordering (f4f5e76), pristine legacy driver rebuilds (b0e9595), bounded eMMC probes and RNDIS address handoff (bde23d0, 486856c). Preserve TF deployment, USB recovery, IPv6 software checksums and latency tuning; do not import the power/VPN redesign.

Validation: 176 dash/bash Python tests; 417 PowerShell checks; Wi-Fi/WCN modules built for 6.18.54 and 7.2.8 with matching vermagic and build manifests; legacy patch applicability verified. No device deployment or ZIP rebuild.
2026-10-10 01:03:18 +08:00
kanoqwq 373e1911a2 feat(tf): harden installation and expand dashboard features
Add local SMS storage and forwarding, traffic accounting, LED brightness, dashboard fixes and Aurora configuration. Harden TF installation and validate KVM/container kernel artifacts.

Include a user-facing Chinese CHANGELOG and verified 6.18/7.2 r4 checksums. Archive superseded local bundles outside version control.

Validation: 169 unittest cases with dash/bash; 410 PowerShell installer assertions; both r4 package integrity and source checks passed. The local BusyBox full-suite run was stopped because its applets bypass test stubs.
2026-10-08 02:00:27 +08:00
kanoqwq 35a1c55033 fix(tf): harden installer, slot boot and dashboard settings 2026-10-05 03:59:40 +08:00
kanoqwq 040e44c95d docs: record rebuilt 6.18 and 7.2 WLAN modules 2026-10-02 23:43:38 +08:00
kanoqwq 89b376d0a4 fix(tf): retain IPv6 client routes and carry WLAN RX repair 2026-10-02 23:38:44 +08:00
kanoqwq 5e301d4f67 feat(openwrt): bundle Aurora and audit dual-kernel TF builds 2026-10-02 19:29:20 +08:00
kanoqwq 45222e6db5 fix: consolidate TF networking and USB latency fixes 2026-10-02 17:58:40 +08:00
kanoqwq a366a89166 Bundle standalone LuCI app in TF rootfs by default 2026-10-01 03:41:48 +08:00
kanoqwq 8b7abb4273 openwrt: add standalone TF deployment for Linux 7.2 2026-09-30 16:05:03 +08:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4403f377c5 Drop the daily traffic statistics; the README keeps its badges
The traffic workflow committed to main every day, which a protected main no longer allows (a personal repository
cannot exempt GitHub Actions from a ruleset). The badges at the top still show releases, downloads, stars, forks
and issues.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-29 00:42:17 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 fa13a3676f Windows installs push LF scripts; the AP lists its stations; stale trial guards disarmed; mu300-nfc on|off
- Windows (fixes #7): a clone with core.autocrlf=true checked the device scripts out as CRLF, and Android's sh
  ran none of android-install.sh ("unexpected 'do'"), with an empty log. .gitattributes keeps text LF on every
  system; install.ps1 pushes scripts through PushUnix, and build-boot-image.py writes init, ueventd-perms.sh and
  the module orders with LF, for clones made before. Checked on Windows: 5 of 5 scripts CRLF on main, 0 now.
- Wi-Fi (#8): the vendor driver had no dump_station, so iw, iwinfo assoclist and LuCI's Associated Stations
  were empty although hostapd had the clients; nor get_channel ("Channel: 0"). dump_station lists the firmware's
  peer table entries of the AP (address only: the firmware gives no signal or counters), get_channel returns
  what cfg80211 kept from start_ap. Mainline copy and a 5.4 patch; the channel checked on the F50 under 6.18.
- A U30 Air restarted every ten minutes after mu300-linux from Android: boot_b's device segment, which
  mu300-update keeps, still held an old experiment's --trial-guard. The generic segment carries an empty guard
  file that replaces it; an experiment's guard goes last, into a segment of its own. Checked on the U30 Air.
- mu300-nfc on|off: ZTE's NFC switch is bit 5 of the tag's configuration byte 0x3bf (found by reading the chip
  with the switch on and off); set, phones get nothing. mu300-nfc says so. Checked on the U30 Air.
- Tests: CRLF inputs, no plain adb push of scripts, the empty guard, NFC on/off. FINDINGS 33g, 33h.

Fixes #7

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-29 00:32:03 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 a8e529cfcb U30 Air: mu300-nfc writes its NFC tag (the hotspot's Wi-Fi, a URL, text)
- The tag is a Fudan FM11NT08 at I2C 2-0x57, reachable while GPIO 190 is held low (libgpiod). mu300-nfc shows
  it (a Wi-Fi record by its name only), writes the hotspot's name and password as ZTE's firmware does (the same
  bytes), a URL (with the NDEF prefix codes), text, or nothing; each 16-byte page only when it differs, and read
  back after writing.
- sync, at every hotspot start (Ubuntu) and at boot (OpenWrt): the Wi-Fi record again if that is what the tag
  holds, so a changed password reaches it; a URL or text written by hand stays.
- Ubuntu and OpenWrt get i2c-tools and gpiod(-tools); mu300-nfc is on PATH.
- Tested on the U30 Air under 7.2: a phone joined the hotspot and opened a URL written from Linux, once NFC was
  switched on in ZTE's web interface (a setting the tag keeps). Tests: a fake tag, ZTE's record byte for byte,
  long URLs, what sync leaves alone. FINDINGS 33g.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 20:00:24 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 cb641bc5d6 U30 Air: every LED under control as in ZTE's firmware; a heat alarm on the battery LED
- The network and Wi-Fi lights never went out under mainline: they are PMIC LDOs (VDDCAMA0-2), which ZTE switches
  with zte_ldo_leds and mainline left on. leds-zte-ldo makes them zte-ldo0..2 and starts them dark.
- The network LED's red is the PMIC's keypad backlight sink: leds-sc27xx-kpled, after Unisoc's driver, under its
  Android name keyboard-backlight. The device tree's other GPIO LEDs light nothing, under Android too.
- mu300-led: battery white while Linux is up, network blue on 4G, white on 5G, red without service, Wi-Fi white on
  2.4 GHz, blue on 5 GHz; under 5.4 the LDOs through vddcamaN_status. mobile-data re-reads the access technology
  on every watchdog round.
- thermal-guard: the SoC at 85 C or the battery at 50 C sets off mu300-led alarm, the battery LED's colours one
  at a time, until they cool down; it now runs on 5.4 too, where it only watches.
- Mapped by lighting each LED on the device and by sampling Android's LEDs with the radio off; 6.18 and 7.2 on
  the U30 Air. Tests: 4G/5G, the siren, the 5.4 LDO switches, the heat alarm. FINDINGS 33f.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 19:20:33 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 c58ab80b18 USB host tested on the U30 Air; the installers ask which adb device; a trial guard only in a trial boot
- USB host under 6.18 and 7.2: a Logitech receiver (HID) and a flash drive (mounted, read) through a USB-C
  adapter. The PHY now provides otg_set_vbus(), through which dwc3 hands it the role (host eye pattern, A-type ID,
  D+/D- pull-downs). Patch 0007 is 6.18 only (7.2 has it upstream): patches/<major.minor>/ holds such patches.
  mu300-usb waits for the role switch, which works in the background, and reads a fake /sys in tests.
- init applied a --trial-guard left in the device segment of boot_b to every boot of an installed system: it
  restarted every 10 minutes (mu300-update keeps boot_b's device segment). A guard now counts in a trial only.
- install.sh, install.ps1, uninstall.ps1: with more than one adb device they always ask which one (the F50/U30 Air
  is the default), and with the device in Linux and only a phone or tablet in Android they offer to send the
  device to Android first - an installer about to work on a tablet was reported.
- tests: device selection, and mu300-usb against a fake charger (never 5 V against a supply, the boost off at
  boot, the F50 refused); FINDINGS 33e; README.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 16:53:00 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 71db73d941 U30 Air: its battery under mainline (efuse, ADC and fuel gauge for UMP9620)
upstream/patches 0004-0006 teach mainline's sc27xx efuse, ADC and fuel gauge drivers the UMS9620's PMIC, from
the values in Unisoc's 5.4 drivers: the efuse read window, the ADC's scales, calibration and 26 MHz clock vote,
the FGU's enable bits and calibration field. On this board "bat-temp" is the NTC's voltage (the battery node's
voltage-temp-table converts it), the charger IC has no driver (the status comes from the battery current), and
mainline read every discharge current as ~2 billion (an unsigned subtraction; now s64 like the vendor driver).

Tested on the U30 Air (6.18 and 7.2): level, voltage, current (-2..-18 mA on USB power, full), 33 degC, status.
A first version recursed (status -> capacity -> calibration -> status) and overflowed the stack at every boot:
five failed boots later the device was back in Android by itself, and the panic was in pstore (FINDINGS 33d).

Also: mu300-wifi-band falls back to the hotspot's channel when it cannot read hotspot.conf (not root), and
mu300-led tells the band from the setting while the hotspot has no channel yet (it lit white on 5 GHz).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 10:55:22 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 0ec79df54d U30 Air runs the mainline kernels: VBUS from extcon-gpio, GPIO LEDs; unique USB serial numbers; bundles name their devices
- ssphy (6.18, 7.2): the U30 Air's device tree gives the PHY the PMIC's Type-C block as extcon, which has no driver
  under mainline, and the PHY deferred for ever (no USB at all). When extcon names that block, the PHY now takes
  VBUS from the extcon-usb-gpio node both boards have. CONFIG_LEDS_GPIO for its LEDs.
- init: the USB serial number is MU300LINUX-<serial number> (macOS gave a second device with the same one no network
  interface), and the serial number is read from the device tree's bootargs as well, since a mainline kernel
  forces its own command line.
- kernel bundles carry ./devices ("f50 u30air"); mu300-update and both installers keep a bundle without it off a
  U30 Air (its 5.4 ramdisk lacks the U30 Air modules, its mainline kernel the fix above). This replaces the
  "5.4 only" rule: the U30 Air gets every kernel and Ubuntu 26.04 from the next release on.
- FINDINGS 33c, README: what runs on the U30 Air under mainline (all but the battery reading).

Tested on the U30 Air with one-shot trials and --trial-guard, an F50 on the same Mac: 6.18 and 7.2 with USB network,
mobile data, VPN, hotspot (a Wi-Fi client for 3 minutes, no drops, 0% loss), Bluetooth and LEDs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 08:59:56 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 26eb8d2b7a U30 Air: battery in mu300-toolkit, mu300-device, README and FINDINGS; build-mode installs get the VPN engines
- mu300-toolkit shows the battery (info and the live monitor) where there is one: level and whether it runs on
  USB power (the SQC charger reports "Unknown" once the battery is full, so the status alone says little)
- mu300-device: f50 or u30air, from /run/mu300/device or, under a boot image from before it existed (an older
  release's or a mainline kernel), from the device tree like init; mu300-led and mu300-lan-ip use it
- install.sh --build never put xray, hev-socks5-tunnel and sing-box into the image (only make-release did):
  mu300-vpn failed with "xray: not found". Found installing the U30 Air from a local build.
- README: supported devices; FINDINGS 33: the U30 Air port, the misc/boot_b lookup, two devices on one computer
- mu300-scp.py honours MU300_HOST like mu300-ssh.py

Tested: U30 Air installed with install.sh --build (Linux by default, Ubuntu 24.04, 5.4): 192.168.78.1 with MACs
from its serial, 93/93 modules, power/network/Wi-Fi LEDs, VPN over mobile data (~110 Mbit/s to a USB client),
the device's own LAN kept out of the tunnel with an F50's vpn.conf.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-28 08:59:56 +03:00
github-actions[bot] b0c34409e7 chore(stats): update traffic and download metrics [skip ci] 2026-09-28 05:10:45 +00:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 3b2f7f3306 installer: the system menu no longer names Ubuntu 24.04 before asking 24.04 or 26.04
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 20:30:07 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 e2670c98e0 README: screenshots of the installer (start, the kernel question in Turkish, the summary)
Rendered from real installer output (docs/images/installer/*.txt) with docs/images/installer/render.sh.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 20:04:08 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 2cff7b0519 wcn pcie: a Wi-Fi card that is late at boot no longer panics the board (5.4 and mainline)
A PCIe scan that timed out removed the half-probed card, and sprd_pcie_remove() completed remove_done, which only
sprd_pcie_remove_card() initialises: an oops in __wake_up_locked and a panic, back to Android (caught while
rebooting OpenWrt on 5.4 for v2026.09.29). remove_done is initialised before each scan, remove guards against a
probe that set no data, and a timed-out scan is retried once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 15:38:39 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 92036fe230 init: find the Linux region itself instead of the offset written into the replaceable init
The installer writes the device's region offset into boot/init, but that copy lives in the device's ramdisk
segment; the generic segment behind it (every mu300-update boot image since v2026.09.27, and a mainline kernel
from the installer) brings its own init with the test board's offset. Devices whose region is elsewhere booted
into standalone mode and went back to Android after 300 s - reported for a 6.18 install, and very likely the
"5.4 update always ends in Android" report too. init now computes the region as the installer places it (first
2 MiB boundary after the last partition) and takes the first candidate that holds the mu300root filesystem.

Tested with a default offset that was wrong on purpose: found the region, booted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 14:50:52 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 eb5336875c 5.4: the IPA delegate fix of the mainline modules (OpenWrt crashed on some boots)
Testing v2026.09.29 caught OpenWrt on 5.4 falling back to Android: "Kernel panic - not syncing: CFI failure
(target: 0x0)" in dele-4-5, the delegate's connection thread - FINDINGS 31f, which was fixed only in the mainline
copy of the driver. The 5.4 tree gets the same change as kernel/patches/sipa-delegate-einprogress.patch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 14:24:21 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 abe1950ada 7.2 as a third kernel: installer, mu300-update and releases; the two driver fixes in 5.4 too
- installer choice 3 installs the newest stable mainline kernel (7.2.8 for now) the way 6.18 is installed;
  mu300-update kernel 5.4|6.18|7.2; the release carries mu300-kernel-7.2.tar.gz next to the 6.18 one
- upstream builds keep each kernel's outputs apart: OUTDIR=out-7.2 for build.sh/build-modules.sh,
  MU300_UPSTREAM_OUT for make-bundle.sh; make-release.sh packs both and checks each build's version
- 7.x: trusty and six Mali workqueues declare WQ_PERCPU (7.x warns about queues that say neither); a Mali queue
  name within the 31 characters
- 5.4: the Wi-Fi complock (irqsave) and Bluetooth tty port fixes as kernel/patches, applied by build-all.sh

Tested on the device: 7.2.8 on OpenWrt and Ubuntu with an empty dmesg, mobile data, hotspot, Bluetooth, GPU.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 13:34:56 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 b38b6a4115 mainline: power off through the PMIC; what the command line's crutches keep, measured
- patch 0001 (spi-sprd-adi) registers a UMP9620 power-off handler ahead of PSCI SYSTEM_OFF, the vendor
  sc27xx-poweroff sequence (SLP_CTRL, then PWR_PD_HW). Tested: the power is cut (ramoops, kept across reboot, is
  gone), and the battery-less board restarts on a powered USB port.
- FINDINGS 31h: regulator_ignore_unused keeps the SIM's LDO on, fw_devlink=permissive the USB gadget (without it
  the board ran without USB and counted as booted), pd_ignore_unused has no effect, clk_ignore_unused keeps 315
  unused clocks on

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 12:50:43 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 368ac9499c mainline modules: no warning left in dmesg, no thread parked in D state
- sipx, sblock, sbuf, smem, smsg, unisoc-mailbox: drop the "base_addr" attributes with neither show nor store,
  created on platform devices that are never registered (eight warnings per boot, readable by nobody)
- sipa_dummy: set the MAC with eth_hw_addr_set()
- slog_bridge: wait for the modem log with msleep_interruptible(); sc2355 tx thread: wait in TASK_IDLE - both
  kept the idle load average at 2.0

Ubuntu and OpenWrt on 6.18: dmesg without WARNING/Oops/BUG, mobile data, hotspot, Bluetooth up, idle load ~0.4.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 12:42:34 +03:00
github-actions[bot] 886e2fcf97 chore(stats): update traffic and download metrics [skip ci] 2026-09-27 05:08:10 +00:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 74668a8ebb mainline: fix the three vendor bugs behind 6.18's boot warnings; ship modules.builtin
- sprd_wlan_combo: complock is taken in the PCIe tx-complete interrupt, so take it with irqsave everywhere
  (with _bh only, that interrupt on the lock holder's CPU deadlocks)
- sprdbt_tty: do not link the unused second port past the end of a one-line tty driver's ports[]
- sipa_eth, seth, sipa_usb: set the random MAC with eth_hw_addr_random() instead of writing dev_addr
- the 6.18 bundle carries modules.builtin(.modinfo); mu300-update installs them with an empty modules.order

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
2026-09-27 02:18:42 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 22258b7460 mu300-update: self-update replaces the file behind /usr/local/bin's link, not the link
The link in /usr/local/bin became a regular file, which usr/local's keep rule would have carried into every later
system, hiding its updater. Also: README and FINDINGS 32 on the one-boot fallback of older boot images and the
way back with su -c mu300-linux.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 01:30:49 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 5b5ad2cb30 mu300-update: download everything first, keep the IPA awake, and update itself
A device on an older boot image could end up starting only Android after an update. After about two quiet minutes
its IPA fails to power off and the mobile downlink stays dead until the next boot; the update unpacked a system
for minutes and then started the next download, which hung (curl had no timeout) or ended in a silent reset - and a
reset while boot_b is written leaves slot b unbootable. Reproduced from the installer image with kernel #11.

- every file (systems, kernel bundle) is downloaded and checked against SHA256SUMS before anything changes;
  partial files resume, stalled transfers time out, a dead downlink gives advice instead of a hang
- a ping every 3 s keeps the IPA from going idle while apply/boot/kernel run
- the mobile-data watchdog is stopped while the systems and boot_b are written
- the release carries mu300-update, and apply continues with it when it differs
- the account merge writes a copy and renames it (no half-written passwd at first boot); mu300-accounts runs
  before tmpfiles, sysusers and D-Bus
- rollback, clean and apply never remove the directory the running system booted from

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 00:49:10 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 1cee306e7e mainline: the IPA delegate survives traffic at load time (OpenWrt crashes and dead downlink); docs
The crash capture of the last commit caught both OpenWrt 6.18 crashes in the delegate's connection thread
(dele-4-5): a call through NULL (lr conn_thread+0x188) and a 22 s soft lockup in console_flush_all. The probe:
"driver CB returned with -115 / PROD_CP does not exist / cp_delegator_init failed: -22". OpenWrt brings the WAN
up before the delegate is loaded, so CONS_WWAN_UL is granted when sipa_delegator_start() makes it depend on
PROD_CP; that returns -EINPROGRESS, which the vendor code took for a failure - it deleted PROD_CP again,
cp_delegator_init() ignored that, failed on the Wi-Fi dependencies, and the failed probe freed the delegator
under the thread it had already started. The downlink died with it. On Ubuntu the delegate loads before there
is traffic and the call returns 0.

Fixed in sipa_dele: -EINPROGRESS is success; sipa_delegator_start()'s result is checked; the Wi-Fi offload
dependencies (unused here) only warn; the delegator is not devm-allocated. OpenWrt 4 boots in a row: delegate
bound, internet, no crash record (before: 1 crash in 4, the delegate never bound).

Also: the IPA's per-packet TX error (bursts while the delegate is not up yet) is rate limited, and the forced
command line has loglevel=3 - errors stay in dmesg and the journal, only critical messages go to the 115200
baud console (the vendor kernel runs at 1). Ubuntu on the final build: delegate bound, no oops, internet.

docs/FINDINGS.md gets a chapter on mainline as a daily kernel (31-31f); upstream/README.md is brought up to date.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 21:54:41 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4aaa21fc03 gadget: NCM by default; RNDIS only on request, because macOS takes configuration 1 too
With RNDIS in configuration 1 and NCM in configuration 2, macOS chose configuration 1 (measured:
kUSBCurrentConfiguration 1), found no driver for the RNDIS control interface and had no network. Windows only
ever uses configuration 1 as well, so no order serves both. The single NCM + ACM configuration does: measured
from boot on macOS (AppleUSBNCMControl/Data, DHCP, SSH and internet over USB, no "inactive" link as with ECM)
and live on Windows 11 (UsbNcm.sys). MU300_USBNET="rndis ncm" keeps the RNDIS layout for Windows without NCM.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 15:53:47 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 261e1ba0c7 USB network without a driver on Windows: NCM, and RNDIS once the kernel has it
The gadget offered ECM, for which Windows has no driver. Now:
* NCM replaces ECM as the network function (ECM stays the fallback, MU300_USBNET=ecm restores the old gadget),
  and the device class is IAD (0xEF/2/1) so Windows' composite driver keeps each function's interfaces together.
  Tested live on the device: Windows 11 bound its inbox UsbNcm.sys, took a DHCP lease and reached the device and
  the internet; the ACM console stayed COM4.
* RNDIS for every Windows from 7 on, in configuration 1 with MS OS descriptors (compatible ID RNDIS/5162001) -
  Windows only ever uses the first configuration - and NCM in configuration 2, which Linux and macOS take, as with
  g_ether. boot/init renames the netdevs after binding (RNDIS registers first and would take usb0): usb0 stays
  the CDC link, rndis0 joins br-lan too.
  This needs CONFIG_USB_CONFIGFS_RNDIS, now in the kernel fragment. Unisoc's sprd_usb_f_rndis module cannot stand
  in: with CONFIG_USB_PAM it hands the data path to the IPA on connect, so its netdev never passes a packet
  (measured: Windows bound it, rndis0 stayed at 0/0). Without the stock function boot/init builds the single NCM
  configuration, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 14:58:24 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 a0f248d2e0 FINDINGS: DSP-side VBC registers only through the driver's proc write
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-26 14:58:24 +03:00
github-actions[bot] e6f1dc51b1 chore(stats): update traffic and download metrics [skip ci] 2026-09-26 04:45:27 +00:00
github-actions[bot] f7a20b2aec chore(stats): update traffic and download metrics [skip ci] 2026-09-25 04:43:23 +00:00
github-actions[bot] 46b3b55fc4 chore(stats): update traffic and download metrics [skip ci] 2026-09-24 04:32:23 +00:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 e832186b57 audio and Ubuntu fixes from bringing audio up on a second board
A clean install on a second F50, with the audio stack added, turned up these:

* sms-pdu.awk used and()/or()/lshift()/rshift(), which busybox awk and gawk have and Ubuntu's mawk does not: every
  USSD answer and every SMS failed to decode on Ubuntu ("function and never defined"). They are b_* helpers in
  plain arithmetic now, without "^" either (busybox awk without math support rejects it). Checked against
  reference output from the old file on decode (GSM7, UCS2, alphanumeric sender, concatenated), encode and USSD:
  identical under mawk and busybox awk.
* /etc/modprobe.d/mu300-audio.conf keeps modprobe away from the 23 audio modules. Once depmod has indexed them,
  udev and request_module() load audio_mem and the card first, without the parameters mu300-audio-dsp passes;
  both are permanent and the card never registers until a reboot.
* mu300-voice holds the AGDSP domain (agdsp_access_en) during a call: closing a voice stream otherwise reads an
  AGCP register after the domain has dropped and panics the kernel (SError in check_agcp_mcdt_clock). It also
  starts the call scene, the hostless FE_VOICE, with the new tools/pcmhost - the HAL's pcm_start(), which aplay
  cannot do. Audio still does not move on this board; FINDINGS 24b has what was measured.
* The Ubuntu image gets alsa-utils (the audio scripts need amixer/aplay) and mu300-audio.service enabled (it skips
  itself without the audio modules). mu300-audio-dsp status no longer dies on an empty status read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-23 09:24:19 +03:00
github-actions[bot] 5505d0092c chore(stats): update traffic and download metrics [skip ci] 2026-09-23 04:34:52 +00:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4be83cbcb7 ubuntu: start the IPA delegate (it was never loaded), and confirm a boot once SSH is up
extra-modules and sipa-dele-start looked for sipa-dele.ko in /lib/modules/<release>/. OpenWrt keeps modules
there; the Ubuntu image keeps them under extra/. On Ubuntu the check failed silently, the delegate was never
started, and every Ubuntu image since it moved out of the module list had mobile data with an address and no
downlink. Both now look in both places. On the test unit it was hidden by a VPN still going through an HTTP
proxy on the computer at the other end of the USB cable - wget worked with sipa_eth0 at rx 0 and tx 0.

mu300-boot-ok was ordered after multi-user.target, so any service that never finished left the boot
unconfirmed and the next reboot counted it as failed. It now follows the USB network and SSH only.

Measured on Ubuntu on the device: the delegate loads at boot, rx climbs, the Xray tunnel reaches its server over
the bearer (exit IP is the server's), and boot-ok runs at 79 s after SSH at 47 s, re-arming 5 attempts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-23 00:08:26 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 c08d4f315e boot: let the user choose how many failed boots fall back to Android, default 5
Default-Linux mode re-armed slot b with tries=2, which allows exactly one boot that may fail. Boot-ok comes about
a minute after power-on, so a single plug pull in that minute sent the device to Android - what just happened on
a test unit (uboot_log: slot b tries_remaining 1, check rollback, Booting slot_a). The initramfs counter meant to
allow five such boots never got a say, because LK rolled back first.

The installer (install.sh and install.ps1) now explains the trade-off and asks for N, 1-6, default 5; it is stored
in .mu300/boot-attempts and can be changed later with `mu300-next-boot attempts N`. Slot b is armed with
tries=N+1, so N unconfirmed boots in a row are allowed and the next is Android. The initramfs counter reads the
same N and fires on the same boot.

mu300-next-boot builds the block at run time from the initramfs' tries=2 block (mu300-update does not replace
the boot image, and older ones carry only that one), taking the CRC-32 from gzip's trailer. It first rebuilds
tries=2 and requires a byte-for-byte match with the initramfs' block, and falls back to it otherwise.

mu300-os now carries default-boot to the system it switches to: the initramfs reads it per system, so switching to
one where it was never set made the first reboot there go to Android.

Measured on the device (OpenWrt, N=5, boot-ok suppressed twice): LK booted slot b from tries 6, 5 and 4, and a
good boot re-armed 6. The shell CRC matches Python's zlib for tries 2-7.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-22 23:50:18 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 69b29f37c6 vpn: keep kill-switch configurations on sing-box, and never let xray lock a device out
An update keeps vpn.conf, and the old example set KILL_SWITCH=1. With the xray engine that is a lockout: before
the tunnel exists the server's name goes through dnsmasq and the certificate fetch through openssl, both
unmarked, so the kill switch drops both, the engine never comes up, and the kill switch then blocks everything
else. sing-box does its bootstrap lookup on its own marked socket and never had the problem.

An unset ENGINE now picks sing-box when KILL_SWITCH=1 and xray otherwise, so an updated device runs exactly what it
ran before. ENGINE=xray with the kill switch on runs without it and says so.

Measured on the device: an old-style config selects sing-box, a new one xray; xray with KILL_SWITCH=1 removes the
kill switch table, warns, and reaches the server; stopping leaves no rules, no xtun and no engine processes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-22 23:22:40 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 2d444befaf vpn: Xray engine on a kernel TUN, with a self-managing certificate pin
mu300-vpn gains ENGINE=xray, now the default: Xray-core speaks VLESS and hev-socks5-tunnel owns a plain kernel TUN
(xtun), handing every flow to Xray's SOCKS port on loopback. It reads the same VLESS_URI through the same parser;
ENGINE=sing-box keeps the old engine, and an image without the xray binaries falls back to it by itself.

The script does the routing neither program does, with sing-box's rule prefs and table so routing_cleanup and the
kill switch cover both: Xray's own sockets carry the 0x2d0 mark to main, the LAN and the server's address go to
main, everything else to xtun, and the device's own DNS is DNAT'd to REMOTE_DNS. The server name is resolved
before any of that exists and handed to Xray as an address. Xray, hev and the rules are torn down together on
every exit path.

Xray 26 removed allowInsecure. For a link that asks for it the leaf certificate is fetched with openssl once,
pinned as TLS_PIN_SHA256 in vpn.conf, and re-fetched only when Xray reports a pin mismatch (a renewal), after which
the service restarts. That report is info-level, so Xray runs at info and only warnings reach the system log.

Release: tools/fetch-xray.sh pins both binaries by sha256; make-release, assemble.sh and the OpenWrt build carry
them, and both images get openssl. The example config ships KILL_SWITCH=0 until the kill switch is re-tested
with Xray.

Measured on OpenWrt on the device: exit IP is the server's, apk works through the tunnel, a Wi-Fi client is
forwarded into xtun, and the three pin paths (none, present, mismatched) behave as described. Ubuntu is not yet
run on the device. FINDINGS 26e also records that busybox nc here has no -w - the reason an earlier test read
every destination as closed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-22 23:16:46 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5 71c998825f mobile data: gate the delegate on CGATT, and stop a LED write from hiding a live call
Three things, all from one session chasing "there is no internet" down the wrong hole twice.

sipa-dele-start waited on dmesg lines that the modem *loader* prints, so it was satisfied on its first check
and loaded the [permanent] module as early as before. It now waits for AT+CGATT? to answer 1, which cannot be
true before the CP's packet domain is running.

mobile-data's up() ended by turning the blue LED on. The PMIC rejected that write once, and under set -e the
failing && list ended the function one line before it reported success - with the context already up. The
caller saw a failure for a call that was live. LED writes go through a led() helper that cannot fail.

FINDINGS 13g records what the outage actually was - the internet PDP context had gone while the IMS one
stayed, and sipa_eth0 kept the previous address so every interface-level check still passed - plus the two
measurements that lie about it: sing-box's tun answers ICMP itself (sub-millisecond replies with tx_packets
frozen, and -I does not escape its ip rules), and with sing-box stopped the kill-switch turns the same ping
into EPERM. An idle SIPA reads as a broken one; none of those counters mean anything unless traffic is
leaving while they are read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-22 22:45:54 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5 05bcf6d696 install: offer to make room on the 32 GB variant, and give it back on uninstall
That variant ships with userdata filling the disk, so there is no gap behind it
and the installer had nothing to do but refuse. It can now shrink userdata to
make one, and uninstall can grow it back.

Only userdata, and only because it is the last partition: its end moves and
nothing else does, so every other partition keeps its offset and the AVB
descriptors and the boot chain stay valid. That is the whole safety argument and
it does not transfer to any other partition here, which is why the tool refuses
when the partition named is not the last one.

tools/resize-last-partition.py does the edit and is deliberately fussy. It
validates both GPT signatures, both header CRCs and both entry-array CRCs, checks
that the two headers agree about the layout and sit where a GPT puts them, and
refuses a new end that is past the usable area or that would leave the partition
empty. It re-parses what it produced before the caller is allowed to write it.
Verified against this device's real table: it reads the 64 GB unit correctly
(userdata 12275712..54218751, 20.00 GiB, 32.39 GiB free behind it), shrinks and
refills round-trip, and all three guards fire.

install.sh asks how many GiB Linux should get, keeps at least 4 GiB for Android
and 800 MiB for Linux, aligns the boundary, prints what each side ends up with
and requires ERASE to be typed. It writes the backup GPT before the primary, so a
power cut between the two leaves the old table and a device that still boots, and
it reads the table back and checks the new end took before clearing Android's
data filesystem. --check reports and offers nothing.

uninstall.sh offers the reverse, off by default: on the 64 GB variant growing
userdata would hand it the factory gap, so the numbers are printed and the answer
has to be yes.

Both paths are labelled EXPERIMENTAL and tell the user to take a full backup with
tools/backup-device.sh first. They rewrite the partition table and erase
everything in Android; this has been done by hand on exactly one device (issue #2).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-22 20:46:37 +03:00