diff options
author | Dov Shlachter <dovs@google.com> | 2024-02-28 10:48:46 -0800 |
---|---|---|
committer | Dov Shlachter <dovs@google.com> | 2024-03-14 11:28:54 -0700 |
commit | 7b7fe1bfd57f5c508b042e2e868ee4ac3cce7208 (patch) | |
tree | 0829046d764209b7c73e04155e6c4434693a3cc7 /gbl/libgbl/BUILD | |
parent | 92a40b7c1df92fa5c84c748161bfa6930ac7048f (diff) | |
download | libbootloader-7b7fe1bfd57f5c508b042e2e868ee4ac3cce7208.tar.gz |
Add storage writeback for A/B/R slot management
The slots::Cursor structure now maintains a reference to a writable
block device.
This is passed to the manager context on drop to allow for writeback
to storage.
It can also be used during fastboot to write to partitions or dump
partitions to host.
Includes ergonomic modifications to libstorage AsBlockDevice trait and
ancillary traits and free functions.
Specifically:
1. Split write* methods into write and write_mut variants that take
&[u8] and &mut [u8] respectively.
2. Remove the templating from write* methods.
3. Merge the BlockDeviceWrite back into AsBlockDevice
These are quality of life tests that make it easier to store block
devices and use their methods.
Tests: all gbl unit tests pass
Change-Id: Ib20f5c4d5a660dd1e312c30f60dd21c67802dc28
Diffstat (limited to 'gbl/libgbl/BUILD')
-rw-r--r-- | gbl/libgbl/BUILD | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gbl/libgbl/BUILD b/gbl/libgbl/BUILD index cdc974d..0ef63fb 100644 --- a/gbl/libgbl/BUILD +++ b/gbl/libgbl/BUILD @@ -27,6 +27,7 @@ rust_library( "@bitflags", "@crc32fast", "@cstr", + "@gbl//libstorage", "@gbl//third_party/libzbi", "@spin", "@zerocopy", @@ -41,6 +42,7 @@ rust_test( "@gbl//libgbl/testdata:test_image.img", "@gbl//libgbl/testdata:testkey_rsa4096.pem", "@gbl//libgbl/testdata:testkey_rsa4096.pub.pem", + "@gbl//libgbl/testdata:writeback_test_disk.bin", ], deps = [ "@avb//:avb_test", |