Skip to content

bundle --sdcard, and release 0.3.0 - #8

Merged
joeferner merged 2 commits into
mainfrom
sdcard
Sep 2, 2026
Merged

joeferner merged 2 commits into
mainfrom
sdcard

Conversation

@joeferner

Copy link
Copy Markdown
Owner

Two commits: the --sdcard option, then the version bump.

--sdcard <dir>

Writes a bundle's contents onto a mounted card, for the update a board
cannot be sent — a build that changes the bundle format the running
firmware reads, one that broke networking, or a board not on the network
yet.

It unpacks the bundle it just built rather than writing the sources a
second time. That is the longer way round, and it is what makes a card
written by hand and a board updated over HTTP provably the same bytes,
checked by the same code.

The directory must already exist: a mount point does and a typo does not.
Files are flushed to the device as they are written, since the next thing
anyone does after this command is pull the card out.

Release 0.3.0

First release publishing two crates from this repository — the CLI at
0.3.0, and rpi-loader-ota on its own version at 0.1.0. Minor rather
than patch because the CLI's argument surface is a compatibility surface.

Verified

make pre-commit and make package on a clean tree. The whole path has
been exercised on hardware: a bundle written to an SD card with
--sdcard, booted, then a bundle installed over HTTP on the same board.

For the update a board cannot be sent: a build that changes the bundle
format the running firmware reads, one that broke networking, or a board
not on the network yet. The card goes in a reader and comes out holding
what an over-the-air update would have put there.

It unpacks the bundle it just built rather than writing the source files
a second time. The entries are in hand already, so going back through
Bundle::parse is the longer way round -- and it is what makes "I flashed
it by hand" and "I sent it over the network" provably the same bytes,
checked by the same code. It also means every path has been validated
against escaping its directory before any of them is joined to a path on
this machine.

The directory has to exist. A mount point does and a typo does not, and
creating one silently produces a card that looks written and a directory
of files nobody will find again.

Files are flushed to the device as they are written rather than left in
the page cache, since the next thing anyone does after this command is
pull the card out.

What it writes is what the bundle carries, which is deliberately less
than a card needs to boot: a manifest describes what an update replaces,
so a settings file a project excludes on purpose is not in it.
The `bundle` subcommand and its `--sdcard` option, and with them the
first release in which this repository publishes two crates: the CLI at
0.3.0 and `rpi-loader-ota` on its own version, already at 0.1.0.

A minor bump rather than a patch because the CLI's arguments are a
compatibility surface -- a new subcommand is additive, but RELEASING.md
counts the argument surface as one, and 0.x bumps the minor for anything
that moves it.
@joeferner
joeferner merged commit 16957cd into main Sep 2, 2026
5 checks passed
@joeferner
joeferner deleted the sdcard branch September 2, 2026 01:31
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