Loading...
Searching...
No Matches
update_manifest.h
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include <stdint.h>
8#include <stdbool.h>
9#include <furi.h>
10#include <furi_hal_flash.h>
11
12/* Paths don't include /ext -- because at startup SD card is mounted as FS root */
13#define UPDATE_MANIFEST_DEFAULT_NAME "update.fuf"
14#define UPDATE_MANIFEST_POINTER_FILE_NAME ".fupdate"
15
16typedef union {
17 uint8_t raw[6];
18 struct {
19 uint8_t major;
20 uint8_t minor;
21 uint8_t sub;
22 uint8_t branch;
23 uint8_t release;
24 uint8_t type;
25 } version;
27_Static_assert(sizeof(UpdateManifestRadioVersion) == 6, "UpdateManifestRadioVersion size error");
28
29typedef struct {
30 uint32_t manifest_version;
31 FuriString* version;
32 uint32_t target;
33 FuriString* staged_loader_file;
34 uint32_t staged_loader_crc;
35 FuriString* firmware_dfu_image;
36 FuriString* radio_image;
37 uint32_t radio_address;
38 UpdateManifestRadioVersion radio_version;
39 uint32_t radio_crc;
40 FuriString* resource_bundle;
42 FuriHalFlashRawOptionByteData ob_compare_mask;
44 FuriString* splash_file;
45 bool valid;
47
48UpdateManifest* update_manifest_alloc(void);
49
50void update_manifest_free(UpdateManifest* update_manifest);
51
52bool update_manifest_init(UpdateManifest* update_manifest, const char* manifest_filename);
53
54bool update_manifest_init_mem(
55 UpdateManifest* update_manifest,
56 const uint8_t* manifest_data,
57 const uint16_t length);
58
59bool update_manifest_has_obdata(UpdateManifest* update_manifest);
60
61#ifdef __cplusplus
62}
63#endif
Definition string.c:4
Definition update_manifest.h:29
Definition furi_hal_flash.h:15
Definition update_manifest.h:16