Unify the hdr_cpy (we don't need two)

pull/622/head
David Garske 2025-11-14 16:43:53 -08:00 committed by Daniele Lacamera
parent c2ed553da1
commit 3a85a27fb9
3 changed files with 25 additions and 2 deletions

View File

@ -3654,6 +3654,19 @@ make VORAGO_SDK_DIR=$PWD../VA416xx_SDK/
34636 4 26976 61616 f0b0 wolfboot.elf
```
Example of wolfBoot binary sizes based on algorithms:
| Authentication | Hash | wolfBoot Size |
|----------------|------|---------------|
| ECC256 | SHA256 | 25,836 |
| ECC384 | SHA384 | 34,652 |
| ECC521 | SHA384 | 38,608 |
| ED25519 | SHA256 | 31,448 |
| RSA2048 | SHA256 | 19,148 |
| RSA3072 | SHA384 | 28,828 |
| RSA4096 | SHA3-384 | 19,216 |
| ML-DSA 87 | SHA256 | 25,168 |
### Flashing Vorago VA416x0
Flash using Segger JLink: `JLinkExe -CommanderScript tools/scripts/va416x0/flash_va416xx.jlink`

View File

@ -875,8 +875,14 @@ static uint8_t *get_sha_block(struct wolfBoot_image *img, uint32_t offset)
}
#ifdef EXT_FLASH
#ifdef UNIT_TEST
static uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
static int hdr_cpy_done = 0;
#else
/* use from libwolfboot.c */
extern uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
extern int hdr_cpy_done;
#endif
/**
* @brief Get a copy of the image header.

View File

@ -904,8 +904,8 @@ uint16_t wolfBoot_find_header(uint8_t *haystack, uint16_t type, uint8_t **ptr)
}
#ifdef EXT_FLASH
static uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
static uint32_t hdr_cpy_done = 0;
uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
uint32_t hdr_cpy_done = 0;
#endif
/**
@ -949,6 +949,10 @@ static inline uint16_t im2ns(uint16_t val)
}
#ifdef DELTA_UPDATES
/* forward declaration */
static uint8_t* wolfBoot_get_image_from_part(uint8_t part);
/**
* @brief Get delta update information.
*