Skip to content

Commit 14bee12

Browse files
committed
Unify the hdr_cpy (we don't need two)
1 parent 13bf713 commit 14bee12

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

docs/Targets.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,6 +3654,19 @@ make VORAGO_SDK_DIR=$PWD../VA416xx_SDK/
36543654
34636 4 26976 61616 f0b0 wolfboot.elf
36553655
```
36563656

3657+
Example of wolfBoot binary sizes based on algorithms:
3658+
3659+
| Authentication | Hash | wolfBoot Size |
3660+
|----------------|------|---------------|
3661+
| ECC256 | SHA256 | 25,836 |
3662+
| ECC384 | SHA384 | 34,652 |
3663+
| ECC521 | SHA384 | 38,608 |
3664+
| ED25519 | SHA256 | 31,448 |
3665+
| RSA2048 | SHA256 | 19,148 |
3666+
| RSA3072 | SHA384 | 28,828 |
3667+
| RSA4096 | SHA3-384 | 19,216 |
3668+
| ML-DSA 87 | SHA256 | 25,168 |
3669+
36573670
### Flashing Vorago VA416x0
36583671

36593672
Flash using Segger JLink: `JLinkExe -CommanderScript tools/scripts/va416x0/flash_va416xx.jlink`

src/image.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,14 @@ static uint8_t *get_sha_block(struct wolfBoot_image *img, uint32_t offset)
875875
}
876876

877877
#ifdef EXT_FLASH
878+
#ifdef UNIT_TEST
878879
static uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
879880
static int hdr_cpy_done = 0;
881+
#else
882+
/* use from libwolfboot.c */
883+
extern uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
884+
extern int hdr_cpy_done;
885+
#endif
880886

881887
/**
882888
* @brief Get a copy of the image header.

src/libwolfboot.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,8 @@ uint16_t wolfBoot_find_header(uint8_t *haystack, uint16_t type, uint8_t **ptr)
904904
}
905905

906906
#ifdef EXT_FLASH
907-
static uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
908-
static uint32_t hdr_cpy_done = 0;
907+
uint8_t hdr_cpy[IMAGE_HEADER_SIZE] XALIGNED(4);
908+
uint32_t hdr_cpy_done = 0;
909909
#endif
910910

911911
/**
@@ -949,6 +949,10 @@ static inline uint16_t im2ns(uint16_t val)
949949
}
950950

951951
#ifdef DELTA_UPDATES
952+
953+
/* forward declaration */
954+
static uint8_t* wolfBoot_get_image_from_part(uint8_t part);
955+
952956
/**
953957
* @brief Get delta update information.
954958
*

0 commit comments

Comments
 (0)