Commit Graph
19 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 7eb8ff29d1 AGENTS.md for mobile/* and ext/src, ext/src/glibc (t0235; written by a free-model subagent from the directory contents, checked against ls and mobile/AGENTS.md)
mobile/build is ignored by .gitignore (build output): no AGENTS.md there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 10:19:15 +00:00
lotherkandClaude Sonnet 5.5 efa96ca4f7 One package list: packages.list (kinds set/repo/fetch, @ARCH), read by tools/pkglist.sh; userland.sh detects cross or native and builds all of it; nothing is built in a VM any more
Removed: packages.{amd64,aarch64,binary*}.list, tools/packages.vm.list,
tools/vm-pkgbuild.sh, tools/vm-pkgcollect.sh, tools/vmbuild/, make binaries.
A package that fails no longer stops the others; they are named at the end.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 17:50:29 +00:00
lotherkandClaude Opus 5.5 d6540e5659 mobile: consmirror -- the serial console shows what the display shows
consmirror (userland/consmirror, a program of Makronix's own built through
the port frame with MX_LOCALSRC) reads the text console from /dev/vcsu1 and
/dev/vcsa1, woken by POLLPRI on every change, and writes it to the USB
serial gadget ttyGS0 as ANSI; what is typed there goes back into the
console through a uinput keyboard.  Under X the virtual terminal is not
written, so nothing is mirrored, as asked.  Test 3/3 PASS under qemu.

It replaces the agetty on ttyGS0 (runit service consmirror instead of
agetty-ttyGS0), and the kernel no longer writes its messages there itself:
console=ttyGS0 is gone from the cmdline, they reach the serial line through
the mirror of tty0, green as on the display.

userland_stage leaves a program whose port is not done out of the image
instead of failing (another agent may be building it); userland-test.sh
knows MX_LOCALSRC ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:57:22 +00:00
lotherkandClaude Opus 5.5 fed05a6c80 mobile: hotdogb boot splash: the Makronix M fullscreen, gone at the login
- The M tile (docs/logo/makronix-square-1080.png, rendered from the SVG)
  is the kernel's boot logo: KERNEL_LOGO in device.conf, converted by
  tools/build-kernel.sh to the PPM CONFIG_LOGO_LINUX_CLUT224_FILE names;
  full width, centred, once (fbcon=logo-pos:center fbcon=logo-count:1).
- agetty on tty1 without --noclear: it clears the logo at the login.
- kernel/patches/0021: the logo stays after init (msm's framebuffer came
  after late_initcall in some boots: no logo).
- kernel/patches/0022: the panel is switched on after msm's first frame,
  not at the end of its on-sequence (half a second of noise before).

Measured with the camera on the screen: bootloader logo, dark, the M,
the login (build/cam/boot-0022b.mp4); Konrad: "perfekt".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:19:47 +00:00
lotherkandClaude Opus 5.5 92db34f7e4 mobile: hotdogb WLAN missing in some boots solved: qrtr_smd in stage 1
In the failing boots the modem had no QRTR service at all (qrtr-lookup:
only the phone's own rmtfs, PD mapper and tqftpserv): qrtr_smd, the
transport to the modem, was loaded by udev too late -- the same race as
the PD mapper.  Loaded in stage 1 now: WLAN in 15 of 15 boots, before 3
missing of 15 (build/logs/wlan-qrtrsmd-2026-11-10.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:47:09 +00:00
lotherkandClaude Opus 5.5 a2c6cd1347 mobile: hotdogb bt-address as a service with re-probe, rmtfs waits for tqftpserv, boot-loop tool, handoff
- bt-address runs as a runit service (no longer from udev, where its wait
  for wlan0 held up the WLAN modules); on failure it re-probes the
  controller (unbind/bind of hci_uart_qca), three attempts.
- rmtfs (which starts the modem) waits for tqftpserv.
- tools/boot-loop.sh: N reboots with a check per boot, every wait
  bounded; tools/checks/ holds the checks.
- docs/HANDOFF.md: how to work with the phone, what works, what is open
  (WLAN missing in 2-3 boots of 15 -- the modem's WLAN QMI service never
  appears -- first).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 07:14:26 +00:00
lotherkandClaude Opus 5.5 45125223af mobile: hotdogb stable WLAN address; display test tools
- wlan-address (udev) and NetworkManager's conf.d: a WLAN address derived
  from the serial number, kept across boots.  With a random one per boot
  the router's DHCP pool ran out after a day of test boots; with it the
  phone got its lease at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:34:34 +00:00
lotherkandClaude Opus 5.5 7cb8370e98 mobile: hotdogb "switched off" explained: power key, and a hang when the modem stops under ath10k
- elogind: a short press on the power key no longer powers the phone off
  (base/void/rootfs, logind.conf.d).
- runit stage 3: ath10k is unloaded before rmtfs stops the modem; with it
  loaded the system hung after "stopped remote processor modem" and the
  watchdog left it in crash-dump mode (05c6:900e).
- kernel/patches/0018: qcom_scm clears the bootloader's download-mode bit.

Measured: reboot-mode bootloader with WLAN connected reaches fastboot in
12 s; make flash end to end on 7.0.0-sm8150-g6b20b1b06323, WLAN
reconnects by itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:25:37 +00:00
lotherkandClaude Opus 5.5 4ea31d69c1 mobile: hotdogb modem, WLAN, charger and fuel gauge
- kernel/patches 0014-0016: ath10k keeps the WCN powered from probe
  (qcom,keep-powered); the modem with its firmware from the phone's
  partition, WLAN, rmtfs outside the TZ region; charger and the bq27411
  fuel gauge.
- firmware-partitions maps the modem partition too;
  /usr/lib/firmware/qcom/sm8150/partitions links there for tqftpserv.
- wlan-board and ath10k-board: the phone's own WLAN board data from
  persist, as board-2.bin under /run, before ath10k loads.
- qcom_pd_mapper in stage 1, so the modem's WLAN domain starts.
- base/void: rmtfs, tqftpserv (services), linux-firmware-network.

Measured: wlan0 up, a scan finds 12 networks, Bluetooth alongside, the
charger charges, the gauge reads 4.433 V / 100 %.  Open: the display
white in some boots, and one sysrq reboot that ended switched off
(devices/hotdogb/AGENTS.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:17:42 +00:00
lotherkandClaude Opus 5.5 68c3b65b20 mobile: hotdogb Bluetooth, firmware from the phone's own partitions
- kernel/patches/0013: WCN3998 on uart13 in the DTS.
- firmware-partitions (soc/sm8150/rootfs, stage 1 before udev): mounts the
  partitions /etc/makronix/firmware-partitions names, of the active slot,
  read-only under /run and puts them first in firmware_class.path; the
  vendor's signed firmware stays on the phone and out of our images.
- bt-address (udev rule): a stable, locally administered address from the
  serial number for a controller that has none.
- base/void: bluez, bluetoothd.

Measured: firmware loaded from bluetooth_a, setup complete at 3.3 s, the
same address after a reboot, a scan finds 14 devices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:21:21 +00:00
lotherkandClaude Opus 5.5 d29094e24f mobile: our initramfs replaces pmOS's in the boot image
- base/initramfs/init builds the gadget with NCM and ACM at once: the root's
  stage 1 no longer rebinds it, so the host keeps its link and address and
  netconsole runs from 1.5 s.
- The root grows itself online to its partition
  (base/void/rootfs/.../03-grow-root.sh), which the pmOS initramfs did;
  tools/mkrootimg.sh copies base/<base>/rootfs/ before the SoC's files.
- tools/build-busybox.sh: SOURCE_DATE_EPOCH of the pinned source, so the
  initramfs is reproducible; pinned in device.conf (4950e286679ca4fa).
- Makefile: INITRAMFS defaults to ours; bootimg checks the pins after the
  inputs are built.

Measured on hotdogb: switch_root at 1.27 s (pmOS: about 3.5 s), a fresh
root grown from 281468 to 25493504 blocks, 10 of 10 warm reboots, no
WARNING, make flash end to end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:45:42 +00:00
lotherkandClaude Opus 5.5 c520f2ea26 mobile: hotdogb DTS in the kernel series, OTG, BTF, wall clock, warnings fixed
- kernel/patches 0007-0012: the DTS of the baseline moves into the tree
  (0007, with the PON modes), the ABL framebuffer is reserved memory (0008),
  msm's fbdev marks its memory virtual (0009), the MDSS no longer resets
  the Ethernet MAC (0010; the real dispcc reset leaves the panel white,
  measured), u_serial closes a hung-up port once (0011, the gs_close WARN),
  USB dual role with the pm8150b Type-C port (0012).
- KERNEL_DTB in device.conf: tools/build-kernel.sh builds the DTB in the
  tree, mkbootimg takes it from there; the binary DTB and its pin are gone.
- kernel.config: BTF (pahole 1.32 on the host).
- rtc-offset: the wall clock across reboots on the read-only PMIC RTC;
  tools/phone-time.sh sets it from the host.

Measured: kernel 7.0.0-sm8150-g3c5fa409ca54, 10 of 10 warm reboots, no
WARNING in dmesg, display good, Type-C data role device on the laptop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:24:46 +00:00
lotherkandClaude Opus 5.5 b9c0affdb8 mobile: hotdogb stable state: msm built in, display warnings fixed, self-flashing, serial console
Kernel (7.0.0-sm8150-g1299aab93171):
- msm DRM built in again: up at 0.6-0.8 s instead of 4.2 s, safe since
  0003 and 0004.
- 0005: CLK_OPS_PARENT_ENABLE on the pixel RCGs (as sdm845): "rcg didn't
  update its configuration" is gone.
- 0006: dsi_err_worker reported every error as status=4, a FIFO error
  that was none (lane FIFOs empty) and hid the ACK error (bit 0); it now
  reads status=40 ack_err=..., the panel's report on the first read after
  the takeover.
- ftrace (dynamic, function_graph), Landlock.

Without a button: the DTB gets the PON's mode-bootloader/mode-recovery
(fdtput on the pinned binary until the DTS moves in; new pin), Void gets
reboot-mode(1) and a runit stage-3 hook that restarts with the mode
(base/reboot2.c, built static by mkrootimg.sh).  flash.sh and
flash-root.sh reboot a running phone into fastboot themselves and wait for
ABL without ever cutting a command off or resetting the device -- two
usbresets after the userdata flash crashed it into 05c6:900e.  Writing the
fallback slot no longer makes it active.

Access: dnsmasq (DHCP only) on usb0, so the host keeps 172.16.42.2 after
the initramfs; an ACM function next to NCM with the kernel console and a
login on ttyGS0; phone_addr falls back to IPv6 link-local;
tools/reboot-loop.sh for boot races.  zram swap (half the RAM, zstd).

Measured: 20 of 20 warm reboots reachable; the self-flash
(build/logs/selfflash3-2026-11-08.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 09:52:05 +00:00
lotherkandClaude Opus 5.5 e66db037f0 mobile: hotdogb boot crawl fixed: keep the MDSS active until the boot scanout is stopped
About one boot in three crawled after msm loaded: every CPU around 50%
in hardirq, UFS timeouts, no ssh.  The DSI PHY's probe suspends the MDSS,
which switches the display clocks off in hardware while the bootloader's
autorefresh still fetches from memory.

kernel/patches/0004 keeps a runtime reference on the MDSS from its probe
until the DPU has stopped the boot scanout (0003).  Measured: 0 crawls in
20 warm reboots with it, against 5 in about 12 without; the same with the
userspace experiment that forbids the MDSS runtime PM (0 in 15).

Debugging aids for the next hang, all off unless their flag file exists:
irqwatch now also logs the per-CPU hardirq share (/proc/stat), which sees
chained interrupts /proc/interrupts cannot; 01-initcall-debug.sh switches
on initcall_debug before udev; 01-mdss-rpm-on.sh is the experiment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:34:33 +00:00
lotherkandClaude Opus 5.5 4a40bfe919 mobile: netconsole over usb0, and the log of the remaining hotdogb hang
kernel.config: NETCONSOLE (dynamic) and PRINTK_CALLER; olddefconfig also
writes back the DRM helpers that became modules with msm.  A stage-1
script sets up a netconsole target on usb0 before udev loads the drivers;
tools/netconsole-listen.sh receives it on the host.

Caught with it: the hang left after patch 0003 is a system spending its
CPUs in interrupts from msm's DSI probe on (25 ms hardirq, RT throttling,
UFS timeouts).  Suspected: an interrupt storm through the MDSS
demultiplexer, whose mask is software-only, while DSI's interrupt is
still disabled and the bootloader's DSI error pending.  irqwatch (opt-in,
/etc/makronix-irqwatch) logs the storming interrupt in the next hang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:28:38 +00:00
lotherkandClaude Opus 5.5 5233d8297a mobile: mark the booted A/B slot successful from Linux
The bootloader counts a slot's retries down on every boot until the slot
is marked successful, and at 0 stops on "image destroyed" without falling
back to the other slot (measured).  qcom-ab-slot (soc/sm8150/rootfs, POSIX
sh) sets the successful bit of boot_<slot> in byte 6 of its GPT
attributes, in the primary and the backup table with both CRCs, checking
both before and after -- the edit qbootctl makes (docs/reference/
qbootctl.txt).  The runit service slot-successful runs it once sshd runs;
tools/mkrootimg.sh copies soc/<soc>/rootfs and rootfs-<base> into the
image.

Measured on hotdogb: after a flash (retry 7, not successful) the first
boot marks the slot at 6.4 s; fastboot then reports
slot-successful:a:yes and the retry count no longer drops.

devices/hotdogb/AGENTS.md: a rarer hang remains, 2 of 10 boots with
kernel patch 0003.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:12:16 +00:00
lotherkandClaude Opus 5.5 0cf14ec379 mobile: root image on userdata, Void (runit) boots on hotdogb
tools/mkrootimg.sh makes an ext4 image with the device's ROOT_UUID from the
base's rootfs tar, the kernel modules, fstab, a usb0 profile and the root
password (ROOT_PASSWORD, default makronix); tools/flash-root.sh writes it to
ROOT_PARTITION (userdata).  mkbootimg.sh appends pmos_root_uuid=$ROOT_UUID;
the pmOS UUIDs left the cmdline.  BASE defaults to void.

Measured: Void reaches "void login:" with runit, sshd and NetworkManager, with
the baseline kernel on slot a.  The pinned kernel tree's build garbles the
display and does not reach the initramfs (devices/hotdogb/AGENTS.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:30:02 +00:00
lotherkandClaude Sonnet 5.5 f90c4a2745 mobile: userland is the root pkgsrc tree and DISTDIR, built for aarch64
PKG_ARCH selects packages.$PKG_ARCH.list on top of packages.list; platform
differences are pkgsrc options or device.conf variables, no second package
set and no second distfiles cache.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 09:59:46 +00:00
lotherkandClaude Sonnet 5.5 7d7243cb63 mobile: Makronix Mobile Edition, phase 1 (kernel, boot image, flash; hotdogb)
One tree with the desktop: mobile/ is a subtree, userland and pkgsrc are
shared, platform differences live in soc/<soc>/soc.conf and
devices/<codename>/device.conf. tools/ is POSIX sh; tools/mkbootimg.sh
reproduces byte for byte the boot image that boots on the OnePlus 7T.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 09:58:49 +00:00