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>
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>
NetBSD's own host-program machinery, with the phone as the host: build.sh
builds nbcat, nbsed ... for a Linux build host with src/tools/Makefile.host
and libnbcompat; tools/mxmake.sh runs the same with HOST_CC = an aarch64
compiler whose glibc is the phone's.
- tools/mksysroot.sh: the Void rootfs + base/void/sysroot-packages headers
- tools/mktoolchain.sh: Debian's aarch64 gcc, glibc only from the sysroot
(--sysroot alone took Debian's glibc 2.42; the phone has 2.41)
- tools/mxmake.sh: the nbmake-<machine> of the phone (QEMU_LD_PREFIX lets
configure run its tests through binfmt; INSTALL and HOST_MKDEP overrides)
- userland/Makefile: mtree hierarchy, libnbcompat for aarch64, every port
found by its directory; make userland [PROG=x], make userland-test
- userland/mk/mx.prog.mk: two lines per port, Makefile.host unchanged
- tools/mxcheck.sh: no symbol version newer than the phone's libraries
- docs/PORTING-USERLAND.md: how to port one program, with the twelve
pitfalls met on the first one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/NETBSD-USERLAND.md cuts Konrad's goal of 2026-11-11 ("use as much as
possible from our makronix/netbsd source on top of the linux kernel") into
items for parallel agents: the frame (sysroot, toolchain, libnbcompat for
aarch64, mobile/userland/), libmxlinux for the BSD interfaces Linux lacks,
the programs in tiers by a scan of their sources, NetBSD rc instead of
runit, Void removed piece by piece, pkgsrc cross Linux->Linux to /usr/pkg.
It rests on what is measured: build.sh already builds ~70 NetBSD programs
for this Linux host through src/tools/compat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- 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.
- 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>
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>
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>
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>