libbladeRF  1.7.2
Nuand bladeRF library
Data Fields
bladerf_image Struct Reference

Description

Image format for backing up and restoring bladeRF flash contents

The on disk format generated by the bladerf_image_write function is a serialized version of this structure and its contents. When written to disk, values are converted to big-endian byte order, for ease of reading in a hex editor.

When creating and using a bladerf_image of type BLADERF_IMAGE_TYPE_RAW, the address and length fields must be erase-block aligned.

Definition at line 3688 of file libbladeRF.h.

#include <libbladeRF.h>

Data Fields

char magic [BLADERF_IMAGE_MAGIC_LEN+1]
 
uint8_t checksum [BLADERF_IMAGE_CHECKSUM_LEN]
 
struct bladerf_version version
 
uint64_t timestamp
 
char serial [BLADERF_SERIAL_LENGTH+1]
 
char reserved [BLADERF_IMAGE_RESERVED_LEN]
 
bladerf_image_type type
 
uint32_t address
 
uint32_t length
 
uint8_t * data
 

Field Documentation

uint32_t address

Address of the flash data in this image. A value of 0xffffffff implies that this field is left unspecified (i.e., "don't care").

Definition at line 3739 of file libbladeRF.h.

uint8_t checksum[BLADERF_IMAGE_CHECKSUM_LEN]

SHA256 checksum of the flash image. This is computed over the entire image, with this field filled with 0's.

Definition at line 3703 of file libbladeRF.h.

uint8_t* data

Image data

Definition at line 3745 of file libbladeRF.h.

uint32_t length

Length of the data contained in the image

Definition at line 3742 of file libbladeRF.h.

char magic[BLADERF_IMAGE_MAGIC_LEN+1]

Magic value used to identify image file format.

Note that an extra character is added to store a NUL-terminator, to allow this field to be printed. This NUL-terminator is NOT written in the serialized image.

Definition at line 3697 of file libbladeRF.h.

Reserved for future metadata. Should be 0's.

Definition at line 3728 of file libbladeRF.h.

char serial[BLADERF_SERIAL_LENGTH+1]

Serial number of the device that the image was obtained from. This field should be all '\0' if irrelevant.

The +1 here is actually extraneous; BLADERF_SERIAL_LENGTH already accounts for a NUL terminator. However, this is left here to avoid breaking backwards compatibility.

Definition at line 3723 of file libbladeRF.h.

uint64_t timestamp

UTC image timestamp, in seconds since the Unix Epoch

Definition at line 3713 of file libbladeRF.h.

Type of data contained in the image. Serialized as a uint32_t.

Definition at line 3733 of file libbladeRF.h.

struct bladerf_version version

Image format version. Only the major, minor, and patch fields are written to the disk; the describe field is not used. The version is serialized as: [major | minor | patch]

Definition at line 3710 of file libbladeRF.h.


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