Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits: the
--sdcardoption, 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-otaon its own version at 0.1.0. Minor ratherthan patch because the CLI's argument surface is a compatibility surface.
Verified
make pre-commitandmake packageon a clean tree. The whole path hasbeen exercised on hardware: a bundle written to an SD card with
--sdcard, booted, then a bundle installed over HTTP on the same board.