Support additive FAT files via files_append#28
Draft
jetm wants to merge 2 commits into
Draft
Conversation
`cargo clippy --all-targets -- -D warnings`, which CI enforces, flags `partition.size.unwrap()` guarded by a preceding `partition.size.is_some()` as `unnecessary_unwrap`. The two-step check-then-unwrap also lets the guard and the use drift apart. Match the value once with `if let Some(size)` and use the binding directly, so the guard cannot diverge from the unwrap and clippy passes clean. Signed-off-by: Javier Tia <javier@peridio.com>
Both supported boot chains deliver a custom device-tree overlay by
enumerating it in a FAT partition's `files` list, but that list is
authored by the BSP and stone replaces (never merges) a manifest's
file arrays. A project could therefore only add its own overlay by
restating the entire BSP file list, which goes stale the moment the
BSP changes its boot files.
Add a `files_append` field the FAT builder concatenates onto `files`,
keyed by output path. An identical {in,out} re-emitted on an incremental
rebuild collapses to a no-op, so a regenerative delivery step is safe to
run every build; two entries targeting the same output from different
inputs error out instead of silently overwriting a boot file. Both build
paths (bundle and provision) and the describe output honor the field, and
manifests without it still parse.
Also normalizes pre-existing rustfmt drift in the touched files (and one
adjacent bundle test) so `cargo fmt --check` passes; the repo's drift was
confined to exactly these files.
Signed-off-by: Javier Tia <javier@peridio.com>
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.
Problem
The device-tree-overlay feature needs to add compiled
.dtbofiles to a target's FAT boot partition at bundle time, but stone's manifest had no way to append files to an existing FAT image.Solution
Add
files_appendsupport to the manifest so additional files are injected into a FAT partition image without redefining it.Key changes
files_appendif letReviewer notes
Enabler for the Avocado device-tree-overlay feature (ENG-2134). meta-avocado's overlay delivery hook and the avocado-cli DTO commands build on this. First to merge in the stack: stone -> meta-avocado -> avocado-cli.