|
PebbleOS
|
Build information stored at the end of every firmware image. More...
Data Structures | |
| struct | FirmwareMetadata |
| Firmware image metadata, 47 bytes, packed. More... | |
Macros | |
| #define | FW_METADATA_CURRENT_STRUCT_VERSION 0x1 |
| Value of FirmwareMetadata::metadata_version written by this firmware. | |
| #define | FW_METADATA_VERSION_SHORT_BYTES 8 |
| Size of FirmwareMetadata::version_short in bytes. | |
| #define | FW_METADATA_VERSION_TAG_BYTES 32 |
| Size of FirmwareMetadata::version_tag in bytes. | |
| #define | FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (false) |
| Value of FirmwareMetadata::is_recovery_firmware for this build. | |
| #define | FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformUnknown) |
| Value of FirmwareMetadata::hw_platform for the board being built. | |
Build information stored at the end of every firmware image.
The firmware places a FirmwareMetadata in its .pbl_fw_version section, linked last, so a .bin image ends with the 20-byte GNU build ID followed by this structure. The firmware reads it back from flash for the recovery and update images, and host tools (tools/fw_binary_info.py, the GDB scripts) parse it from .bin and .elf files. All fields are little-endian.
| struct FirmwareMetadata |
Firmware image metadata, 47 bytes, packed.
Firmware image metadata.
The four flags share one byte, starting at bit 0.
| Data Fields | ||
|---|---|---|
| uint8_t | hw_platform | Hardware platform, a FirmwareMetadataPlatform value. |
| bool | is_ble_firmware: 1 | Bluetooth controller firmware image; always false for PebbleOS. |
| bool | is_dual_slot: 1 | Built for the dual-slot layout of the pblboot bootloader. |
| bool | is_recovery_firmware: 1 | Recovery firmware (PRF) image. |
| bool | is_slot_0: 1 | Built to run from slot 0 of a dual-slot layout; false for slot 1 and single-slot images. |
| uint8_t | metadata_version | Structure version, FW_METADATA_CURRENT_STRUCT_VERSION; the last byte of the image. |
| uint8_t | reserved: 4 | Reserved, 0. |
| char | version_short[FW_METADATA_VERSION_SHORT_BYTES] | Abbreviated commit hash (7 characters), NUL-terminated. |
| char | version_tag[FW_METADATA_VERSION_TAG_BYTES] |
Version from git describe, e.g. "v4.9.0", NUL-terminated, at most 31 characters. |
| uint32_t | version_timestamp | Commit time of the build's source revision, in seconds since the Unix epoch. |
| #define FIRMWARE_METADATA_HW_PLATFORM (FirmwareMetadataPlatformUnknown) |
Value of FirmwareMetadata::hw_platform for the board being built.
FirmwareMetadataPlatformUnknown for boards without an entry.
| #define FIRMWARE_METADATA_IS_RECOVERY_FIRMWARE (false) |
Value of FirmwareMetadata::is_recovery_firmware for this build.
true when built with CONFIG_RECOVERY_FW.
| #define FW_METADATA_CURRENT_STRUCT_VERSION 0x1 |
Value of FirmwareMetadata::metadata_version written by this firmware.
| #define FW_METADATA_VERSION_SHORT_BYTES 8 |
Size of FirmwareMetadata::version_short in bytes.
| #define FW_METADATA_VERSION_TAG_BYTES 32 |
Size of FirmwareMetadata::version_tag in bytes.
Hardware platform a firmware image is built for.
Values are stable: they are stored in images. Bigboards (development boards) and emulators count down from 0xff.
tools/fw_binary_info.py.