3.6 KiB
tools/ -- scripts around the build
What it is for
The scripts the root Makefile targets call, and the helpers for tests,
media, the source sets and MCDE. Building is cross and native, never in a VM;
a VM is only for testing installs and upgrades (root AGENTS.md).
What is in it
All scripts are POSIX sh; each one's header says usage and purpose, read it
before running it.
Build and release (called by make):
build-stamp.sh-- content key of the sources;make isoruns it with-c(check only),make build|releasewithout (removes the derived artefacts when the key changed, so after a source changemake releaseis needed).pkgsrc-cross.mk.conf-- the pkgsrc cross configuration (rootAGENTS.md).makronix-set.sh-- themakronixset list and METALOG records from the installed/usr/pkg.userland.sh--make userland/make binaries; the package lists arepackages*.listin the root.ext-dist.sh,mcde-dist.sh,ext-sync.sh-- the distfile anddistinfoof a fork inext/, and its recipe copied into pkgsrc.pkg-binaries.sh-- fetch the NetBSD project's binary packages.images.sh--unpack|pack|sumsof the install images (make usb,make compress); images stay raw unless packing is asked for.cd2.sh,cd3.sh,cd-com0.sh-- the second and further install CDs (make iso), and a CD copy whose loader talks oncom0.makronix-distfiles.sh,makronix-pins.sh,msrc-stage.sh-- the source set (make sourcesets,docs/OFFLINE-BUILD.md).
Tests (they run VMs; docs/PLATFORMS.md):
vmsh.sh-- a QEMU machine on a serial console driven fromsh; state inbuild/vmsession/. The VM driver to use.vm-boot-iso.sh,vm-screendump.sh-- boot an image once, log the serial console or save the screen.install-simple.sh,install-cgd.sh-- end-to-end installation tests.test.sh(make test),mediacheck.sh-- the tests of a release.devvm.sh,host-nfs-setup.sh-- the kept VM ofdocs/BUILD-VM.md.
MCDE and the logo:
mcde-host.sh(make mcde-host),mcde-linux.sh(make mcde-linux),mcde-shot.sh-- MCDE on this host, and screenshots.logo-ascii.sh,theme-logo.sh-- the logo as ASCII, and in a palette's colours (docs/logo/AGENTS.md).
claude-build-gate.sh -- PreToolUse hook that enforces the forbidden commands
(root AGENTS.md, .claude/AGENTS.md). Its match is textual: a command that
names releasedir and contains rm , mv , cp , touch , chmod ,
sed -i or > is refused, so a read-only command with 2>&1 is refused too.
Known defect: it parses the hook's JSON with an inline python3 -c (line 11),
against the sh rule; to be rewritten.
Legacy, being removed with the VM build (vmbuild/AGENTS.md): vmbuild/,
packages.vm.list, vm-pkgbuild.sh, vm-pkgcollect.sh, vm-boot.cfg, and
the Python drivers vmctl.py, vmmon.py. Do not extend them and do not
describe them as the way to build.
What may be changed
Anything here, freely, as long as it stays POSIX sh (check with dash -n)
and its header and this list stay true. A script that gains or loses a job
changes here in the same commit.
What must not be touched
- No script builds by a path the root
Makefiledoes not name, and none writes under the release directory by hand. - No Python, no unattended loops or timers (root
AGENTS.md, "Forbidden"). - Writing an install stick is not in the tree: check
lsblkfirst (a name that is not a block device makesddwrite a plain file into /dev) and read the stick back twice before it goes to a machine.