Skip to content

Commit 3ada719

Browse files
bigbrettdanielinux
authored andcommitted
code review fixes
1 parent bd4bc19 commit 3ada719

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/firmware_update.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ more detail on the `--header-only` sign tool option.
203203
#### Monolithic updates
204204

205205
The self-update mechanism can be used to update both the bootloader
206-
**and** the application firmware in a single atomic operation. Because
206+
**and** the application firmware in a single operation. Because
207207
`wolfBoot_self_update()` copies `fw_size` bytes from the update image to
208208
`ARCH_FLASH_OFFSET`, a payload that is larger than the bootloader region
209209
will spill into the contiguous BOOT partition, overwriting whatever
210210
application image was there previously.
211211

212-
No wolfBoot code changes are required — only the update payload needs to
213-
be assembled differently. The payload is constructed by concatenating the
212+
To enable this behavior, set `SELF_UPDATE_MONOLITHIC=1` in your build
213+
configuration. The payload should be constructed by concatenating the
214214
new bootloader binary with the new signed application image and signing
215215
the result as a wolfBoot self-update. Note that the user must ensure that padding
216216
is supplied such that the header of the new signed app image will be located

tools/test.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ test-sim-self-update: wolfboot.bin FORCE
272272
# the contiguous boot partition.
273273
test-sim-self-update-monolithic: wolfboot.bin test-app/image_v1_signed.bin FORCE
274274
@echo "=== Simulator Monolithic Self-Update Test ==="
275-
@# Create dummy bootloader (0xAA pattern, exactly BOOTLOADER_PARTITION_SIZE)
275+
@# Create dummy bootloader (0xAA pattern, exactly bootloader region size: WOLFBOOT_PARTITION_BOOT_ADDRESS - ARCH_FLASH_OFFSET)
276276
$(Q)dd if=/dev/zero bs=$$(($(WOLFBOOT_PARTITION_BOOT_ADDRESS) - $(ARCH_FLASH_OFFSET))) count=1 2>/dev/null | tr '\000' '\252' > monolithic_dummy_bl.bin
277277
@# Concatenate dummy bootloader + signed app image to form monolithic payload
278278
$(Q)cat monolithic_dummy_bl.bin test-app/image_v1_signed.bin > monolithic_payload.bin

0 commit comments

Comments
 (0)