mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-21 21:02:16 -05:00
Two strands, both landing here because they had grown into each other in the
working tree.
The printer replica: the printer's real rootfs.squashfs chrooted under
qemu-mipsel, with /usr/prog and /usr/data from the factory image, so a package
is installed by FlashForge's own updater running on the printer's own busybox,
tar, md5sum and unTar. There are no stubs -- if the real prog partition is
missing the harness refuses to run rather than test against mocks. A release
workflow is blocked on it.
The lanes: a file's directory now says whether it can ever reach a printer.
payload/, assets/ ship
bin/, profiles/ build the package
test/, docs/ neither, ever
* the replica's own infrastructure moved out of bin/ and docker/ and in
beside the harness it belongs to (test/extract-rootfs.sh,
test/build-printer-image.sh, test/printer/Dockerfile{,.full})
* the Makefile has two runners: only RUNSIM gets the docker socket and the
replica's variables, so a build cannot reach the docker daemon at all
* replica settings moved to test.env, which nothing in a package reads
* build-time flags renamed BUILD_* (APPLY, REPORT, KLIPPER, TOOLCHANGE,
MAINSAIL, HELIX). MOD_* now means only the runtime switches written into
anvil.conf and re-read by the printer at every boot
* verify.sh fails if any file in a package is byte-identical to one in
bin/, test/, docker/ or profiles/ -- by content, because a name blacklist
would trip over whatever Mainsail happens to call common.sh
Fixed while mapping it:
* BUILD_REPORT was read only inside the BUILD_APPLY=0 branch, so four
profiles declared it and got nothing. It is honoured on both paths now,
and off outside probe: report.sh copies /etc, passwd and shadow onto the
USB stick, which is a diagnostic, not something to hand out.
* three checks in the brick lint had been quietly dead. Two were guarded on
a payload/boot.sh replaced by the firmwareExe wrapper long ago; the third
was the file glob itself, which matched neither firmwareExe nor the
init.d/S* scripts -- the UI wrapper and every service went unscanned. A
missing file is now a failure rather than a silent pass.
* run-tests.sh overwrote config.env and copied it back, leaving the config
you edited one crashed run away from being a fixture. It uses CONFIG_ENV.
* bin/make-uninstall.sh does not exist and never did; README, run-pre.sh and
full.env all pointed at it. Recovery is the stock package, which is what
test-recovery actually proves.
README is now for someone who wants to flash their printer: what it is, which
file, how to flash, what to do when it goes wrong. The rest moved to
docs/how-it-works.md, docs/building.md and docs/testing.md.
make test: 89 passed, 0 failed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
38 lines
1.7 KiB
Bash
38 lines
1.7 KiB
Bash
# creator5-custom-firmware -- TEST configuration
|
|
#
|
|
# cp test.env.example test.env
|
|
#
|
|
# Nothing in this file ever reaches a printer. It configures the replica --
|
|
# the printer's real rootfs under qemu-mipsel -- and nothing else. Build
|
|
# inputs and anything that ships live in config.env.
|
|
|
|
# ---- the replica's /usr/prog and /usr/data ---------------------------------
|
|
# REQUIRED for every test that runs inside the replica. It is the factory
|
|
# image -- the printer's real /usr/prog and /usr/data, giving the replica the
|
|
# genuine klipper daemons, nginx, python3, checkEboard, moonraker and, most
|
|
# usefully, the printer's own OpenSSL 1.0.2d, so package decryption is
|
|
# verified against the real implementation. There are no stubs: if this is
|
|
# missing the replica refuses to run rather than test against mocks.
|
|
#
|
|
# One image serves both models. Either take one off your own machine
|
|
#
|
|
# ssh root@printer 'tar -cf - /usr/prog' > prog.tar
|
|
#
|
|
# or use the published factory image
|
|
# (md5 d2fdc0e1deb17c41cbb6016d55ab3031):
|
|
#
|
|
# https://github.com/ghzserg/FF/releases/download/R/Creator5Pro-factory.tar.xz
|
|
PROG_DUMP="$HOME/Desktop/Creator5Pro-factory.tar.xz"
|
|
|
|
# Real partition sizes, from the `df -h` block of the stage-0 probe report.
|
|
# Until these are set the replica's prog/data partitions are unbounded, so an
|
|
# install that runs the machine out of space would pass here and fail there.
|
|
PROG_MB=""
|
|
DATA_MB=""
|
|
|
|
# ---- a prebuilt replica image ----------------------------------------------
|
|
# Skips the local unpack entirely (~1m35s -> ~15s). Built by
|
|
# test/build-printer-image.sh; it carries proprietary FlashForge firmware.
|
|
# PRINTER_IMAGE=monstrofil/creator5-printer:pro
|
|
PRINTER_IMAGE=""
|