Commit Graph
37 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 73c9de51a6 licence: the CNCL line in every file Makronix wrote (tools, docs, www, mobile, top level)
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>
2026-11-14 11:50:26 +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 cc4c76c10f Makronix/Linux: df by the normal build; NetBSD's statvfs over statfs and mountinfo
libmxlinux carries NetBSD's statvfs(2) family -- statvfs, fstatvfs,
statvfs1, fstatvfs1, getvfsstat, getmntinfo -- for a Linux kernel: the
numbers from statfs(2), the names NetBSD keeps in its mount structure
(f_fstypename, f_mntonname, f_mntfromname) from /proc/self/mountinfo,
matched exactly by statx(2)'s STATX_MNT_ID.  Linux ST_* flags become
MNT_*; MNT_LOCAL unless the type is a network file system, MNT_ROOTFS
for "/", MNT_IGNORE for mounts without blocks (proc, sysfs, cgroup ...),
which NetBSD's df would otherwise list.

Headers, reached over: <sys/statvfs.h> in front of glibc's (NetBSD's
struct; its functions are renamed __statvfs90 ..., so they never meet
glibc's), <sys/fstypes.h> with NetBSD's fsid_t renamed in place (it is
not glibc's struct), a <machine/ansi.h> that needs nothing on glibc, and
a <sys/mount.h> that keeps glibc's underneath (#include_next) and adds
fstypes, statvfs and MNAMELEN (mount.h:63) as NetBSD's does.

Measured under qemu-aarch64: df -h lists the host's mounts with the
numbers GNU df gives for /, /boot, /boot/efi, /run; -i, -l, -k work.
(/dev and /tmp show the root's numbers there because qemu's -L redirects
those paths into the sysroot's own directories.)  28 of 34 programs of
src/bin build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:53:53 +00:00
lotherkandClaude Opus 5.5 86ae867ea6 Makronix/Linux: ksh, ed, dd, pax by the normal build; libcrypt, librmt
27 of the 34 programs of src/bin build now.  New libraries by the same
normal build: lib/libcrypt (NetBSD's crypt: DES, MD5, blowfish, sha1,
argon2 -- glibc 2.44 has no libcrypt) and lib/librmt.

libmxlinux, NetBSD's own sources: md5c, sha1, sha2 (with <md5.h>,
<sha1.h>, <sha2.h> and their <sys/...> names, as sys/sys/Makefile:57-61
installs them), explicit_memset, strsuftoll, fparseln.  fts.c and
fparseln.c take their own portable branch (HAVE_NBTOOL_CONFIG_H with an
empty config in portable/, which only they see).  Ours: fgetln over
getline, fchroot (fchdir + chroot(".")), sysctl's hw.* subtree from
sysconf/uname (ncpu, pagesize, physmem64/usermem64 -- argon2 sizes itself
by it).  mxlinux.h: CLK_TCK as NetBSD's __sysconf(39), O_DIRECT,
O_SHLOCK/O_EXLOCK/O_ALT_IO/O_NOSIGPIPE as 0 (no Linux counterpart; ksh's
history opens without its lock), _PASSWORD_*, des_*, pwcache_*db,
UID_MAX/GID_MAX, _PATH_DEFTAPE /dev/nst0.  <rmt.h> is read without
NetBSD's ssp layer; glibc fortifies read(2) itself.

mx_termios.h no longer includes <sys/ioctl.h>: forced into every compile
it exposed TIOCSTI to ksh's emacs.c:1309, which compiles only where that
is hidden (it names an undefined TTY), as on NetBSD.

Measured under qemu-aarch64 -L build/mxsysroot-hotdogb: crypt(3) gives
abJnggxhB/yWI for DES, the openssl MD5 hash, and openwall's $2a$05$
U*U vector; pax writes ustar that GNU tar extracts to the same tree and
extracts GNU tar's archive with modes, mtimes and symlinks; ksh
arithmetic and arrays, ed s///+w, dd copy/skip work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:50:56 +00:00
lotherkandClaude Opus 5.5 b18945f578 Makronix/Linux: NetBSD's /bin/sh, libedit and libterminfo by the normal build
make src DIR=lib/libterminfo, lib/libedit, share/terminfo, bin/sh: the
"includes" pass first as in build.sh (curses.h, term.h), terminfo.cdb
compiled by the tooldir's nbtic, libraries into /lib (USE_SHLIBDIR).

libmxlinux, NetBSD's own sources reached over: cdb(3) (cdbr, cdbw,
mi_vector_hash) for terminfo.cdb.  Headers: <sys/endian.h> (glibc's
<endian.h> plus NetBSD's encoders/decoders, endian.h:190-230 -- NetBSD's
whole header would turn ntohl into a macro under glibc's prototypes),
<sys/bitops.h>, <sys/cdbr.h>/<cdbr.h> (sys/sys/Makefile:54),
<cdbw.h>, <sys/stdint.h>, and a <sys/sysctl.h> with NetBSD's MIB numbers
(the real one pulls in sys/proc.h and UVM).  Ours at the kernel boundary:
sysctl(3) answering the user.* subtree as NetBSD's libc does
(sysctl.c:106) from confstr/sysconf -- sh asks user.cs_path;
fcntl F_MAXFD/F_CLOSEM (as 10/11 they are F_SETSIG/F_GETSIG to Linux, so
they get unknown values and never reach the kernel), funopen/funopen2
over fopencookie, setproctitle via PR_SET_NAME, issetugid from AT_SECURE.
mxlinux.h: BSD/BSD4_3/BSD4_4 (sys/param.h:49-51; sh includes <sys/wait.h>
only #ifdef BSD), __va_list, <string.h> as NetBSD's <strings.h> has it,
<stddef.h>, dup3; mx_termios.h: TCSASOFT 0 (any other value makes Linux's
tcsetattr fail).

src/lib/libedit/config.h: HAVE_STRUCT_DIRENT_D_NAMLEN only without
__GLIBC__ -- libedit's own portable branch, its autoconf answer for glibc.

Measured: sh runs under qemu-aarch64 -L build/mxsysroot-hotdogb
(functions, arithmetic, command substitution, kill -l, trap ... INFO with
kill -INFO); the port tests of cat chmod cp echo ln ls mkdir mv rm rmdir
test kill pass with this sh as their interpreter; expr's "lang" case
reports that the sysroot has no glibc locales (sh's own setlocale
message, var.c:1948).  23 of 34 programs of src/bin build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:41:27 +00:00
lotherkandClaude Opus 5.5 4c89941778 Makronix/Linux: src/bin by NetBSD's normal build, libmxlinux from NetBSD's own sources
make src DIR=<dir> (mobile/tools/mxsrc.sh) runs the tooldir's
nbmake-evbarm64 in src/<dir> with MAKECONF=mobile/conf/mk.conf and the
sysroot as DESTDIR, objects in build/tools-obj, "obj" first.

libmxlinux grows into what NetBSD's libc and libutil have and glibc
lacks, from NetBSD's own sources reached over by .PATH: vis/unvis,
strmode, setmode, pwcache, reallocarr, strtoi/strtou (BCS_ONLY), fts (its
<fts.h> in front of glibc's; renamed symbols, so the two never meet),
acl(3) (posix1e), extattr(3), and libutil's efun, parsedate,
raise_default_signal, stat_flags, strpct, snprintb.  Ours only at the
kernel boundary: extattr onto Linux xattr(7) (user. and trusted.), the
__acl_* calls (EOPNOTSUPP; _PC_ACL_* get values glibc answers EINVAL to),
chflags/undelete (EOPNOTSUPP), lchmod (a link has no mode on Linux),
lpathconf, setpassent, the timezone_t API over TZ (mx_tz.c), sys_siglist.
include/ reaches over <fts.h>, <util.h>, <vis.h>, <tzfile.h>,
<sys/acl.h>, <sys/extattr.h>.  stty's mx_termios.h moves here and serves
every program; the old port frame keeps its per-port shims behind
-DMX_PORT_FRAME until they are gone.

libnbcompat is out of the normal build again: its setmode is the host
tools' octal-only stub (src/tools/compat/getmode.c:37), so chmod u+x set
mode 0.  mk.conf: NOGCCERROR (28 warnings left in src/bin),
-Wno-system-headers (glibc's fortify headers), MKRUMP=no.

Found on the way: NetBSD's __used macro deleted a member of glibc's
regex_t (<regex.h>:410 pastes "__used") and of posix_spawnattr_t
(<spawn.h>:47); regex_t shrank from 64 to 56 bytes and expr's regexec
read garbage.  mxlinux.h now includes both headers before mx_cdefs.h.

Measured: 22 of 34 programs of src/bin build
(mobile/build/logs/mxsrc-bin6-2026-11-12.log); the 18 with a port test
pass all of them under qemu-aarch64 -L build/mxsysroot-hotdogb: cat chmod
cp echo expr hostname kill ln ls mkdir mv pwd rm rmdir sleep stty sync
test.  The old frame still builds cat, stty, test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:21:44 +00:00
lotherkandClaude Opus 5.5 b2de49bb97 Makronix/Linux: our own sysroot -- our kernel's headers and glibc 2.44
Void is dropped (Konrad, 2026-11-11): src/ first, then pkgsrc recipes, then
LFS-style from upstream for what neither has; the whole system under our
control, the phone first, a desktop variant on the Linux kernel later.
docs/NETBSD-USERLAND.md has the new goal and phase L (the base from our own
parts, replacing phase D).

L1: make mxheaders -- headers_install of our kernel tree (7.0.14) into
build/mxsysroot-<dev>, with the usr-merged links.
L2: make glibc -- ext/src/glibc/mx/Makefile, LFS's cross "Glibc" recipe,
compiled with the tooldir's gcc 14.4.0 of src/; host tools borrowed for now:
GNU make >= 4.0, python3, bison, gawk.

Measured: glibc 2.44 built and installed (mkglibc exit=0,
build/logs/glibc-2026-11-11.log; .comment GCC: (NetBSD nb4 20260926)
14.4.0); a C program linked only against it runs under qemu with
build/mxsysroot-hotdogb as its root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:00:38 +00:00
lotherkandClaude Opus 5.5 bf4abb6d5c mobile: userland: install a program's LINKS ("[" of test)
src/tools/Makefile.host undefines LINKS (its programs are host tools), so
mk/mx.prog.mk reads them from the program's own Makefile beforehand
(make -V '${LINKS}'), maps them onto Void's layout like HOST_BINDIR and
makes hard links after install.host, as NetBSD's install does.  /usr/bin/[
is test's inode now.  userland_stage accepts a LINKS name as a hard link of
a done port's program.  Clean rebuild 28/28, tests 28/28 under qemu
(build/logs/make-userland-links-2026-11-11.log); grep, id, pax, hexdump
... get theirs when they are ported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:54:26 +00:00
lotherkandClaude Opus 5.5 522be41c17 mobile: NEXT.md 9d -- Bluetooth retry more frequent since 7.0.14, unbind hangs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:15:02 +00:00
lotherkandClaude Opus 5.5 5187ae1a8e mobile: A7 -- the NetBSD userland goes into the phone's image
tools/lib.sh userland_stage stages build/userland/<dev>/destdir (without
METALOG) and our libstdc++.so.6.0.33 + libgcc_s.so.1 (stripped, from the
tooldir), and refuses a program whose port is not "state: done";
assemble-rootfs.sh lays it over the Void packages, before base/ and soc/.
make roottar / rootimg / update-root carry it from now on.

On the phone (/system/current since 2026-11-11): cat, sleep, kill, env, test,
wc, ln, head, tee ... are NetBSD's (gcc 14.4.0 of src/), libstdc++.so.6 is
ours, kill -INFO makes sleep answer, WLAN/battery/all 20 services up.

Bluetooth, A/B on the same phone (build/logs/ab-bt-{new,old}-2026-11-11.log):
NetBSD userland 4/5, the tree before 3/5 -- every failure is the kernel's
"QCA TLV response size mismatch" retry, with either userland; not A7.  Since
the kernel moved to 7.0.14 it fails in about 3 boots of 10 (7.0.0: 1 of 15,
bt-flush-2026-11-10.log), and bt-address's re-probe then hangs in the kernel
(qca_serdev_remove -> flush_work, D state): a kernel matter, open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:14:48 +00:00
lotherkandClaude Opus 5.5 081646b002 mobile: userland: libmxlinux, and SIGINFO is SIGPWR system-wide
userland/lib/mxlinux: what NetBSD's headers and libc have and glibc lacks,
in one place instead of per port.  NetBSD's own sources where they run on
glibc unchanged (getopt, signalname/signalnumber/signalnext,
humanize_number, dehumanize_number, getbsize), ours where Linux's view is
needed (sys_signame from sigabbrev_np, fgetwln, LC_C_LOCALE);
include/mxlinux.h with the NetBSD header line each item stands in for.

The frame forces nbtool_config.h and mxlinux.h into every port and links
libmxlinux.a ahead of libc, so every program gets NetBSD's getopt (glibc's
permutes argv: env -i A=1 failed).  SIGINFO is SIGPWR on Makronix,
system-wide (Konrad, 2026-11-11), named INFO in sys_signame: kill -INFO
makes sleep print NetBSD's "Between 2 and 3 seconds left".

The ports shrink to what is theirs: 23 are two lines again; stty keeps its
termios names, sleep -lm, fold _XOPEN_SOURCE, dirname MAN=.  Clean rebuild
28/28, no warning; tests 28/28 under qemu and on the phone
(build/logs/userland-{qemu,phone}-mxlinux-2026-11-11.log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:35:19 +00:00
lotherkandClaude Opus 5.5 f0f267eadf mobile: the phone's toolchain from src/ -- build.sh tools for aarch64-linux-gnu
make tooldir runs build.sh tools unchanged with -m evbarm64, the phone's
sysroot as -D, and -V MACHINE_GNU_PLATFORM=aarch64-linux-gnu (bsd.own.mk:1065
sets it with ?=): gcc 14.4.0 and binutils 2.46.0 of src/external/gpl3,
configured as NetBSD configures its own (c c++ objc fortran, no Ada), plus
nbmake, nbmtree, install for the host -- the phone no longer borrows the
desktop's tooldir nor Debian's cross compiler.

make targetlibs does what NetBSD does with its own Makefiles, and meets four
NetBSD particulars (PORTING-USERLAND.md section 8): gcc's headers are not
copied by NetBSD's gcc (Makefile.in:3308 "if false"); -DNETBSD_TOOLS needs
the -B/-L of src/tools/gcc/Makefile:162; the libstdc++ import has no "src"
in SUBDIRS and no po/; NetBSD's locale_facets_nonio.h:339 needs a locale
model glibc's "gnu" one is not -- libstdc++ uses "generic" (a finding).

The frame (mxmake.sh, mktoolchain.sh, mxcheck.sh) uses the tooldir's gcc,
binutils and make.  Measured: C and C++ run under qemu against the phone's
glibc 2.41 with libstdc++.so.6.0.33; all 28 ports rebuilt with it pass
28/28 under qemu and on the phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:12:15 +00:00
lotherkandClaude Opus 5.5 0d4901af1e mobile: the frame for porting src/ programs to the phone
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>
2026-11-11 17:07:07 +00:00
lotherkandClaude Opus 5.5 dd7c192079 mobile: plan for Makronix on a Linux kernel (NetBSD userland, rc, pkgsrc)
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>
2026-11-11 15:06:26 +00:00
lotherkandClaude Opus 5.5 5097ac6d11 mobile: /system/current and /system/previous, no version in a name
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>
2026-11-11 14:47:11 +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 4b460cd255 mobile: NEXT.md: 7.4-rc1 hangs before the console on hotdogb; on hold until the fork tags 7.4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:15:38 +00:00
lotherkandClaude Opus 5.5 6ed20da3f4 refs/linux/7.4-rc1: the SM8150 fork's 7.4 branch as a shallow reference
The next kernel base for mobile/ (Konrad: "7.4 is okay"; the fork has no
7.2): sm8150/7.4-rc1-wip at 38ceee3d0, Linux 7.4.0-rc1.  kernel/PIN stays
at 7.0.0 until 7.4 is measured on the phone (mobile/docs/NEXT.md §9b).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:35:50 +00:00
lotherkandClaude Opus 5.5 a6be527b40 mobile: NEXT.md: the plan for Linux 7.4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:42:10 +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 5c5872eb6f mobile: fetch-kernel.sh: reproducible commits, so the same patch series gives the same kernel release
git am stamped the time of the run as commit date: two trees from the same
pin and patches had the same source (tree d31c6d86f032) but other hashes,
and setlocalversion put the hash into the release name (g4db1692fd and
g425f6d5c4), so modules of one did not load with the kernel of the other.
Now a fixed committer and the patch's author date as commit date: two
fresh trees both at 662ea51c5ed9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:44:09 +00:00
lotherkandClaude Opus 5.5 fc38c85bec mobile: NEXT.md: the kernel tree from refs/linux is the same source, but not the same release name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:41:57 +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 544ad0b4a8 mobile: system and data apart on userdata (task B)
/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.
2026-11-09 23:12:26 +00:00
lotherkandClaude Opus 5.5 6a71779264 mobile: docs/NEXT.md: detailed instructions for continuing (WLAN race, persistent /data with /etc overlay, BT, slot b)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 07:19:29 +00:00
lotherkandClaude Opus 5.5 1c1f2ab04e mobile: HANDOFF: persistent data across updates, Android's system/data split as the model
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 07:16:27 +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 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 2e1943a743 mobile: BOOT.md: the host has IPv4 only from the initramfs DHCP; IPv6 link-local as the way in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 07:58:16 +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 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 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