<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>mcuboot with custom key</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86064/mcuboot-with-custom-key</link><description>Hi, 
 I have the exact problem in this issue: https://devzone.nordicsemi.com/f/nordic-q-a/60609/problem-with-mcuboot 
 NCS version: 1.9 
 Board: nrf52840dk_nrf52840 
 The output: 
 
 There are different suggestions in the accepted solution: 
 &amp;quot; Try to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Mar 2022 08:31:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86064/mcuboot-with-custom-key" /><item><title>RE: mcuboot with custom key</title><link>https://devzone.nordicsemi.com/thread/359522?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 08:31:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c2d1048-ea49-4842-b095-c149fce1dac2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ozan,&lt;/p&gt;
&lt;p&gt;Thank you for the update. The difference between these two approaches is that &amp;quot;-Dmcuboot_CONF_FILE=mcuboot_prj.conf&amp;quot; (kconfig fragment) will cause the mcuboot_prj.conf symbols to become merged with the default prj.conf file in /ncs/bootloader/mcuboot/boot/zephyr/prj.conf rather than replacing it like the child_image-&amp;gt;mcuboot-&amp;gt;prj.conf file does.&lt;/p&gt;
&lt;p&gt;From the multi-image build chapter you linked to above:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1648023206505v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Both methods should work, but it&amp;#39;s important you include the absolute path to your key file when merging the CONFIG_BOOT_SIGNATURE_KEY_FILE symbol with /ncs/bootloader/mcuboot/boot/zephyr/prj.conf. Otherwise, the build system will fail to locate your key.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot with custom key</title><link>https://devzone.nordicsemi.com/thread/359466?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 00:28:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4b66112-92aa-401f-8bb5-9fb4030b28e7</guid><dc:creator>ozanoner</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve just noticed that I can use &amp;quot;child_image/mcuboot&amp;quot; folder for the purpose as you mentioned in your reply. I thought providing &amp;quot;-Dmcuboot_CONF_FILE=mcuboot_prj.conf&amp;quot; would suffice but it is not. I learnt something new, thanks for that.&lt;/p&gt;
&lt;p&gt;Here is the full log for the record (successful compile):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west build --pristine -b nrf52840dk_nrf52840
-- west build: making build dir /home/ozan/projects/tmp/smp_svr_t1/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/tmp/smp_svr_t1
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/versions/3.6.8/bin/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: /home/ozan/projects/tmp/smp_svr_t1/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/smp_svr_t1/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/smp_svr_t1/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/smp_svr_t1/build/zephyr/dts.cmake
Parsing /home/ozan/projects/ncs/zephyr/Kconfig
Loaded configuration &amp;#39;/home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/prj.conf&amp;#39;
Configuration saved to &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc

=== child image mcuboot -  begin ===
loading initial cache file /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/child_image_preload.cmake
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/shims/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /home/ozan/projects/ncs/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Generated zephyr.dts: /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/dts.cmake
Parsing /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration &amp;#39;/home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/child_image/mcuboot/prj.conf&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf&amp;#39;
Configuration saved to &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/ozan/projects/tmp/smp_svr_t1/build/mcuboot/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
CMake Warning at /home/ozan/projects/ncs/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
  

        ----------------------------------------------------------
        --- WARNING: To maintain the integrity of secure boot, ---
        --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
        ----------------------------------------------------------


MCUBoot bootloader key file: /home/ozan/projects/tmp/smp_svr_t1/child_image/mcuboot/mcuboot_private.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ozan/projects/tmp/smp_svr_t1/build/mcuboot
=== child image mcuboot -  end ===

-- Configuring done
-- Generating done
-- Build files have been written to: /home/ozan/projects/tmp/smp_svr_t1/build
-- west build: building application
[1/226] Preparing syscall dependency handling

[7/226] Performing build step for &amp;#39;mcuboot_subimage&amp;#39;
[1/247] Preparing syscall dependency handling

[237/247] Linking C executable zephyr/zephyr_pre0.elf

[241/247] Linking C executable zephyr/zephyr_pre1.elf

[247/247] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       21200 B        24 KB     86.26%
            SRAM:       23456 B       256 KB      8.95%
        IDT_LIST:          0 GB         2 KB      0.00%
[205/226] Linking C executable zephyr/zephyr_pre0.elf

[209/226] Linking C executable zephyr/zephyr_pre1.elf

[218/226] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       44468 B     511488 B      8.69%
            SRAM:       15904 B       256 KB      6.07%
        IDT_LIST:          0 GB         2 KB      0.00%
[226/226] Generating zephyr/merged.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And the directory structure after extracting the zip file that you&amp;#39;ve attached:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ tree -I build
.
├── 6011.child_image.zip
├── child_image
│   └── mcuboot
│       ├── mcuboot_private.pem
│       └── prj.conf
├── CMakeLists.txt
├── overlay-bt.conf
├── overlay-bt-tiny.conf
├── overlay-cdc.conf
├── overlay-fs.conf
├── overlay-serial.conf
├── overlay-serial-console.conf
├── overlay-shell.conf
├── overlay-shell-mgmt.conf
├── overlay-udp.conf
├── prj.conf
├── README.rst
├── sample.yaml
├── src
│   ├── bluetooth.c
│   ├── common.h
│   ├── main.c
│   └── udp.c
└── usb.overlay&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Related doc:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope this helps to others who faces a similar problem.&lt;/p&gt;
&lt;p&gt;Many thanks.&lt;/p&gt;
&lt;p&gt;Ozan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot with custom key</title><link>https://devzone.nordicsemi.com/thread/359463?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 23:38:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c58a47-41c6-49ca-b5f7-ba381dbb5411</guid><dc:creator>ozanoner</dc:creator><description>&lt;p&gt;Hi Vidar, sorry if I didn&amp;#39;t provide enough information in the original post.&lt;/p&gt;
&lt;p&gt;Here is the steps what I did:&lt;/p&gt;
&lt;p&gt;1- Create a new project from smp_svr sample&lt;/p&gt;
&lt;p&gt;2- Compile it with the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west build --pristine -b nrf52840dk_nrf52840 . -- -DCONF_FILE=prj.conf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the full log for this compilation:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west build --pristine -b nrf52840dk_nrf52840 . -- -DCONF_FILE=prj.conf

-- west build: making build dir /home/ozan/projects/tmp/child_image/smp_svr/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/tmp/child_image/smp_svr
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/versions/3.6.8/bin/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/dts.cmake
Parsing /home/ozan/projects/ncs/zephyr/Kconfig
Loaded configuration &amp;#39;/home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/prj.conf&amp;#39;
Configuration saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc

=== child image mcuboot -  begin ===
loading initial cache file /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/child_image_preload.cmake
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/shims/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /home/ozan/projects/ncs/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Generated zephyr.dts: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/dts.cmake
Parsing /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration &amp;#39;/home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/prj.conf&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf&amp;#39;
Configuration saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
CMake Warning at /home/ozan/projects/ncs/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
  

        ----------------------------------------------------------
        --- WARNING: To maintain the integrity of secure boot, ---
        --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
        ----------------------------------------------------------


MCUBoot bootloader key file: /home/ozan/projects/ncs/bootloader/mcuboot/root-ec-p256.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot
=== child image mcuboot -  end ===

CMake Warning at /home/ozan/projects/ncs/nrf/modules/mcuboot/CMakeLists.txt:262 (message):
  

        ---------------------------------------------------------
        --- WARNING: Using default MCUBoot key, it should not ---
        --- be used for production.                           ---
        ---------------------------------------------------------
        



-- Configuring done
-- Generating done
-- Build files have been written to: /home/ozan/projects/tmp/child_image/smp_svr/build
-- west build: building application
[1/226] Preparing syscall dependency handling

[6/226] Performing build step for &amp;#39;mcuboot_subimage&amp;#39;
[1/182] Preparing syscall dependency handling

[172/182] Linking C executable zephyr/zephyr_pre0.elf

[176/182] Linking C executable zephyr/zephyr_pre1.elf

[182/182] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       33252 B        48 KB     67.65%
            SRAM:       17696 B       256 KB      6.75%
        IDT_LIST:          0 GB         2 KB      0.00%
[205/226] Linking C executable zephyr/zephyr_pre0.elf

[209/226] Linking C executable zephyr/zephyr_pre1.elf

[218/226] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       44468 B     499200 B      8.91%
            SRAM:       15904 B       256 KB      6.07%
        IDT_LIST:          0 GB         2 KB      0.00%
[226/226] Generating zephyr/merged.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As expected, it gives a warning about using the default key file as provided in the original mcuboot library, but the compilation is successful.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;====== Now adding a custom key file (as you did in your reply) =======&lt;/p&gt;
&lt;p&gt;3- I&amp;#39;m adding&amp;nbsp;the key file (mcuboot_private.pem) and the mcuboot config file (prj.conf -&amp;gt; rename to mcuboot_prj.conf) that you&amp;#39;ve shared in your reply into the project folder&lt;/p&gt;
&lt;p&gt;4- &lt;span&gt;Compile it with the following command:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west build --pristine -b nrf52840dk_nrf52840 . -- -Dmcuboot_CONF_FILE=mcuboot_prj.conf -DCONF_FILE=prj.conf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;5- This time, it gives the error that I showed in the first post as the following (full log):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west build --pristine -b nrf52840dk_nrf52840 . -- -Dmcuboot_CONF_FILE=mcuboot_prj.conf -DCONF_FILE=prj.conf

-- west build: making build dir /home/ozan/projects/tmp/child_image/smp_svr/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/tmp/child_image/smp_svr
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/versions/3.6.8/bin/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/dts.cmake
Parsing /home/ozan/projects/ncs/zephyr/Kconfig
Loaded configuration &amp;#39;/home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig&amp;#39;
Merged configuration &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/prj.conf&amp;#39;
Configuration saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/ozan/projects/tmp/child_image/smp_svr/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc

=== child image mcuboot -  begin ===
loading initial cache file /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/child_image_preload.cmake
Including boilerplate (Zephyr base): /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.7.99 (/home/ozan/projects/ncs/zephyr), build: v2.7.99-ncs1
-- Found Python3: /home/ozan/.pyenv/shims/python3.6 (found suitable exact version &amp;quot;3.6.8&amp;quot;) found components: Interpreter 
-- Found west (found suitable version &amp;quot;0.12.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ozan/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version &amp;quot;1.5.0&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/home/ozan/Downloads/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /home/ozan/projects/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /home/ozan/projects/ncs/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Generated zephyr.dts: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/ozan/projects/tmp/child_image/smp_svr/build/mcuboot/zephyr/dts.cmake
CMake Error at /home/ozan/projects/ncs/zephyr/cmake/kconfig.cmake:213 (message):
  File not found:
  /home/ozan/projects/ncs/bootloader/mcuboot/boot/zephyr/mcuboot_prj.conf
Call Stack (most recent call first):
  /home/ozan/projects/ncs/zephyr/cmake/app/boilerplate.cmake:544 (include)
  /home/ozan/projects/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/ozan/projects/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:44 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at /home/ozan/projects/ncs/nrf/cmake/multi_image.cmake:409 (message):
  CMake generation for mcuboot failed, aborting.  Command: 1
Call Stack (most recent call first):
  /home/ozan/projects/ncs/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
  /home/ozan/projects/ncs/nrf/modules/mcuboot/CMakeLists.txt:216 (add_child_image)


-- Configuring incomplete, errors occurred!
See also &amp;quot;/home/ozan/projects/tmp/child_image/smp_svr/build/CMakeFiles/CMakeOutput.log&amp;quot;.
See also &amp;quot;/home/ozan/projects/tmp/child_image/smp_svr/build/CMakeFiles/CMakeError.log&amp;quot;.
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/ozan/.pyenv/versions/3.6.8/bin/python3 -B/home/ozan/projects/tmp/child_image/smp_svr/build -S/home/ozan/projects/tmp/child_image/smp_svr -GNinja -DBOARD=nrf52840dk_nrf52840 -Dmcuboot_CONF_FILE=mcuboot_prj.conf -DCONF_FILE=prj.conf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, I couldn&amp;#39;t find what I&amp;#39;m doing wrong here.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Many thanks,&lt;/p&gt;
&lt;p&gt;Ozan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot with custom key</title><link>https://devzone.nordicsemi.com/thread/359338?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 11:00:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f89473e-5e82-49af-abff-986a08794b15</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Ozan,&lt;/p&gt;
&lt;p&gt;Did you mean to point me to a different case maybe? The one you linked to did not seem to be related to key management. Either way, do you get the build error if you just use the default key (i.e. when you do not configure the CONFIG_BOOT_SIGNATURE_KEY_FILE setting)?&lt;/p&gt;
&lt;p&gt;I was not able to replicate your build error here. I took the smp_svr sample and added the child_image directory attached below to override the MCUBoot&amp;#39;s default build configuration and use my &amp;#39;mcuboot_private.pem&amp;#39; RSA keyfile.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6011.child_5F00_image.zip"&gt;devzone.nordicsemi.com/.../6011.child_5F00_image.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>