Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
ubi_ec_hdr Struct Reference

#include <ubi-media.h>

Data Fields

__be32 magic
 
__u8 version
 
__u8 padding1 [3]
 
__be64 ec
 
__be32 vid_hdr_offset
 
__be32 data_offset
 
__be32 image_seq
 
__u8 padding2 [32]
 
__be32 hdr_crc
 

Detailed Description

struct ubi_ec_hdr - UBI erase counter header. : erase counter header magic number (UBI_EC_HDR_MAGIC)

Version
: version of UBI implementation which is supposed to accept this UBI image : reserved for future, zeroes : the erase counter : where the VID header starts : where the user data start : image sequence number : reserved for future, zeroes : erase counter header CRC checksum

The erase counter header takes 64 bytes and has a plenty of unused space for future usage. The unused fields are zeroed. The

Version
field is used to indicate the version of UBI implementation which is supposed to be able to work with this UBI image. If
is greater than the current UBI version, the image is rejected. This may be useful in future if something is changed radically. This field is duplicated in the volume identifier header.

The and fields contain the offset of the the volume identifier header and user data, relative to the beginning of the physical eraseblock. These values have to be the same for all physical eraseblocks.

The field is used to validate a UBI image that has been prepared for a UBI device. The value can be any value, but it must be the same on all eraseblocks. UBI will ensure that all new erase counter headers also contain this value, and will check the value when attaching the flash. One way to make use of is to increase its value by one every time an image is flashed over an existing image, then, if the flashing does not complete, UBI will detect the error when attaching the media.

Definition at line 157 of file ubi-media.h.

Field Documentation

__be32 data_offset

Definition at line 163 of file ubi-media.h.

__be64 ec

Definition at line 161 of file ubi-media.h.

__be32 hdr_crc

Definition at line 166 of file ubi-media.h.

__be32 image_seq

Definition at line 164 of file ubi-media.h.

__be32 magic

Definition at line 158 of file ubi-media.h.

__u8 padding1[3]

Definition at line 160 of file ubi-media.h.

__u8 padding2[32]

Definition at line 165 of file ubi-media.h.

__u8 version

Definition at line 159 of file ubi-media.h.

__be32 vid_hdr_offset

Definition at line 162 of file ubi-media.h.


The documentation for this struct was generated from the following file: