Files
LithosAnanke/tools
Claude 216947a4d4 tools: mkcapsule builds warning-free -- the truncations impossible or handled (#143)
The kernel build's only warnings were five -Wformat-truncation in mkcapsule's
--resolve: two snprintf copies of a capsule name into the claim registry, and
the capsule's path built from base_dir and its name.

- The names: both are char[CAPSULE_NAME_MAX], and names are checked to fit when
  read (line 335) -- copied whole with memcpy, nothing to truncate.
- The path: base_dir may be up to 4095 bytes, so it can be cut, and a cut path
  names another file -- now refused, the capsule left unchanged and counted
  rejected, with the reason.

Seen to fail first: built with -Werror=format-truncation, 5 errors. After: 0,
and 0 warnings with the kernel's flags; the manifest it writes is
byte-identical, --lint passes. The too-long-path refusal is on --resolve's
interactive conflict path and was not driven by a test. CLAUDE.md's count of
open warnings corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-12 15:29:13 +00:00
..

tools/

Build-time and integration-test utilities for the StarForth / LithosAnanke toolchain.

Contents

File Purpose
mkcapsule.c Assembles .4th capsule files into capsule_generated.c baked into the kernel image. Invoked automatically by kernel/Makefile.
mkcapsule Compiled host binary (rebuilt on demand).
ttftest.c Host TTF glyph-rendering test — font rasterization unit tests, no QEMU needed.
pe_reloc_gen.py Generates PE32+ relocation tables for the UEFI loader.
svg_to_png.py Renders every tracked .svg in the repo to a same-named .png via headless Chromium; leaves the source .svg untouched, run manually.
hermes_smoke.sh Hermes v1 hosted smoke test — swaps in the Hermes init capsule and prints values for manual inspection.
hermes_channel_smoke.sh Exercises the full Hermes channel-negotiation lifecycle (CH-REQUEST → CH-ACCEPT → CH-CLOSE → reap) per the protocol in .claude/HERMES.md.
hermes_tripod_smoke.sh Full Tripod integration test — exercises all 6 inter-VM message paths using the DEFER VM-EXEC/IS VM-EXEC dispatcher shim from init.4th.
kconfig/ Vendored Linux kernel Kconfig tooling (conf/mconf/qconf), GPL-2.0. See tools/kconfig/README.md.

mkcapsule

# Invoked automatically by the kernel build:
make -f kernel/Makefile ARCH=amd64 clean qemu

# Manual invocation (for inspection):
./tools/mkcapsule capsules/ build/amd64/kernel/capsule_generated.c

Scans capsules/ for .4th files, computes XXHash64 per capsule, assigns type (m) to init.4th and (p) to everything else.

See also