mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
[FL-2269] Core2 OTA (#1144)
* C2OTA: wip * Update Cube to 1.13.3 * Fixed prio * Functional Core2 updater * Removed hardware CRC usage; code cleanup & linter fixes * Moved hardcoded stack params to copro.mk * Fixing CI bundling of core2 fw * Removed last traces of hardcoded radio stack * OB processing draft * Python scripts cleanup * Support for comments in ob data * Sacrificed SD card icon in favor of faster update. Waiting for Storage fix * Additional handling for OB mismatched values * Description for new furi_hal apis; spelling fixes * Rework of OB write, WIP * Properly restarting OB verification loop * Split update_task_workers.c * Checking OBs after enabling post-update mode * Moved OB verification before flashing * Removed ob.data for custom stacks * Fixed progress calculation for OB * Removed unnecessary OB mask cast Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -7,12 +7,26 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <m-string.h>
|
||||
#include <furi_hal_flash.h>
|
||||
|
||||
/* Paths don't include /ext -- because at startup SD card is mounted as root */
|
||||
#define UPDATE_DIR_DEFAULT_REL_PATH "/update"
|
||||
#define UPDATE_MANIFEST_DEFAULT_NAME "update.fuf"
|
||||
#define UPDATE_MAINFEST_DEFAULT_PATH UPDATE_DIR_DEFAULT_REL_PATH "/" UPDATE_MANIFEST_DEFAULT_NAME
|
||||
|
||||
typedef union {
|
||||
uint8_t raw[6];
|
||||
struct {
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
uint8_t sub;
|
||||
uint8_t branch;
|
||||
uint8_t release;
|
||||
uint8_t type;
|
||||
} version;
|
||||
} UpdateManifestRadioVersion;
|
||||
_Static_assert(sizeof(UpdateManifestRadioVersion) == 6, "UpdateManifestRadioVersion size error");
|
||||
|
||||
typedef struct {
|
||||
string_t version;
|
||||
uint32_t target;
|
||||
@@ -21,9 +35,12 @@ typedef struct {
|
||||
string_t firmware_dfu_image;
|
||||
string_t radio_image;
|
||||
uint32_t radio_address;
|
||||
uint32_t radio_version;
|
||||
UpdateManifestRadioVersion radio_version;
|
||||
uint32_t radio_crc;
|
||||
string_t resource_bundle;
|
||||
FuriHalFlashRawOptionByteData ob_reference;
|
||||
FuriHalFlashRawOptionByteData ob_compare_mask;
|
||||
FuriHalFlashRawOptionByteData ob_write_mask;
|
||||
bool valid;
|
||||
} UpdateManifest;
|
||||
|
||||
@@ -38,6 +55,8 @@ bool update_manifest_init_mem(
|
||||
const uint8_t* manifest_data,
|
||||
const uint16_t length);
|
||||
|
||||
bool update_manifest_has_obdata(UpdateManifest* update_manifest);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user