<?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 image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79609/mcuboot-image-in-secondary-slot-is-not-valid</link><description>Hello, I currently have nrf9160 devices deployed running nrf connect sdk v1.3.0 that fails to reboot into the secondary image. It specifically happens when I try to send a update that was built with nrf connect version 1.4.2 
 From my old versions build</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Sep 2021 13:54:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79609/mcuboot-image-in-secondary-slot-is-not-valid" /><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331963?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 13:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25e88360-9035-49ef-ad79-389560dc90e7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;mcuboot cannot update itself. for that you&amp;#39;ll need two stage bootloader, for instance the immutable bootloader to update mcuboot:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/samples/bootloader/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/samples/bootloader/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331789?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 18:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5853c2e-515a-4d0c-862e-4c09459877b7</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Is it possible to flash build/zephyr/merged.hex by sending an update that contains a bootloader? Or will I run into flash protection issues?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331788?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 18:30:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ba38b80-8002-462e-91db-1f0de8dbf027</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Yikes... Well I currently have a large amount of devises deployed with RSA signatures and even more devices deployed with ECDSA signatures. I am guessing what happened was we factory flashed the new sdk right when the default signature was switched.&lt;/p&gt;
&lt;p&gt;I guess&amp;nbsp;going forward I will have to add logic to determine what signature the device takes and it have it OTA the binary with the correct signature.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331639?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 08:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03baf43b-4da1-4e06-b2ba-2938d389b74c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you mean manually verifying the .hex, this can be done by programming the &amp;quot;app_test_update.hex&amp;quot; in&amp;nbsp;directory build-folder/zephyr/. This will populate the primary slot with the new firmware.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are able to program your external flash, you can program it with &amp;quot;app_moved_test_update.hex&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331586?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 21:36:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24951e12-c7eb-4cbf-ad7c-f9dd1b4295af</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Can I manually flash the area the bootloader is?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331216?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 07:30:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac0653a0-2d65-4255-97d1-1d6effe6828b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As mentioned, you need to set this configuration consistently on all projects in order for mcuboot to accept your image.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can either go at this by using RSA (ie. setting CONFIG_BOOT_SIGNATURE_TYPE_RSA), or you can choose the ECDSA signature type (setting&amp;nbsp;CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to use ECDSA signature type, set this in the configuration for your project in ncs v1.3.0, and it will be default-selected for newer versions as its the default selection.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331136?ContentTypeID=1</link><pubDate>Fri, 24 Sep 2021 15:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3085e2a5-d259-4235-8383-380762835644</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Hi, when I specify this in my ncs 1.4.2 project my device running sdk version 1.3 successfully take the image.&lt;/p&gt;
&lt;p&gt;When I try to OTA the same image to devices already running ncs 1.4.2 it fails at the same spot... My goal is to OTA all the devices to identical images running the same ncs version&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331123?ContentTypeID=1</link><pubDate>Fri, 24 Sep 2021 13:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d6f04a4-54ca-49ee-b290-fb86de61a244</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should set this in the mcuboot configuration file.&lt;/p&gt;
&lt;p&gt;As ncs v1.4.2 is an older version, you need to specify this in the CMakeLists.txt file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Add this just below the line &amp;quot;cmake_minimum_required(...)&amp;quot; !!
if (EXISTS &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;)
  list(APPEND mcuboot_OVERLAY_CONFIG
    &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;
    )
endif()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then create mcuboot.conf in your application folder and add the CONFIG entry there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note&lt;/span&gt;&lt;/strong&gt;: for newer ncs versions, you&amp;nbsp;should&amp;nbsp;create my_application/child_image/mcuboot.conf and it will be automatically picked up and merged with the default configuration.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/331119?ContentTypeID=1</link><pubDate>Fri, 24 Sep 2021 13:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fab30e7-8b4d-4fa7-9855-daafe98c502a</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Hello when I try this I get the error,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Merged configuration &amp;#39;C:/Users/ballen/code/ttp/lte-modem/prj.conf&amp;#39;
-- Configuring incomplete, errors occurred!
-- Using NCS Toolchain 1.4.2 for building. (C:/Users/ballen/ncs/v1.4.2/toolchain/cmake)
warning: unit address and first address in &amp;#39;reg&amp;#39; (0x50000) don&amp;#39;t match for /soc/peripheral@40000000/flash-controller@39000/flash@0/partitions/partition@40000
warning: unit address and first address in &amp;#39;reg&amp;#39; (0xc0000) don&amp;#39;t match for /soc/peripheral@40000000/flash-controller@39000/flash@0/partitions/partition@b0000

warning: MBEDTLS_SHA1_C (defined at C:/Users/ballen/ncs/v1.4.2/nrfxlib\nrf_security/Kconfig:1293)
was assigned the value &amp;#39;y&amp;#39; but got the value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies:
NRF_SECURITY_ANY_BACKEND (=n), NORDIC_SECURITY_BACKEND (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_MBEDTLS_SHA1_C.html and/or look up
MBEDTLS_SHA1_C 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.


C:/Users/ballen/code/ttp/lte-modem/prj.conf:48: warning: attempt to assign the value &amp;#39;y&amp;#39; to the undefined symbol BOOT_SIGNATURE_TYPE_RSA

error: Aborting due to Kconfig warnings

CMake Error at C:/Users/ballen/ncs/v1.4.2/zephyr/cmake/kconfig.cmake:239 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/Users/ballen/ncs/v1.4.2/zephyr/cmake/app/boilerplate.cmake:591 (include)
  CMakeLists.txt:9 (include)



error: cmake failed
create_nordic_project.py failed (1)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/329467?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 13:51:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be535fcb-5622-4529-8018-540e36cb9c53</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Hi Hakon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the original (nor new) project does not have &amp;quot;CONFIG_BOOT_SIGNATURE_TYPE_RSA=y&amp;quot; set. The two versions have identical prj.conf files.&lt;br /&gt;&lt;br /&gt;I tested if the new firmware would boot successfully&amp;nbsp;if it was built with sdk version 1.3.0 and it does (boots fine on deployed devices running sdk version 1.3.0).&lt;br /&gt;&lt;br /&gt;I will add&amp;nbsp;CONFIG_BOOT_SIGNATURE_TYPE_RSA=y to the the v1.4.2 and do another update test.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot image in secondary slot is not valid</title><link>https://devzone.nordicsemi.com/thread/329418?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 11:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6542297-b9a4-4a90-bdba-59b7b63420b0</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you check if the mcuboot boot signature algorithm type is equal on both ends? This was defaulted to ECDSA (CONFIG_BOOT_SIGNATURE_TYPE_RSA=y) in mcuboot after ncs v1.2.0.&lt;/p&gt;
&lt;p&gt;If the original project has &amp;quot;CONFIG_BOOT_SIGNATURE_TYPE_RSA=y&amp;quot; set, this must also be set in future projects. Could you check this and set this on the ncs v1.4.x project?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>