Skip to main content

Crate flashkit_ubi

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, through flashkit-io.
  • linux: works with the UBI devices that the Linux kernel attaches. See Device and Volume. It needs a Linux or Android target and enables std.

Re-exportsยง

pub use flashkit_io;

Modulesยง

crc ๐Ÿ”’
device ๐Ÿ”’ linux and (Android or Linux)
device_error ๐Ÿ”’ linux and (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 ๐Ÿ”’ linux and (Android or Linux)
ioctl interface of the UBI driver.
sysfs ๐Ÿ”’ linux and (Android or Linux)
vid_header ๐Ÿ”’
volume ๐Ÿ”’ linux and (Android or Linux)
volume_kind ๐Ÿ”’
volume_reader ๐Ÿ”’
volume_record ๐Ÿ”’
volume_table ๐Ÿ”’

Structsยง

Devicelinux and (Android or Linux)
UBI device attached to an MTD device.
EcHeader
Erase counter header at the start of every used erase block.
HeaderOffsets
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.
ImageBlock
Erase block of a UBI image.
ImageReader
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.
Volumelinux and (Android or Linux)
Volume of a UBI device.
VolumeInfolinux and (Android or Linux)
Attributes of a UBI volume, read from sysfs.
VolumeReader
Reader over the data of a volume in a UBI image.
VolumeRecord
Record of a volume in the volume table.
VolumeTable
Volume table of a UBI image, checked like the kernel does.

Enumsยง

DeviceErrorlinux and (Android or Linux)
Failure of a UBI device operation.
FormatError
Invalid UBI header or volume table record.
ImageError
Failure to read a UBI image whose source fails with E.
VolumeKind
Type of a UBI volume.
VolumeReadError
Failure to read from a VolumeReader whose source fails with E.

Constantsยง

LAYOUT_VOLUME_ID
ID of the layout volume, which stores two copies of the volume table.