Merged
Conversation
Implements the `stone bundle` command that replaces the separate validate + create workflow with a single operation that validates inputs, copies manifest artifacts, builds FAT images, generates a self-describing bundle.json, and packages everything into a content-addressable .aos (tar.zst) archive for OTA and provisioning. - Add `update` section to manifest schema (SlotDetection, OsArtifactRef, SlotAction) - Add `update_strategy` field to Runtime - Add sha2, tar, zstd dependencies - bundle.json includes platform info, update strategy, slot targets, partition layout, and artifact checksums - Build dir output is compatible with stone provision (same paths)
stone bundle was not copying files referenced in FAT build_args.files (e.g., initramfs cpio, bzImage) to the build directory. This caused stone provision to fail when trying to rebuild the FAT image since it could not find these source files in any input directory.
Read AVOCADO_OS_BUILD_ID instead of BUILD_ID from os-release when generating bundle.json. BUILD_ID is a monotonic counter set by the production release pipeline, while AVOCADO_OS_BUILD_ID is the deterministic content-addressable UUID computed from installed packages.
Add optional --os-release-initrd CLI arg to stone bundle. When provided, parses AVOCADO_OS_BUILD_ID from the initramfs os-release file and includes initramfs_build_id and verify_initramfs sections in the generated bundle.json.
Add MbrSwitch variant to SlotAction for MBR-based partition table switching (RPi). Add SlotActions untagged enum to support both single action and array of actions for activate/rollback. Bundle serialization now always emits arrays for forward compatibility.
Partitions without explicit offsets now get their byte offsets computed sequentially at bundle time, so bundle.json always includes complete offset information for all partitions.
Add build.rs to capture git rev-parse --short HEAD at compile time. stone --version now shows e.g. "stone 1.9.0 (b2c24ba)".
Add size field to BundleArtifact populated from file metadata, included in the generated bundle.json for progress reporting and validation during streaming OS updates.
Stone's collect_artifacts() checked if an image already existed in the build dir's images/ subdirectory before looking in input dirs. Since the build directory persists between builds, this caused stale rootfs images to be bundled into the .aos even when a fresh rootfs was available in the input directory. The manifest's os_build_id was correct (read from the sysroot) but the actual rootfs binary was from a previous build. Remove the images_dir cache check so pre-existing images are always overwritten from input_dirs.
Add SdbootEfi variant for detecting active slot via GPT partition UUIDs, Efibootmgr variant for managing EFI boot entries per slot, and partition_type/partition_uuid fields on Partition struct.
4903305 to
7f85a85
Compare
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.
Summary
stone bundlecommand for building OS update bundles (.aos)SdbootEfislot detection via GPT partition UUIDsEfibootmgrslot action for EFI boot entry managementMbrSwitchslot action and array activate/rollback support--os-release-initrdflag for initramfs build ID in bundlepartition_typeandpartition_uuidfields toPartitionstructbundle.json--versionoutputAVOCADO_OS_BUILD_IDfor OS update verify checkTest plan
cargo fmt --checkpassescargo clippy --all-targets --all-features --locked -- -D warningspassescargo build --lockedpassescargo test --lockedpasses (102 tests)