Commit Graph

8 Commits

Author SHA1 Message Date
Keir Mierle
f184163c3f pw_software_update: Update service & proto rework
- Rework the bundle update service methods & related protos
- Enforce state invariants & add transitions
- Remove manifest related functionality for now

Still pending: Unit tests for this system

Requires: pigweed-internal:15720
Change-Id: Id16225a384f81f1f38241e0d6151a5b643ec0cfd
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62443
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
2021-09-30 04:13:44 +00:00
Ewout van Bekkum
7552732cb0 pw_software_update: Use a work_queue for update applying
Updates the update service to use a work queue to apply updates as
this may take a long period of time and includes a device reboot.

Fixes the module configuration for GN.

Also fixes the abort to properly clean up the transfer_id_ state.

And lastly changes DisableTransferId() to be invoked after
BeforeUpdateAbort().

No-Docs-Update-Reason: Module still in early development
Requires: pigweed-internal:15641
Change-Id: Ie7a9e79fc9e9485ddf74b4963756355426b80b0c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62421
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
2021-09-28 05:35:24 +00:00
Ewout van Bekkum
772ec7907d pw_software_update: merge BundledUpdateManager into the service
Merges the BundledUpdateManager into the BundledUpdateService.

Also fixes up the bazel build files.

No-Docs-Update-Reason: Module still in early development
Requires: pigweed-internal:15640
Change-Id: I7061ed9ad02009a1ece92599b4900038eaefc3e7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62420
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-09-27 19:44:10 +00:00
Ewout van Bekkum
a9133b059e pw_software_update: fixup update backend API
Renames the backend header to match the object name.

Adjusts the FinalizeUpdate() API to use Status again to report
finalize failures before the reboot.

Also changes ApplyTargetFile() to be pure virtual.

Changes the backend API to use the Manifest object instead of the
nanopb struct for the manifest.

Moves the Manifest definition to a separate header.

Adds missing pw_protobuf dependency.

Change-Id: I295db6021b26d8ba96512f4627e39b5a76d92815
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/61820
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-09-22 05:01:50 +00:00
Yecheng Zhao
604695e1bd pw_software_update: Parse bundles
Bug: 456
Change-Id: I21e6f8a4e69a037e4c028fc59f9049be1c3b8cdb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/61341
Reviewed-by: David Rogers <davidrogers@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Yecheng Zhao <zyecheng@google.com>
2021-09-21 18:34:39 +00:00
Zihan Chen
f463acd511 pw_software_update: add update_helper and update_service
No-Docs-Update-Reason: this module is far from stablized
Change-Id: I408d575308bcfeb69d6fcb23448472734c729e95
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/59544
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2021-09-14 21:45:43 +00:00
Yecheng Zhao
637b773dcc pw_software_update: Add UpdateBundle class
Adds an empty UpdateBundle class. It is used by the "Update
Manager" to parse, verify and provide access to a staged firmware
update bundle.

Bug: 456
Change-Id: I2df3e784ef50545f9066d4c1146f2558445ff5c8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/58043
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
Reviewed-by: Ali Zhang <alizhang@google.com>
Commit-Queue: Yecheng Zhao <zyecheng@google.com>
2021-09-01 19:17:28 +00:00
Zihan Chen
a6325cd156 pw_software_update: Introduce new module with TUF protos
No-Docs-Update-Reason: executable code is not landed together
Change-Id: I633035855c06f5a62ac3f557bf5ac5115df59e2f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/58100
Pigweed-Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-08-24 22:49:35 +00:00