mirror of https://github.com/wolfSSL/wolfBoot.git
add a simulator test for using encryption and delta updates
increase argument count max since the tools duplicate the sig and hash argspull/312/head
parent
c32a29539a
commit
6a21c02e6c
|
|
@ -0,0 +1,20 @@
|
|||
ARCH=sim
|
||||
TARGET=sim
|
||||
SIGN?=ED25519
|
||||
HASH?=SHA256
|
||||
WOLFBOOT_SMALL_STACK=1
|
||||
SPI_FLASH=0
|
||||
EXT_FLASH=1
|
||||
ENCRYPT=1
|
||||
ENCRYPT_WITH_AES128=1
|
||||
DEBUG=1
|
||||
DELTA_UPDATES=1
|
||||
# it should be multiple of system page size
|
||||
WOLFBOOT_PARTITION_SIZE=0x40000
|
||||
WOLFBOOT_SECTOR_SIZE=0x1000
|
||||
WOLFBOOT_PARTITION_BOOT_ADDRESS=0xC0020000
|
||||
# if on external flash, it should be multiple of system page size
|
||||
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x00000
|
||||
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x40000
|
||||
# required for keytools
|
||||
WOLFBOOT_FIXED_PARTITIONS=1
|
||||
|
|
@ -1231,7 +1231,7 @@ int main(int argc, char** argv)
|
|||
printf("wolfBoot version %X\n", WOLFBOOT_VERSION);
|
||||
|
||||
/* Check arguments and print usage */
|
||||
if (argc < 4 || argc > 12) {
|
||||
if (argc < 4 || argc > 14) {
|
||||
printf("Usage: %s [options] image key version\n", argv[0]);
|
||||
printf("For full usage manual, see 'docs/Signing.md'\n");
|
||||
exit(1);
|
||||
|
|
|
|||
|
|
@ -163,6 +163,11 @@ test-sim-external-flash-with-enc-update: wolfboot.bin test-app/image.elf FORCE
|
|||
$(Q)$(BINASSEMBLE) external_flash.dd 0 test-app/image_v$(TEST_UPDATE_VERSION)_signed_and_encrypted.bin \
|
||||
$(WOLFBOOT_PARTITION_SIZE) erased_sec.dd
|
||||
|
||||
test-sim-external-flash-with-enc-delta-update:
|
||||
make test-sim-external-flash-with-enc-update DELTA_UPDATE_OPTIONS="--delta test-app/image_v1_signed.bin"
|
||||
$(Q)$(BINASSEMBLE) external_flash.dd 0 test-app/image_v$(TEST_UPDATE_VERSION)_signed_diff_encrypted.bin \
|
||||
$(WOLFBOOT_PARTITION_SIZE) erased_sec.dd
|
||||
|
||||
test-sim-internal-flash-with-update: wolfboot.bin test-app/image.elf FORCE
|
||||
$(Q)cp test-app/image.elf test-app/image.bak.elf
|
||||
$(Q)dd if=/dev/urandom of=test-app/image.elf bs=1K count=16 oflag=append conv=notrunc
|
||||
|
|
|
|||
Loading…
Reference in New Issue