Running Thread in secure environment

Hi,

  Today I'm trying to run a Thread application on an nRF5340, using the secure environment (not ns).  Building the firmware as ns is fine and works as expected, but when I try to build in the secure environment the build fails because CONFIG_XOROSHIRO_RANDOM_GENERATOR is undefined.  If I comment this out of the config, the firmware builds and runs but won't connect to my local Thread network.  The comment is the .conf file gives a clue as to why this might be:

# Default PRNG entropy for nRF53 Series devices is CSPRNG CC312
# which for that purpose is too slow yet
# Use Xoroshiro128+ as PRNG
CONFIG_XOROSHIRO_RANDOM_GENERATOR=y

Is there a way to use the Xoroshiro algorithm when building this way?

Failing that, (and there's no need to go into this unless there's no solution to the above) the reason I want to use a secure-only configuration is that I'm using a custom 2-stage bootloader which currently is only able to run all-secure firmware.  The second stage is a Zephyr-based bootloader that can copy images as needed from external flash, then writes a signature into RAM and resets.  The first stage is a bare-metal program that checks for this signature and runs either the bootloader or the application.  The intention is that when the application runs, the first-stage bootloader has done as little as possible to the processor configuration.  Despite this, it appears that ns applications won't run if executed by the first-stage bootloader - I suspect that this is to do with the secure/non-secure partitioning although I haven't got to the bottom of it.  Any suggestions of how to resolve this would be welcome.

Parents Reply Children
No Data
Related