I am in the process of adding DFU updates to my NRF Connect SDK application. I have been able to successfully add DFU using the default keys by following the instructions here:
devzone.nordicsemi.com/.../ncs-dfu
However, I am running into issues when trying to change the signing keys to custom ones. I generated my keys using the script located at ncs\v1.9.1\nrf\scripts\bootloader\keygen.py
I then tried a variety of methods I saw discussed in other answer records for pointing my build at my custom key file but none of them worked. Please help me to understand how to point the project at my custom keys.
I am building in Visual Studio with NRF Connect SDK v1.9.1. Below are some of the things I have tried already.
1. I added the following to my prj.conf
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="<path_to_my_file>"
But I get a message indicating that it is still using the default keyfile and this warning message:
CMake Warning at C:/Users/cspangler/ncs/v1.9.1/nrf/modules/mcuboot/CMakeLists.txt:262 (message):
---------------------------------------------------------
--- WARNING: Using default MCUBoot key, it should not ---
--- be used for production. ---
---------------------------------------------------------
CMake Warning at C:/Users/cspangler/ncs/v1.9.1/nrf/modules/mcuboot/CMakeLists.txt:517 (message):
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE is set to "priv_08_09_23_01.pem".
You are using the NCS Mcuboot signing, which means this option will be
ignored.
Image signing in NCS is done via the MCUboot image's
CONFIG_BOOT_SIGNATURE_KEY_FILE option.
Consider setting CONFIG_MCUBOOT_SIGNATURE_KEY_FILE in your application
image back to its default value, the empty string.
2. I added the following to my prj.conf file
CONFIG_BOOT_SIGNATURE_KEY_FILE="<path_to_my_file>"
But I get a message indicating that it is still using the default keyfile and this warning message:
warning: BOOT_SIGNATURE_KEY_FILE (defined at
C:/Users/cspangler/ncs/v1.9.1/nrf/modules/mcuboot/Kconfig:3) was assigned the value
'<path_to_my_file>' but got the value ''. Check these unsatisfied dependencies:
(!MCUBOOT_BUILD_STRATEGY_FROM_SOURCE) (=n). See
docs.zephyrproject.org/.../CONFIG_BOOT_SIGNATURE_KEY_FILE.html and/or
look up BOOT_SIGNATURE_KEY_FILE in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.
I tried setting CONFIG_MCUBOOT_BUILD_STRATEGY_FROM_SOURCE to both y and n but still get the same message.
Any help is appreciated.