libbladeRF  2.5.0
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 3294 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

◆ address

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 3344 of file libbladeRF.h.

◆ checksum

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 3308 of file libbladeRF.h.

◆ data

uint8_t* data

Image data

Definition at line 3350 of file libbladeRF.h.

◆ length

uint32_t length

Length of the data contained in the image

Definition at line 3347 of file libbladeRF.h.

◆ magic

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 3302 of file libbladeRF.h.

◆ reserved

Reserved for future metadata. Should be 0's.

Definition at line 3333 of file libbladeRF.h.

◆ serial

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 3328 of file libbladeRF.h.

◆ timestamp

uint64_t timestamp

UTC image timestamp, in seconds since the Unix Epoch

Definition at line 3318 of file libbladeRF.h.

◆ type

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

Definition at line 3338 of file libbladeRF.h.

◆ version

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 3308 of file libbladeRF.h.


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