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>
/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.
- 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>
base/initramfs/init (POSIX sh) and a static busybox built from pinned
upstream source (tools/build-busybox.sh), packed by tools/mkinitramfs.sh:
USB NCM + DHCP lease, root=UUID= read-only, switch_root, telnetd rescue.
Not yet booted. mkbootimg.sh appends root=UUID= and takes EXTRA_CMDLINE for
test images; the pmOS initramfs pin is retired.
Measured on hotdogb: the pinned kernel is fine -- with
initcall_blacklist=msm_drm_register it boots to Void. msm DRM with the
panel handoff garbles the panel and blocks the boot for every boot image
but the baseline one (devices/hotdogb/AGENTS.md has the table).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>