mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-22 05:12:16 -05:00
A sweep over every commented file in the tree. What is kept is what a reader needs to change the code safely: what a thing is, its signature, the invariants other files depend on, and the traps that fail silently (find's non-zero exit under set -e, s6's baked-in libexecdir, the -lm that decides whether _sqlite3 exists, opkg's compile-time prefix). What goes is the narration around it: incident histories, arguments against alternatives already rejected, restatements of the code below, and paragraphs re-explaining a rule three files already state. One paragraph in pkgs/3rdparty/opkg/build.sh was duplicated outright. Comment lines 7971 -> 6158. Every change is comment-only: no non-comment line differs anywhere in the 86 files, checked mechanically. Commented-out config directives (#fast_feed: 30000 and friends) are documentation of defaults and are kept. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMMpQTajN7RDJySrhQ2cTE
49 lines
2.4 KiB
Plaintext
49 lines
2.4 KiB
Plaintext
# anvil-core -- this repo's own files: the init scripts, the two shell
|
|
# libraries everything sources, the helper programs and the configuration.
|
|
#
|
|
# THE ONLY RECIPE WHOSE SOURCE IS ENTIRELY THIS CHECKOUT, which is why it says
|
|
# so with pkg_intree and why the cache key needs the extra field below.
|
|
#
|
|
# ARCHITECTURE all. Shell, Python source, JSON and Klipper .cfg -- not one
|
|
# byte of native code, so there is no architecture to claim and no reason for
|
|
# a printer to reject it.
|
|
PKG_NAME=anvil-core
|
|
PKG_ARCH=all
|
|
|
|
# THE VERSION IS THE RELEASE'S. MOD_VER is what bin/pack.sh stamps on the
|
|
# tarball, and it is pinnable (MOD_VER=20260824) precisely so an old release
|
|
# can be rebuilt. It is monotone, so opkg orders upgrades correctly.
|
|
PKG_VERSION="$MOD_VER"
|
|
PKG_RELEASE=1
|
|
PKG_SECTION=base
|
|
PKG_EXCLUDE=".version"
|
|
|
|
# No Depends, deliberately. The init scripts call s6 and start Moonraker, so
|
|
# naming anvil-s6 and anvil-moonraker here looks right -- and would be wrong:
|
|
# each is a separate package that a build can leave out (BUILD_MOONRAKER) or a
|
|
# printer can `opkg remove`, and the scripts that would have started it must
|
|
# still install and still say, in the boot log, that it is not there.
|
|
PKG_DEPENDS=""
|
|
PKG_BUILD_DEPENDS=""
|
|
|
|
# THE CACHE KEY IS THE CONTENT, because the version cannot be. MOD_VER is a
|
|
# date: pinned, an edit to a payload script would read as "already current";
|
|
# unpinned, the package rebuilds once a day whether or not anything changed.
|
|
# So the version says which release this is and this says what is in it.
|
|
#
|
|
# IT IS ONE find OVER ONE DIRECTORY. This used to be an eight-path list naming
|
|
# subtrees by hand, which goes stale the first time somebody ships a file from
|
|
# a directory nobody remembered to add -- silently, because a stamp that
|
|
# misses an input reports "already current" rather than failing. build.sh
|
|
# stages $PKG_DIR/payload wholesale, so hashing it wholesale cannot drift.
|
|
#
|
|
# seed/ is deliberately NOT hashed: it is not in the package, so an edit to
|
|
# anvil.conf.in must not invalidate a build whose output does not contain it.
|
|
#
|
|
# It has to stay cheap: pkg_conf is called for every recipe by pkg_recipes, by
|
|
# pkg_order and by pkg_needs, so this hash runs several times per build.
|
|
PKG_STAMP_EXTRA="$(pkg_payload_hash)"
|
|
|
|
|
|
PKG_DESCRIPTION="The mod's own scripts and configuration: init.d services, the shared environment and service libraries, the wifi and startup helpers, and the nginx and Moonraker config."
|