Skip to content

add a bundle subcommand that packs an OTA bundle from a manifest - #7

Merged
joeferner merged 1 commit into
mainfrom
ota
Sep 2, 2026
Merged

joeferner merged 1 commit into
mainfrom
ota

Conversation

@joeferner

Copy link
Copy Markdown
Owner

Replaces the two Python packers that had been copied between projects and then edited apart. The container comes from rpi-loader-ota, so the packer and the firmware that installs a bundle are now the same code by construction rather than by anyone remembering.

A bundle.toml rather than arguments: what goes into a bundle is a property of the project, not of the invocation. Arguments could just about carry a kernel and one directory, which is what the scripts did; they cannot carry a settings file, a firmware blob and a certificate with a destination each, and the moment they try, a card's layout lives in a Makefile in a form nothing can check.

Directory sources are packed recursively now that a bundle can carry a path, sorted so the same tree always produces the same bytes, and dotfiles are skipped at every level.

--upload posts the result to a running board and prints what it says the update cost its card. Plain HTTP, and ureq with default features off, so no TLS reaches the dependency tree of a tool whose endpoint is a board on a local network.

The tests build real directory trees and check the result by parsing it with rpi-loader-ota, the same code the firmware runs: a failure there means the packer and the installer disagree, which is the one thing the crate exists to prevent.

Note that make package for the CLI cannot pass until rpi-loader-ota 0.1.0 is on crates.io. cargo strips the path dependency when packaging and resolves the version, which is what proves the published crate would build.

Replaces the two Python packers that had been copied between projects and
then edited apart. The container comes from rpi-loader-ota, so the packer
and the firmware that installs a bundle are now the same code by
construction rather than by anyone remembering.

A bundle.toml rather than arguments: what goes into a bundle is a
property of the project, not of the invocation. Arguments could just
about carry a kernel and one directory, which is what the scripts did;
they cannot carry a settings file, a firmware blob and a certificate with
a destination each, and the moment they try, a card's layout lives in a
Makefile in a form nothing can check.

Directory sources are packed recursively now that a bundle can carry a
path, sorted so the same tree always produces the same bytes, and
dotfiles are skipped at every level.

--upload posts the result to a running board and prints what it says the
update cost its card. Plain HTTP, and ureq with default features off, so
no TLS reaches the dependency tree of a tool whose endpoint is a board on
a local network.

The tests build real directory trees and check the result by parsing it
with rpi-loader-ota, the same code the firmware runs: a failure there
means the packer and the installer disagree, which is the one thing the
crate exists to prevent.

Note that `make package` for the CLI cannot pass until rpi-loader-ota
0.1.0 is on crates.io. cargo strips the path dependency when packaging
and resolves the version, which is what proves the published crate would
build.
@joeferner
joeferner merged commit 3ad923b into main Sep 2, 2026
5 checks passed
@joeferner
joeferner deleted the ota branch September 2, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant