Skip to content

Commit

Permalink
Added test for sim-encrypt-delta-nvm-writeonce
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Oct 20, 2023
1 parent 5872b4d commit 705ccb2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test-powerfail-simulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,39 @@ jobs:
- name: Run update-revert test with power failures (AES128 NVM_WRITEONCE FLAGS_HOME FLAGS_INVERT)
run: |
tools/scripts/sim-update-powerfail-resume.sh
# TEST with encryption (aes128) and NVM_WRITEONCE and DELTA updates
- name: make clean
run: |
make distclean
- name: Select config with encrypted updates
run: |
cp config/examples/sim-encrypt-delta-nvm-writeonce-update.config .config
- name: Build tools
run: |
make -C tools/keytools && make -C tools/bin-assemble
- name: Build wolfboot.elf
run: |
make clean && make test-sim-external-flash-with-enc-delta-update
- name: Run sunny day update test (AES128 DELTA)
run: |
tools/scripts/sim-sunnyday-update.sh
- name: Rebuild wolfboot.elf
run: |
make clean && make test-sim-external-flash-with-enc-delta-update
- name: Run update-revert test (AES128 DELTA)
run: |
tools/scripts/sim-update-fallback.sh
- name: Rebuild wolfboot.elf
run: |
make clean && make test-sim-external-flash-with-enc-delta-update
- name: Run update-revert test with power failures (AES128 DELTA)
run: |
tools/scripts/sim-update-powerfail-resume.sh
23 changes: 23 additions & 0 deletions config/examples/sim-encrypt-delta-nvm-writeonce-update.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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
NVM_FLASH_WRITEONCE=1

# sizes should be multiple of system page size
WOLFBOOT_PARTITION_SIZE=0x40000
WOLFBOOT_SECTOR_SIZE=0x1000
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20000
# 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

0 comments on commit 705ccb2

Please sign in to comment.