consmirror.c: the BSD notice is replaced (Makronix's own file). Files with
changes of other sessions pending are left for their commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
update-root keeps two trees, A/B like the boot slots: the new tree goes to
/system/.staging, the old previous is removed, current becomes previous and
the new one current. No SYSTEM_VERSION any more, so updating the same
Makronix version twice does not collide.
Which Makronix a tree is goes into the tree: /etc/makronix-release
("Makronix 0.99.9 Camouflage (unstable)"), written by assemble-rootfs.sh
for update-root and for a fresh image, from src/sys/conf/makronix-release
and makronix-codename; the channel (unstable for x.99.y, else stable)
comes from tools/lib.sh makronix_version, which kernel_make uses too.
Measured: make update-root twice with 0.99.9 -> current and previous, both
"Makronix 0.99.9 Camouflage (unstable)"; after a reboot the new current
runs 7.0.14-makronix-unstable with WLAN, Bluetooth, battery and every
service up (build/logs/update-root-ab-2026-11-11.log, checks/layout.sh).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- 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>
/system/current holds the system, /data the state that survives an update
(docs/NEXT.md §6, Konrad: "it sucks that with an update we have to configure
everything"). base/initramfs/init mounts the partition once and sets up:
/ bind of /system/current
/home /root /var/lib binds of /data/...
/etc overlay: lower = the system's /etc, upper = /data/etc/upper
/data /system binds, so the system sees them
An image without /system/current (before 2026-11-09) is still mounted as the
whole partition -- measured on the phone: "layout: whole partition (image
without /system/current)", switch_root at 1.45 s.
Measured on the host (2026-11-09): the mount sequence works; a /etc write
lands in /data/etc/upper; remount,ro on the bind flips the whole file
system (so Void's stage 1 fsck still checks the partition) and remount,rw
undoes it; /proc/mounts names the device for /, so 03-grow-root.sh keeps
working. The partition mount cannot be moved into the new root -- the
target lies inside the source (the bind makes it so) -- so it stays at
/sysroot.real without a path after switch_root; the overlay and the binds
hold it.
Kernel: CONFIG_OVERLAY_FS=y (was m; the initramfs loads no modules).
tools/mkrootimg.sh writes /system/current/ and keeps /data out of the
image; the tree assembly is tools/assemble-rootfs.sh, shared with the new
tools/mkroottar.sh (make roottar) and tools/update-root.sh (make
update-root VERSION=...; unpack into /system/<v>, rename current, /data
untouched). update-root is written and syntax-checked, not yet measured.
Initramfs pin renewed: 6d1bd30b2a6fd815 (4950e286679ca4fa before).
Measured on the phone (hotdogb, 2026-11-09): flash-root of the new image,
first boot creates /data and copies /var/lib and /root, file system grown
to 96 GiB; after restoring the phone's /etc/NetworkManager, /etc/ssh and
/var/lib state into /data: WLAN reconnects with the saved profile
(192.168.1.127), the ssh host key is the old one, rtc-offset and the clock
survive a reboot, upper has the profile, the keys and runit's supervise
dirs.
- 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>