commit | 83a1db41e98a687b55d0f074bbf7a46e276646b1 | [log] [tgz] |
---|---|---|
author | Gianfranco Valentino <gevalentino@google.com> | Mon Apr 12 23:45:31 2021 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Mon Apr 12 23:45:31 2021 +0000 |
tree | 3edc4382363fc13640cfabfd30dfe0716187ff5e | |
parent | 7a6db41b6cfa33efe0f32d108c165a100245fc03 [diff] |
[volume_image]: Introduce MTD Writer. Small layer on top of ftl-mtd library for writing directly to raw nand in linux. This combined with block writer added previously adds the remainig bits for replacing pave. This test is only meaningful in linux for now, since there are no other use cases at the moment for paving directly to raw nand. The test verifies success of the mtd writer. In order to reproduce outside of CQ users need to create a ram mtd device and grant permission to users. Command to generate the mtd device. sudo modprobe nandsim id_bytes=0x2c,0xdc,0x90,0xa6,0x54,0x0 badblocks=5 Then chmod u=rw,og=rw /dev/mtd0 Added ftl_io.h which provides an interface 'FtlHandle' to generate readers and writes to a FTL instance. In order to load a new instance, the volume in the handle must be flushed, so data is persisted. Moved the InMemoryNdm and InMemoryRawNand to a shared test header to test the ftl_io constructs. Then provided a MTD layer, which instantiates a FTL on top of a MTD device. Added to tests: 1) Verifies that arbitrary content is read back correctly. 2) Write a FVM, then write the same FVM to a file, and do a block by block comparison of the contents. This is a paranoid use case. Test: storage-volume-image-test Change-Id: I5c33ee55934442e334dccf6e0dc6ed16725dae5f Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/512775 Commit-Queue: Gianfranco Valentino <gevalentino@google.com> Reviewed-by: James Sullivan <jfsulliv@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.