33 Commits
Author SHA1 Message Date
lotherk 6199effa3c $Makronix$ in libmxlinux, the rule in AGENTS.md, and build/logs for a clone
Three gaps, all found by running `make release' on a fresh clone instead of
trusting the tree that had been built in for weeks.

1. tools/userland.sh: fetch_binaries redirects into build/logs/, but nothing
   created that directory: a clone has no build/ below AGENTS.md, so step 2/7
   died with "Error code 1" from the shell, before pkg-binaries.sh ran, and
   the log it points at was never written.  mkdir -p first.  The other two
   redirects into build/logs (pkg-add, pkg-delete) come after it.

2. src/lib/libmxlinux: four files had no header at all (mx_termios.h,
   mxlinux.h, mx_locale.c, mx_fgetwln.c).  They now carry `/*\t$Makronix$\t*/'
   like the other 61 there, and all 71 files of the directory have one.
   Checked with gcc -fsyntax-only on each of the four.

3. AGENTS.md says the header rule once, in "Licence": `#\t$Makronix$' in a
   file Makronix wrote, `$NetBSD: <file>,v <rev> ... Exp $' in one taken from
   pkgsrc, never the unfilled template -- the detail is in ext/AGENTS.md
   ("Header").

Tested: tools/test-tools.sh 42 ok, 0 bad.  gcc -fsyntax-only clean on the four
files.  The directory builds through `make userland' (mobile/userland/mk/
mx.prog.mk: mx-lib), not standalone: a plain `bmake' in src/lib/libmxlinux has
no NETBSDSRCDIR (getopt.c comes through .PATH) -- not caused by this change,
the same command failed the same way before it.
2026-11-24 03:33:56 +00:00
lotherk 974603f8a6 pkgsrc: the forks of ext/ build from their tree, not from an archive
Each fork kept a recipe beside its source and a tarball in distfiles/ whose
distinfo had to be regenerated after every commit (tools/ext-dist.sh,
tools/mcde-dist.sh), and the work directory of a build could not see a later
commit at all (tools/ext-resync.sh merged an archive into it).  Three tools,
one artefact per fork in git, and the failure mode that cost the 2026-11-23
release: mcde 288d1383 built from the commit of the day before, because the
recipe's mtime said "not stale".

Now the recipe builds the source tree itself, which is how pkgsrc's own
net/fetch and pkgtools/pkg_install do it: DISTFILES= # empty, do-extract
fills WRKSRC.  What is gone with that:

  - the tarballs (distfiles/{mcde,splinter,junction,wikid,skilld,memoryd,
    tasksd}-*) and their .key
  - tools/ext-dist.sh, tools/mcde-dist.sh, tools/ext-resync.sh and its test
  - fork_archives in tools/makronix-distfiles.sh (nothing to fetch or stage)
  - the distinfo files of the eight recipes

What replaces it: tools/ext-extract.sh, called from do-extract.  It hashes
the tree, copies only the files that differ, keeps the time stamp of the rest
(so a commit rebuilds what it touched and not 27 minutes of MCDE) and
removes the copy when a file left the tree.  The build key of a fork carries
the source commit for the same reason: a commit does not change the recipe.

The recipes keep $Makronix$ as their header; afpfs-ng keeps its upstream
$NetBSD: ...$ line and its real distfile, and fork_src() leaves it alone.

Verified:
  - bmake package built all eight recipes from the tree with no distinfo:
    splinter, junction, wikid, skilld, memoryd, tasksd, mcde (16 MB), and
    mcde-motif's shared tree
  - tools/test-tools.sh: 38 ok, 0 bad (5 new cases for ext-extract.sh)
  - tools/makronix-distfiles.sh check: 0 missing, 0 wrong hash
  - tools/makronix-pins.sh check: PINS matches
2026-11-23 19:49:07 +00:00
lotherk 93aa5bacf2 MCDE: make debian / debian-install -- the desktop as one Debian package
Konrad, 2026-11-22: "i want mcde to support 'make debian' and it'll fully
create and download all required build dependencies and shit and make debian
debian-install would make the deb and all and then even install" and
"inkluding our own motif stuff xyz".

tools/mcde-debian.sh does the three steps in one lock:

  build    installs the build dependencies through apt-get (the ones
           configure.ac stops on and each -dev the tree compiles against),
           builds MCDE from a copy of ext/src/mcde with the path step of
           tools/mcde-host.sh, installs into build/mcde-debian-stage, strips,
           and packs build/mcde-debian/mcde_<version>_<arch>.deb
  install  installs that package
  clean    removes both directories

The package carries its own Motif: libXm, libMrm, libUil, the uil compiler
and the headers live in /usr/mdt, so the desktop runs from its own toolkit
and never from the system's libxm4 (--with-private-motif, as Konrad asked).

Four things cost a run each and are written where they bit:

- dpkg-shlibdeps matches a shlibs line on the SONAME version (libXm.so.4 ->
  4), not on the file version (4.0.4).  With 4.0.4 it ignored the line, found
  the system's libxm4 and put it in Depends.
- -L is the override file dpkg-shlibdeps READS; -T is where it writes the
  substvars it produced.  The first version passed -T and got nothing.
- -x$PKG, or the package depends on itself (every binary links /usr/mdt/lib).
- The version carries the commit, so a rebuild leaves a second .deb beside
  the first and `dpkg -i *.deb' installs both -- the older wins.  One package,
  one file: the old one goes.

debian-mcde/ holds what the package manager cannot do for the desktop: the
control paragraph, a postinst that indexes the fonts MCDE carries under
/usr/mdt/fonts for the X server, and the session entry (Type=XSession,
/usr/share/xsessions/mcde.desktop) -- without it a display manager lists the
host's desktops and not MCDE.

Verified on this host (2026-11-22):
  bmake debian from an empty build/mcde-debian exit=0,
    build/mcde-debian/mcde_0.1.0+git420f66c19e_amd64.deb (42M, 180280 KiB
    installed, 4583 files)
  Depends is free of libxm4/libuil4/libmrm4 and free of mcde itself
  the package carries usr/mdt/lib/libXm.so.4.0.4, libMrm, libUil and the
    uil compiler; /etc/pam.d/dtlogin and dtsession are conffiles
  dpkg -i installs it, postinst runs
  ldd /usr/mdt/bin/dtwm -> /usr/mdt/lib/libXm.so.4 (its own)
  on a private Xvfb: dtsession, dtwm, dtlaunch, dtpad, dtfile and the
    front panel (Applications/Files/Desktop/System/Network) run, no errors
  bmake debian-install exit=0, "mcde 0.1.0+git420f66c19e install ok
    installed", 0 upgraded / 0 newly installed

AGENTS.md and docs/BUILD-CONTRACT.md list mcde-debian.sh among the tools that
need the build lock, next to mcde-host.sh.

t0768
2026-11-22 17:35:17 +00:00
lotherk d234b8be2e docs: README for the tree, drop harness-specific .claude config
README.md collects what Makronix is, the repository layout, the one build
entry point and its gate, the installer/desktop/media design, offline
sources, platforms, the documentation map and the contribution rules from
AGENTS.md, GOAL.md and docs/BUILD-CONTRACT.md. All relative links resolve.

Remove .claude/ from the repository and ignore it: AGENTS.md is the
harness-independent convention. Root AGENTS.md and tools/AGENTS.md now
describe tools/claude-build-gate.sh as a build gate rather than a Claude
hook; docs/reference/AGENTS.md notes the removal of the archived directory.

Verification: sh -n tools/claude-build-gate.sh ok; tools/claude-build-gate-test.sh
25 ok, 0 bad; git check-ignore -v .claude/settings.json matches /.claude/;
README links checked against the tree.
2026-11-22 12:04:30 +00:00
lotherk b207c2c8ad make release builds the whole release: sets, source set, ISO, USB image
Konrad, 2026-11-18: 'make release heisst ein RELEASE, ein RELEASE enthaelt
natuerlich ALLES'.  release now runs build.sh release, then sourcesets, iso
and usb inside its own (re-entrant) lock; iso and usb keep checking the stamp
with -c, so nothing built in the same run is discarded.  cdtest no longer
calls iso a second time.  AGENTS.md and docs/BUILD-CONTRACT.md say so.
2026-11-18 14:21:06 +00:00
lotherk 9bb5f0f6cb docs: tests check the build lock before they start
test.sh, mediacheck.sh, install-simple.sh, install-cgd.sh and mcde-tests.sh
call build-lock.sh --check; an existing build stops them, while make
test/cdtest pass because they hold the lock.
2026-11-16 12:16:16 +00:00
lotherk 09e05087b3 docs: the build lock covers cdtest, the MCDE builds and the tools
AGENTS.md, tools/AGENTS.md and docs/BUILD-CONTRACT.md name the re-entrant
lock, cdtest's whole run, mcde-linux/mcde-host, and the tools that refuse
to write build/obj or releasedir outside the lock (build-lock.sh --held).
2026-11-16 12:11:53 +00:00
lotherk b3b2e6849c build: one build at a time in one tree
A second make in the same tree runs clean_METALOG while the first one's
copy-releasedir still reads METALOG.sanitised; the CD staging then dies
with a missing file (t0286, build/logs/release-2026-11-16-guide.log).
The root Makefile's build, release, stamp, iso, usb, sourcesets, tools,
kernel, userland and clean-sanity targets now take tools/build-lock.sh,
which refuses a second build with the holder's pid and takes over a
stale lock.  The lock is documented in the root and tools AGENTS.md.
2026-11-16 09:09:45 +00:00
lotherk 8c4ec13341 docs: document art 'bin' and makronix-set removal in AGENTS.md 2026-11-15 13:28:46 +00:00
lotherkandClaude Sonnet 5.5 abd4c853de licence: CNCL for what Makronix wrote itself
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:48:02 +00:00
lotherkandClaude Opus 5.5 175e4d29c4 X in the base again: build.sh -x -X xsrc, X11_TYPE=native; unpatched packages as NetBSD binaries
- Makefile: -x -X $(XSRC); build-stamp keys on xsrc/ too; PINS and
  makronix-pins.sh carry xsrc/BASE.
- pkgsrc-cross.mk.conf: X11_TYPE=native (pkgsrc uses the sysroot's /usr/X11R7).
- packages.list: no pkgsrc X any more (the X sets carry server, drivers,
  fonts, clients); built here only the forks of ext/ (MCDE, Motif,
  afpfs-ng) and flex; vim, git, samba, netatalk, sshfs, borg, pulseaudio,
  pavucontrol, cups, firefox, thunderbird and the games (RetroArch with
  all libretro cores, ScummVM with BASS and FOTAQ, Tux Racer) are the
  NetBSD project's binaries (kind fetch).
- pkg-binaries.sh: resolve by PKGPATH (samba4 is samba-4.x), an empty
  queue no longer trips set -u; cd3.sh top.list by PKGPATH as well.
- userland.sh: the host tools of the whole dependency closure.
- AGENTS.md, GOAL.md: the decision and why (measured: "The X-server can
  not be started on display :0").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:14:39 +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 Sonnet 5.5 15260ce07c AGENTS.md: short; the measurements and narratives moved to docs/reference; cross and native are one build, the VM only tests
NATIVE_CC for the cross build (devel/gmp CC_FOR_BUILD was empty).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 13:57:30 +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 870676e771 make binaries: the binary packages built in the build VM, as a repository for the media
The project's binaries need X in the base, Makronix has X from pkgsrc.
userland.sh binaries (make binaries; BINARIES=... before the lists name
them) builds packages.binary*.list in the build VM, vm-pkgbuild.sh repo packs
them with their run-time closure and pkg_summary.gz, and the host unpacks the
repository into build/packages/ARCH/All, where tools/cd3.sh takes it from.
The VM's mk.conf gets DEPENDS_TARGET=package-install (every dependency as a
binary package); a dependency installed before gets its package from its
PKGPATH.  vmprep() is the VM preparation that vm() and binaries() share.
The lists name PKGPATHs (still paused); cd3.sh, pkg-binaries.sh and the
tests' wanted() take the last part as the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:18:20 +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 e093232e4a AGENTS: the makronix set carries MCDE instead of CDE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:51:45 +00:00
lotherk f705d43c6a AGENTS: Xorg and the X clients are built in the build VM too 2026-11-10 00:03:07 +00:00
lotherk f6645dd53c AGENTS: record the tradcpp cross-build finding and its host workaround 2026-11-09 23:48:39 +00:00
lotherk e7bd6d9407 tree: drop xsrc, track src, X from pkgsrc
- 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.
2026-11-09 23:30:07 +00:00
lotherkandClaude Opus 5.5 861608eaaa AGENTS.md: make usb, compress, test; tools/AGENTS.md: cd-com0.sh, -U, VMSH_AHCI
Written by opencode (iceman-contributor-free), checked against Makefile:79-92,
tools/test.sh, tools/vmsh.sh:97-100, tools/cd-com0.sh:7-12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 07:54:37 +00:00
lotherkandClaude Sonnet 5.5 2cda72050a Rebrand: Makronix 0.99.9, based on NetBSD
Kernel banner, boot loaders, motd, /etc/release, getty banner, boot.cfg menus,
sysinst messages and the media names say Makronix (patch 0015, overlay).
kern.ostype stays NetBSD on purpose.  install-simple: 38 PASS.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:52:49 +00:00
lotherkandClaude Sonnet 5.5 840782e24c sysinst, media, tests: desktop defaults, four CDs, Portuguese, AHCI test VMs
- sysinst simple mode: sshd on with root login by password, npf firewall,
  mDNS (mdnsd, nsswitch), PulseAudio, CUPS, dbus; extra programs from N
  package CDs (extras.c); cgd root fix (mnt2_mounted)
- Portuguese (pt_BR) catalogs and patch 0013; welcome text for DVD/CDs
- media: console=auto (0008), RAM-disk installer with two CDs (0012),
  package CDs and DVD packages (cd3.sh), userland.sh for the build VM
- tests: line-by-line checks, mDNS pattern, UEFI Enter loop, VMSH_AHCI
  (QEMU 11.1.2 loses PIIX IDE interrupts under load)
- docs: UPDATING.md, npf-default.conf, AGENTS.md updates

Measured 2026-11-07: simple 37 PASS, DVD+sources 42 PASS, cgd BIOS 35 PASS;
cgd UEFI with console=auto not green yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 21:09:35 +00:00
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
makronix 86cbd747c7 read the documentation first, save it locally, quote it before acting. 2026-11-04 08:25: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
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 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