Hi,
1. Is bootloader file and firmware file, different for projects build on nCS..?
Or a single executable build file consists both bootloader & firmware..?
2. Can you suggest a sample program to build a bootloader project..?
Thanks,
Hi,
1. Is bootloader file and firmware file, different for projects build on nCS..?
Or a single executable build file consists both bootloader & firmware..?
2. Can you suggest a sample program to build a bootloader project..?
Thanks,
Hello,
Ubaid_M said:1. How does how does the image boot if I have not enabled CONFIG_BOOTLOADER_MCUBOOT=y..?
Then there is no bootloader. The application will be located at 0x00.
Ubaid_M said:Some preexisting bootloader does the job or if system does not find anything at the address,
no. See 1.
Ubaid_M said:3. Can you please suggest if this "BOOTLOADER_MCUBOOT" checks for firmware file image code signing before booting the image..?
Yes it does.
Ubaid_M said:4. If it does, how does it use the key for code signing check on the firmware file..?
It uses a default key, which you should see when you compile. Some message saying that this is a default key which should not be used for production, and that you should change it.
Ubaid_M said:5. How can I update this key..?
I believe it says in the same warning.
Best regards,
Edvin
Thank you Edvin,
Then there is no bootloader. The application will be located at 0x00.
It is clearer now.
Now if I want to generate a private key and add it into the MCUBOOT, what process do I follow..?
Please suggest.
Thanks
Please see this link on how to generate new key pairs.
There is also a Kconfig definition
CONFIG_BOOT_SIGNATURE_KEY_FILE (described as "config BOOT_SIGNATURE_KEY_FILE" in NCS\nrf\modules\mcuboot\Kconfig) where you can set the absolute path of the key file that you have generated.
Best regards,
Edvin
Hello Edvin,
CONFIG_BOOT_SIGNATURE_KEY_FILE
Thank you for the suggestion, it helps.
Further, I understand the usual way mcuboot works with SLOT-0, SLOT-1 & SCRATCH memory locations towards swapping of images for firmware update.
I want to customize a few things here,
1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.
2. I want to provide mcuboot SPI interface APIs to interact with external flash.
So, for the above 2 requirements, kindly suggest how and where I can tweak & build the mcuboot source code.
If any sample is available wherein mcuboot source code is modified, it would be great.
Thanks,
Ubaid
Ubaid_M said:1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.
2. I want to provide mcuboot SPI interface APIs to interact with external flash.
What chip are you using? I believe it is possible to offload this to an external QSPI flash chip by using CONFIG_NORDIC_QSPI_NOR=y. Without knowing the details, perhaps you can look into what this does, and try to implement something similar using SPI.
The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.
BR,
Edvin