Commit Graph
17 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 Opus 5.5 9545a5af93 mobile: kernel messages in green on the phone's console, as on NetBSD
kernel/patches/0026: vt.kernel_fg= colours what the kernel prints on the
console -- NetBSD's WS_KERNEL_FG (src/sys/arch/amd64/conf/GENERIC:
options WS_KERNEL_FG=WSCOL_GREEN) for the Linux vt; the console's own
colour is restored after each message.

devices/hotdogb/cmdline: console=tty0 (the panel; last, so it is
/dev/console, as the display is on NetBSD) besides ttyGS0, and
vt.kernel_fg=2.  Measured from RAM: the boot messages run green on the
panel (build/cam/green-2.jpg).  A fresh fetch-kernel tree with the series
is identical to the build tree (tree e066d46d1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:28:05 +00:00
lotherkandClaude Opus 5.5 3b2cbc44f1 mobile: kernel on kernel.org v7.0.14, named 7.0.14-makronix-unstable
The phone kernel no longer builds from the qualcomm-sm8150 fork: the base
is kernel.org stable v7.0.14 (refs/linux/7.0.14, shallow), and what hotdogb
needs from the fork is carried as kernel/patches 0001-0004 (sm8150/PMIC
DTSI nodes, the OnePlus DTS, the SMB5 charger, of/property), unchanged from
its 8e126dbc4; 0005-0025 are our series (the old 0005 is in v7.0.14 by a
stable backport).

The name comes from Makronix's versioning, the files the NetBSD side reads
(src/sys/conf/makronix-release, makronix-codename): kernel_make in
tools/lib.sh gives uname -r 7.0.14-makronix-unstable (x.99.y is -current)
and /proc/version makronix@camouflage, for the build and for every
modules_install.  make update-root defaults to /system/<Makronix version>.

Measured: slot a boots 7.0.14-makronix-unstable with /system/0.99.9,
marked successful; WLAN, Bluetooth, battery and the display work
(build/logs/flash-0.99.9-2026-11-11.log).  docs/NEXT.md 9c has what
7.3.4 showed (ftrace hangs it before the console; without ftrace a hard
freeze later).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:29:14 +00:00
lotherkandClaude Opus 5.5 fee212bbe8 mobile: kernel/patches-7.4, the series on the 7.4-rc1 base (does not boot yet)
Rebased from kernel/patches onto refs/linux/7.4-rc1: 0005, 0009, 0018 and
parts of 0001 are upstream in 7.4 and dropped, 0001 and 0004 adapted, the
rest applies.  Builds; on hotdogb it dies before the first console line,
also with the 7.0 DTB and with a smaller Image (README).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:27:00 +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 9656b80615 mobile: update-root measured; SYSTEM_VERSION instead of VERSION, the tree streamed as a tar; hci_qca retry fix
- make update-root VERSION=... passed VERSION into the kernel's make (a
  command-line variable reaches every sub-make; VERSION is the first line
  of the kernel Makefile): the kernel was built as release
  "2026-11-10a.0.0-..." and stopped in fs/pstore/ram.c:809
  (build/logs/update-root-2026-11-10.log) -- the same error that
  0a9f83bd3 took for a race on 2026-11-09.  Now SYSTEM_VERSION.
- tools/update-root.sh ran tar -C on the tree, which is a tar file
  (tools/mkroottar.sh): "This does not look like a tar archive".  It is
  streamed as it is now.
- kernel/patches/0020: hci_qca hung for good in tty_wait_until_sent when
  a failed WCN3998 setup reopened the UART; it drops the pending output.
- tools/checks/bt-wlan.sh counts the kernel's own Bluetooth retries.

Measured (hotdogb, 2026-11-10): make update-root SYSTEM_VERSION=2026-11-10a
REBOOT=--reboot, then 2026-11-10b: the phone runs the new system
(/etc/makronix-version), the old ones stay under /system as the way back;
a marker in /root and one in /etc, the ssh host key (SHA256:/uBN1++...),
/var/lib/makronix/rtc-offset and the WLAN profile survive, WLAN back at
192.168.1.127 (build/logs/update-root-{before,after}-2026-11-10.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:25:33 +00:00
lotherk e7bd6d9407 tree: drop xsrc, track src, X from pkgsrc
- xsrc/ deleted; X11_TYPE=modular, Xorg and the X libraries come from pkgsrc
  (packages.list), in the cross configuration and the build VM.
- overlay/ and patches/ are gone; their content is in src/ (commit 64934f16).
- Makefile: no -x/-X, no overlay target, stamp no longer syncs an overlay.
- makronix-pins.sh: src/BASE + pkgsrc; msrc-stage: no .git/xsrc, src comes
  from the NetBSD source sets.
- AGENTS/GOAL/docs updated to the new model (src tracked, refs/ read-only).
- mobile: kernel source is refs/linux/7.0.0, patches stay in
  mobile/kernel/patches; fetch-kernel clones it locally and checks the pin.
2026-11-09 23:30:07 +00:00
lotherkandClaude Opus 5.5 fd0e21d238 mobile: hotdogb white display solved: initialise the panel instead of taking it over
kernel/patches/0019: the panel driver resets the panel and sends the
stock 7T sequence by default.  Taking over ABL's panel state gave a white
panel in 25 of 90 boots, the full init in 0 of 40, counted with a camera
on the screen: tools/phone-screen.sh (brightness of the screen in a
camera frame) and tools/display-loop.sh (N reboots, screen, SMMU faults,
panel state, msm/DSI interrupt rates per boot).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:27:27 +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 9803d925be mobile: hotdogb clears the bootloader's blend stages; the white display measured, still open
kernel/patches/0017: msm clears the blend stages ABL leaves in ctl_0
(sspp_0 on LM_0, sspp_1 on LM_1, both reading the boot framebuffer) when
it takes over.  The SMMU faults on the boot framebuffer went away in two
boots of four.  The white display is not explained by them nor by the
panel's compression state: devices/hotdogb/AGENTS.md has the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:58:08 +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 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 c236a3da5b mobile: hotdogb display race fixed: stop bootloader autorefresh before the IOMMU attach
kernel/patches/0003: dpu_kms_hw_init switches off the INTF tear check's
autorefresh (and the timing engine) the bootloader left on, before msm
attaches its IOMMU domain, as mdp4/mdp5 already do.  Measured: 0 SMMU
faults and login: on the panel in 4 of 4 loads, faults in 7 of 7 before.

docs/BOOT.md: the bootloader does not fall back to slot b when slot a's
retry count runs out; set_active resets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:03:56 +00:00
lotherkandClaude Sonnet 5.5 26258166df mobile: kernel as pin + patches, glibc base (Debian and Void rootfs)
kernel/PIN and kernel/patches replace the external kernel tree: make linux
fetches the pinned commit and applies the patches (source tree identical to
the one that runs on the phone). base/debian and base/void build a glibc
aarch64 root file system without root (mmdebstrap / unshare + xbps).

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