Crate flashkit_ubi
Expand description
UBI images and their on-flash structures, and UBI devices on Linux.
Image reads the volumes of UBI images, such as the output of
ubinize. ImageReader reads the blocks of an image one by one, and
EcHeader, VidHeader and VolumeRecord parse their on-flash
structures. This part works without std and an allocator.
ยงFeatures
std: reads images from files on unix and Windows, throughflashkit-io.linux: works with the UBI devices that the Linux kernel attaches. SeeDeviceandVolume. It needs a Linux or Android target and enablesstd.
Re-exportsยง
pub use flashkit_io;
Modulesยง
- crc ๐
- device ๐
linuxand (Android or Linux) - device_
error ๐linuxand (Android or Linux) - ec_
header ๐ - format_
error ๐ - header_
offsets ๐ - headers ๐
- image ๐
- image_
volumes ๐ - media ๐
- Helpers for the on-flash UBI structures in
ubi-media.h. - sys ๐
linuxand (Android or Linux) - ioctl interface of the UBI driver.
- sysfs ๐
linuxand (Android or Linux) - vid_
header ๐ - volume ๐
linuxand (Android or Linux) - volume_
kind ๐ - volume_
reader ๐ - volume_
record ๐ - volume_
table ๐
Structsยง
- Device
linuxand (Android or Linux) - UBI device attached to an MTD device.
- EcHeader
- Erase counter header at the start of every used erase block.
- Header
Offsets - Offsets of the VID header and the data in each erase block.
- Image
- UBI image whose volumes are read through the headers of its blocks.
- Image
Block - Erase block of a UBI image.
- Image
Reader - Reader over the erase blocks of a UBI image, such as the output of
ubinize. - VidHeader
- Volume identifier header of an erase block that holds data.
- Volume
linuxand (Android or Linux) - Volume of a UBI device.
- Volume
Info linuxand (Android or Linux) - Attributes of a UBI volume, read from sysfs.
- Volume
Reader - Reader over the data of a volume in a UBI image.
- Volume
Record - Record of a volume in the volume table.
- Volume
Table - Volume table of a UBI image, checked like the kernel does.
Enumsยง
- Device
Error linuxand (Android or Linux) - Failure of a UBI device operation.
- Format
Error - Invalid UBI header or volume table record.
- Image
Error - Failure to read a UBI image whose source fails with
E. - Volume
Kind - Type of a UBI volume.
- Volume
Read Error - Failure to read from a
VolumeReaderwhose source fails withE.
Constantsยง
- LAYOUT_
VOLUME_ ID - ID of the layout volume, which stores two copies of the volume table.