|
K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
|
Public Headers | |
| file | boot.h |
Data Structures | |
| struct | kfsw_boot_diagnostics |
Macros | |
| #define | KFSW_BOOT_IMAGE_ID_SIZE 32U |
| #define | KFSW_BOOT_PARAM_TABLE_ID 32U |
| #define | KFSW_BOOT_PARAM_TABLE_NAME "boot" |
Enumerations | |
| enum | kfsw_boot_revert_reason { KFSW_BOOT_REVERT_NONE = 0 , KFSW_BOOT_REVERT_UNCONFIRMED_REPLACED = 1 , KFSW_BOOT_REVERT_REPLACED_UNKNOWN = 2 } |
| enum | kfsw_event_boot_id { KFSW_EVENT_BOOT_READY = 1 , KFSW_EVENT_BOOT_LASTWORDS = 2 } |
Functions | |
| void | kfsw_boot_get_diagnostics (struct kfsw_boot_diagnostics *value) |
| int | kfsw_boot_diagnostics_start (void) |
| int | kfsw_boot_record_image (const uint8_t image[KFSW_BOOT_IMAGE_ID_SIZE], bool confirmed, bool revert_pending) |
| int | kfsw_boot_confirm_image (void) |
| void | kfsw_boot_service_start (void) |
| uint32_t | kfsw_boot_get_reset_cause (void) |
| const char * | kfsw_boot_get_image_version (void) |
| const char * | kfsw_boot_get_revisions (void) |
| const char * | kfsw_boot_get_hardware_id (void) |
| void | kfsw_boot_count_restart (void) |
| uint32_t | kfsw_boot_get_count (void) |
Variables | |
| const struct kfsw_param_definition_set | kfsw_boot_param_definitions |
Boot and readiness markers.
| #define KFSW_BOOT_IMAGE_ID_SIZE 32U |
#include <boot.h>
SHA256 identity of the signed running image.
| #define KFSW_BOOT_PARAM_TABLE_ID 32U |
#include <boot.h>
Parameter table of this service, in the service band.
| #define KFSW_BOOT_PARAM_TABLE_NAME "boot" |
#include <boot.h>
Parameter table name.
#include <boot.h>
Cause established by the service, not a bootloader verdict.
| enum kfsw_event_boot_id |
#include <boot.h>
Event IDs of the boot service.
IDs are never reused.
| int kfsw_boot_confirm_image | ( | void | ) |
| void kfsw_boot_count_restart | ( | void | ) |
#include <boot.h>
Count a restart.
Called after the snapshot is restored, so the count continues from the saved value. The count saturates.
| int kfsw_boot_diagnostics_start | ( | void | ) |
#include <boot.h>
Record one startup after storage mount, before starting other services.
| uint32_t kfsw_boot_get_count | ( | void | ) |
#include <boot.h>
Restarts recorded across the life of the node.
| void kfsw_boot_get_diagnostics | ( | struct kfsw_boot_diagnostics * | value | ) |
#include <boot.h>
Copy the diagnostics, including their validity indication.
| const char * kfsw_boot_get_hardware_id | ( | void | ) |
| const char * kfsw_boot_get_image_version | ( | void | ) |
#include <boot.h>
Version of the running image, from the build.
| uint32_t kfsw_boot_get_reset_cause | ( | void | ) |
| const char * kfsw_boot_get_revisions | ( | void | ) |
#include <boot.h>
Short revision of every repository compiled into this image.
Formatted as app:<sha> plat:<sha> svc:<sha> comms:<sha> mod:<sha>, with a trailing + on a repository that had uncommitted changes when it was built. The image version identifies only k-fsw; this string also identifies its dependencies.
| int kfsw_boot_record_image | ( | const uint8_t | image[KFSW_BOOT_IMAGE_ID_SIZE], |
| bool | confirmed, | ||
| bool | revert_pending | ||
| ) |
#include <boot.h>
Record an observed image boot in the existing persistent filesystem.
| image | SHA256 image identity. |
| confirmed | Whether the running image is confirmed. |
| revert_pending | Whether MCUboot currently schedules a revert. A record that fails its checks (-EBADMSG: size, magic, field range or CRC) is renamed to boot-trial.bad, replacing the previous rejected record, before a fresh KBT1 record starts. An open or read error keeps the record and fails. An unconfirmed image starts at attempt one; a confirmed image starts at zero. |
| void kfsw_boot_service_start | ( | void | ) |
#include <boot.h>
Emit the boot and readiness markers.
|
extern |
#include <boot.h>
Image identity and last reset reason.