Skip to content

Commit 2513e7c

Browse files
committed
updater initial idea
1 parent 8f176a6 commit 2513e7c

56 files changed

Lines changed: 41864 additions & 2859 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BootSimulation.module.css

Lines changed: 0 additions & 643 deletions
This file was deleted.

BootSimulation.tsx

Lines changed: 0 additions & 1109 deletions
This file was deleted.

full_core_sdk_export.txt

Lines changed: 27053 additions & 0 deletions
Large diffs are not rendered by default.

plan.md

Lines changed: 567 additions & 113 deletions
Large diffs are not rendered by default.

plan2.md

Lines changed: 613 additions & 292 deletions
Large diffs are not rendered by default.

plan3.md

Lines changed: 928 additions & 186 deletions
Large diffs are not rendered by default.

plan7.md

Lines changed: 695 additions & 168 deletions
Large diffs are not rendered by default.

plan8.md

Lines changed: 1098 additions & 279 deletions
Large diffs are not rendered by default.

production_sdk_export.txt

Lines changed: 4676 additions & 0 deletions
Large diffs are not rendered by default.

sdk/libtoob/include/libtoob.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,24 @@ TOOB_MUST_CHECK toob_status_t toob_ota_begin(toob_ota_ctx_t *ctx, uint32_t total
238238
* @param resume_offset Output pointer for the byte offset to resume from.
239239
* @return TOOB_OK if resumable, TOOB_ERR_NOT_FOUND if no partial download exists.
240240
*/
241+
#define TOOB_OTA_RESUME_MAGIC 0x544F4F42u /* 'TOOB' */
242+
243+
typedef struct __attribute__((aligned(8))) {
244+
uint32_t magic;
245+
uint32_t bytes_staged;
246+
uint8_t artifact_sha256[32];
247+
uint8_t assignment_id[16];
248+
uint32_t crc32_trailer;
249+
uint8_t _padding[4]; /* Explicit padding to 64 bytes */
250+
} toob_ota_resume_state_t;
251+
252+
_Static_assert(sizeof(toob_ota_resume_state_t) == 64, "toob_ota_resume_state_t size drift");
253+
254+
extern TOOB_NOINIT toob_ota_resume_state_t g_toob_ota_resume_state;
255+
256+
void toob_ota_checkpoint_save(uint32_t bytes_staged, const uint8_t sha256[32]);
257+
void toob_ota_checkpoint_clear(void);
258+
241259
TOOB_MUST_CHECK toob_status_t toob_ota_resume(toob_ota_ctx_t *ctx, uint32_t total_size, const uint8_t expected_sha256[32], uint32_t* resume_offset);
242260

243261
/**

0 commit comments

Comments
 (0)