Skip to the content.

MCUboot test plan

The current target for running the tests is the Freedom K64F board.

Basic sign support (RSA/EC/EC256)

For each supported signing algorithm, check that non-signed, and signed with wrong key images are not swapped to, and image signed with correct key is swapped to.

For the 3 algorithms supported, rsa, ec and ec256, two files are provided: key_.pem, key__2.pem. And a keys file with the C public key data for key_.pem.

Build and load MCUboot:

Build and load good image in slot 0:


Note

If testing RSA/PSS newt create-image needs to be passed in the extra flag --rsa-pss eg:

newt create-image k64f_blinky 1.0.1 key_rsa.pem --rsa-pss


Build and load image in slot 1 with no signing, signed with key__2.pem and signed with key_.pem. Mark each one as test image and check that swap only happens for image signed with key_.pem. Both others should be erased.

Image signed with more than one key

FIXME: this is currently not functional, skip this section!

Build and load MCUboot:

Build and load good image in slot 0:

Build and load image in slot 1 with no signing, signed with key__2.pem and signed with key_.pem. Mark each one as test image and check that swap only happens for image signed with key_.pem. Both others should be erased.

Use all of this options:

And load

Overwrite only functionality

Build/load MCUboot:

Build/load blinky to slot 0:

Build/load blinky2 both with bad and good key, followed by a permanent swap request:

This should not swap and delete the image in slot 1 when signed with the wrong key, otherwise the image in slot 1 should be moved to slot 0 and slot 1 should be empty.

Validate slot 0 option

Build/load MCUboot:

Build non-signed image:

Build signed image with invalid key:

Build signed image with valid key:

Swap with random failures

DISCLAIMER: be careful with copy/paste of commands, this test uses another target/app!

Build/load MCUboot:

Build/load slinky to slot 0:

Build/load slinky2 to slot 1:

Confirm that both images are installed, request a permanent request to the image in slot 1 and check that it works.

If everything works, now proceed with requests for permanent swap to the image in slot 1 and do random swaps (as much as you like!). When the swap finishes confirm that the swap was finished with the previous slot 1 image now in slot 0 and vice-versa.

Help