Commit Graph
38 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 b83aaa425b docs: GOAL, AGENTS.md in every directory, build VM, offline build, references
Measurements named with their logs: the installs (BIOS, UEFI, encrypted, two CDs), the NetBSD self-build in the build VM (2 h 02 min, stopping only at checkflist for the missing userland), 9p and NFS against the local disk.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:21 +00:00
lotherkandClaude Sonnet 5.5 6c714a0ea7 tools, Makefile, package lists: media (CD 2, CD 3), install tests, build VM, source sets, binary packages
make iso now also writes CD 2 (makronix set) and CD 3 (binary packages); make sourcesets/isosrc make the source sets and the DVD with them. tools: cd2.sh cd3.sh, install-simple.sh install-cgd.sh (end-to-end tests on the serial console), vmsh.sh devvm.sh (QEMU sessions, the kept build VM), vm-pkgbuild.sh vm-pkgcollect.sh (native pkgsrc builds), pkg-binaries.sh (the project's binary packages), host-nfs-setup.sh (NFS for the build VM; loopback-only through an nftables rule), makronix-distfiles.sh makronix-pins.sh msrc-stage.sh. Package lists: common, per platform, and binary.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:21 +00:00
lotherkandClaude Sonnet 5.5 8988c752b6 sysinst: welcome, simple mode, cgd root (BIOS and UEFI), CDE colours, two CDs, last step, extra programs
Overlay unit usr.sbin/sysinst: cgdroot.c (encrypted install), setup.c (hostname, DHCP, time zone, root password, user in wheel/operator/.../wsrc, dtlogin instead of xdm, ntpd, sshd), extras.c (Firefox/Thunderbird/QEMU from CD 3 or the DVD), Next-CD menu, five languages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:11 +00:00
lotherkandClaude Sonnet 5.5 ec7e59117f patches: serial console, menuc colours, makesrctars msrc, ramdisk cgdconfig, two-CD installcd
0008 also lets installdvd take build/cd3 (the binary packages) through CDBUILDEXTRA: build.sh gives iso-image CDEXTRA= on the make command line, which wins over any Makefile assignment (build.sh:2989). 0009 menuc colour pairs, 0010 makesrctars msrc with the file modes kept, 0011 cgdconfig in the install ramdisk, 0012 installcd from a RAM disk (the makronix set is on CD 2).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:11 +00:00
lotherkandClaude Sonnet 5.5 2e55d77c20 claude: permission rules, AGENTS.md and the build gate
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:11 +00:00
lotherkandClaude Sonnet 5.5 5214e15a20 tools: remove the Python FDE drivers
The goal is a sysinst that encrypts by itself; tools/install-simple.sh and tools/install-cgd.sh drive that in sh. They stay in git history.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:11 +00:00
lotherkandClaude Opus 5.5 c134e25c2b mobile: our initramfs (own busybox), display-init defect measured
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>
2026-11-07 12:46:37 +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 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
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
makronix d41a8c0db1 claude: CLAUDE.md, permission rules and the build gate as a PreToolUse hook 2026-11-05 20:48:08 +00:00
makronix 81be2630a3 tools: the remaining FDE drivers (key input, sysinst sequence, test, vm monitor) 2026-11-05 16:00:30 +00:00
makronix fbe0f4ed1b handoff: measured state of the FDE medium, and the build order that fixes it
The installer cannot read its own CD: cd9660.kmod is 62 hours older than the
kernel inside the same ISO, so the module does not load. build.sh iso-image
only packages releasedir; the kmods come from distribution. Two steps, in this
order, with the timestamp check as the gate.

docs/HANDOFF-2026-11-05.md carries the measurements, the file map and what is
already proven (unencrypted GPT/EFI install boots to login:).
2026-11-05 16:00:21 +00:00
makronix 32fce54f47 tools: install-test.py drives the CD this tree builds over a pty.
The old driver waited for menu text on a unix socket; these menus are drawn
with box characters and their labels are not contiguous text, so it gave up
before sysinst had drawn anything.  This waits only for the two plain strings
the console does contain and otherwise sends keys on a schedule.
2026-11-05 02:00:01 +00:00
makronix 3a49eaba08 0006: the cgd boot delta on top of 0005 -- fs ramdisk-cgdroot.fs instead of load of a kmod.
The previous 0006 was generated from a fully patched tree and therefore
contained 0005's changes as well; it could never apply after it.
2026-11-05 00:06:46 +00:00
Makronix 0636e6ea15 reference: the install image needs a writable medium, and what happens when it does not
The amd64 EFI install image remounts its root read-write and copies
/tmp/gettytab into etc (distrib/amd64/installimage/etc.rc:39,46).  On a
read-only device the kernel accepts the remount and every write returns EIO,
which is the ld0d fsbn-264208 and gettytab transcript the boot failure was
reported as.  Measured both ways on the medium this tree built (2026-11-04):
attached writable it reaches install.sh, attached readonly=on it reproduces
the card.  The CD needs no writable medium -- tmpfs union on etc plus a
gettytab symlink.

Also corrects docs/reference/boot-cfg-timeout.txt section 9: install-image
does build; those runs failed on a stale work.fstab in an object directory
that is not used, because the EFI target builds inside src/.
2026-11-04 23:26:15 +00:00
makronix 9b62ae139d boot.cfg: the amd64 media declare a 5 second menu timeout, and what boots is measured.
The five amd64 boot.cfg.in files carried upstream's 30.  What a medium
actually waits comes from /boot.cfg, and on this tree's media that file is the
etc set's (distrib/sets/lists/etc/md.amd64:3), extracted after the medium's
own copy; measured with tools/boottimeout-probe.py on the built CD: countdown
5,4,3,2,1, menu gone at 5.8s; the same image with that byte set to 9 counts
from 9 and leaves the menu at 16.5s.  The patch makes the declared value equal
to the value that boots.

docs/reference/boot-cfg-timeout.txt records the quotes and the finding;
build/logs/t-d1972f2e-media.log is the release that carried it (rc=0).
2026-11-04 22:28:25 +00:00
makronix 033da08834 cgd boot: use the documented mechanism (fs ramdisk-cgdroot.fs; boot /netbsd), not load of a kmod. 2026-11-04 22:12:04 +00:00
makronix 5f98fe2797 fde-tick: a cron that does the next step itself and always says what it did, instead of an agent session that logs nothing. 2026-11-04 17:38:46 +00:00
makronix 7158df1cf6 tick: prompt moves to tools/agent-tick.prompt, run with 'hermes chat --query-file --oneshot'.
Quoting a multi-line prompt inside a shell string broke twice today (backticks
executed, inner quotes split the argument). A file has no quoting.
2026-11-04 15:12:20 +00:00
makronix 98e5ca2187 tick: backticks in the prompt executed commands inside the double-quoted string; removed. 2026-11-04 15:08:42 +00:00
makronix ccad6dfef7 tick: quoting bug in the cgd note broke the hermes call (double quotes inside the prompt). 2026-11-04 15:08:24 +00:00
makronix 4ef7552971 tick: documentation duty is the first paragraph of every run, and the previous run is audited for it. 2026-11-04 08:29:26 +00:00
makronix 86cbd747c7 read the documentation first, save it locally, quote it before acting. 2026-11-04 08:25:54 +00:00
makronix d18ccdeb38 tick: cgd boot goes through the cgdroot miniroot module -- read that path first. 2026-11-04 08:24:59 +00:00
makronix 89e63fa59d tick: iterate in a live guest and on a booted disk; build an ISO only to prove a fix. 2026-11-03 22:19:16 +00:00
makronix 3f7e52fcfe build stamp: derived artefacts are keyed by content, not by timestamps.
A patch to sysinst left the INSTALL ramdisk and the install CD from an earlier
run in place, and the test measured the previous code.
2026-11-03 21:54:54 +00:00
lotherk 85949dcbf0 AGENTS: the install CD and DVD, built and installed from as built.
build.sh iso-image runs distrib/amd64/cdroms and writes NetBSD-<ver>-amd64.iso
(698 MiB, 20 sets) and the DVD (783 MiB, all 21 sets incl. base32) into
releasedir/images, alongside the two install.img.gz.  Measured install from the
CD: Sets selected 20, base32 reported optional by the installer itself,
extraction complete, installed disk boots to login:, shutdown -p now ends in
ACPI S5.  The CD boots with the pc console, so that transcript is VGA
screenshots; the serial-bootblock selection did not take in this run and is
recorded as open.  images/MD5 and SHA512 now cover all four artifacts.
2026-11-03 17:13:11 +00:00
makronix 9c5a6eae93 src and xsrc stay pristine upstream; our changes are patches under patches/, applied by tools/apply-patches.sh. 2026-11-03 16:41:34 +00:00
makronix 157d3284c4 tick: stage 2 is FDE -- prove an encrypted install boots, patch what is missing. 2026-11-03 16:40:34 +00:00
lotherk b1ec8b7bbd AGENTS: the set sysinst installs, and the medium that proved it.
The makronix set was in the release but no installer unpacked it until
sysinst learned it; record where that lives (defs.h, util.c, SET_SYSTEM,
every msg.mi.*) so the next set addition follows the same four places.

Also record the measured install from the image this tree builds -- 20 sets,
makronix unpacked, /usr/pkg populated, login on com0, clean poweroff -- and
that the image is tested as built: the serial console comes from the loader
prompt, not from a patched boot.cfg.in.
2026-11-03 16:07:40 +00:00
lotherk b89521a956 AGENTS: name the real pkg_install path, and count what the set holds.
`src/usr.sbin/pkg_install` does not exist in this import; the tree builds
`/usr/sbin/pkg_add` from `src/external/bsd/pkg_install`, which is the SUBDIR
'pkg_install' in `external/bsd/Makefile:18`.  Measured against the sysroot:
`file build/obj/destdir.amd64/usr/sbin/pkg_add` reports NetBSD 11.99.9 ELF.

The makronix list has 10826 file entries in 10837 lines; the count in the text
was the line count.  Both numbers are measured after `make release`.
2026-11-03 14:19:38 +00:00
lotherk 980c4113a3 vmbuild: CDE built on a NetBSD host this tree produces, and in the set.
wm/cde cannot be cross-built from Linux (mk/tools/replace.mk:142 refuses
awk:run when OPSYS != NATIVE_OPSYS), so it is built on a live image from src/
under qemu: tools/vm-boot.cfg puts the console on com0, tools/vmctl.py drives
it, and tools/vmbuild/ holds the stages that bootstrap pkgsrc there with
--prefer-native=yes and build the recipe unchanged.

Two settings, both configuration, both scoped to wm/cde in the build host's
mk.conf: FORCE_C_STD=gnu11 (autoconf 2.72 picks C23, where CDE's 'int f();'
means 'int f(void)') and the C wrapper's append list for the five GCC 14
implicit-declaration errors, the only lever that reaches the ksh93 subtree.

stage6 walks the runtime closure over the @pkgdep lines in +CONTENTS, not over
+DEPENDS (that file is in the binary package, not in the registration
database), and the closure is unpacked into the sysroot rather than pkg_add'ed
so CDE's /etc/dt paths do not land on the build host.  10837 set entries,
checkflist green.
2026-11-03 13:52:27 +00:00
makronix c923819a02 pkgsrc cross: NO_SKIP for the run-on-target tool check on a non-NetBSD host.
The tools it guards (awk:run, install-info:run) only ever see TARGET paths and
are never executed here; can-be-built-here.mk documents NO_SKIP for exactly
this case. Without it CDE stops before its first file is compiled.
2026-11-03 10:46:04 +00:00
Makronix Bot d642251347 pkgsrc: cross-build vim for the target, and give /usr/pkg its own set.
vim 9.2.1202 and vim-share build cross with the tree's toolchain
(x86_64--netbsd-gcc) and come out as NetBSD 11.99.9 ELF.  Two
configuration defects had to go first: bootstrap on a Linux host writes
PREFER_PKGSRC=yes, which made pkgsrc rebuild curses (devel/ncurses) for
the host and mix host and target in one build; and the fragment described
a target pkg_install that does not exist, since pkgtools/pkg_install
cannot cross-build.

The 'makronix' set is generated by tools/makronix-set.sh from what the
packages installed plus the METALOG records pkg_add does not write.
See AGENTS.md for the set, the bootstrap flag and where a Linux build
host stops.
2026-11-03 09:54:05 +00:00
lotherk 314f44dc90 pkgsrc: cross bootstrap against the tree's own toolchain.
The tree builds pkgsrc packages for NetBSD/amd64 with the tooldir and the
sysroot that build.sh produced; tools/pkgsrc-cross.mk.conf carries the whole
configuration as the bootstrap's mk-fragment.  Measured: devel/zlib comes out
"for NetBSD 11.99.9", installs into destdir.amd64/usr/pkg through pkgsrc's
bootstrap pkg_add with -p, and checkflist reports those files as extra until a
set lists them.

OPSYS_VERSION in the fragment was 119900900; bsd.prefs.mk computes it as
printf "%02d%02d%02d" of major/minor/patch, so 11.99.9 is 119909, and the
missing CROSS_LOWER_*/CROSS_OBJECT_FMT stop bsd.prefs.mk with "missing cross
variable settings".

Also: build/ is output and now ignored, the tick uses the absolute path to
hermes, and AGENTS.md names the import pins and how a build is gated.
2026-11-03 09:20:06 +00:00
makronix 32032ec800 skeleton: three entry points, the conventions, and the tick that keeps work moving. 2026-11-02 22:30:44 +00:00