<?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 the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67225/mcuboot-image-in-the-secondary-slot-is-not-valid</link><description>Hi Nordic team 
 Last week and before, I tried sdk connect v3.0.0 http_application_update example. 
 Everything was fine. Pressed button1 to download new bin file and then reseted DK to swap the slot. 
 LED1 and LED2 turned on to show version 2. Used</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Sep 2021 09:12:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67225/mcuboot-image-in-the-secondary-slot-is-not-valid" /><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/330204?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 09:12:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2b50c1b-2d2f-4eb8-b2c0-900dd5711a7b</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/ballen7"&gt;ballen7&lt;/a&gt;: Could you create a new ticket?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/329290?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 00:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bd78bf7-959c-42f4-a452-5fbf3aed91f2</guid><dc:creator>ballen7</dc:creator><description>&lt;p&gt;Any progress?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/276669?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 14:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:615bafd6-9411-4540-ad65-f6c80ba9bb89</guid><dc:creator>Simon</dc:creator><description>&lt;blockquote style="border-left:10px solid rgba(235, 239, 242, 1);color:rgba(17, 23, 26, 1);font-style:italic;font-weight:400;letter-spacing:normal;line-height:1.5em;margin:0 0 0.65em;padding:0 0 0 0.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;
&lt;div style="color:rgba(133, 161, 175, 1);font-weight:600;padding-bottom:5px;"&gt;Jeffery said:&lt;/div&gt;
&lt;div&gt;So, FOTA is not considered to be downward compatible?&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;FOTA should be backwards compatible, just make sure to use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration"&gt;static partitions&lt;/a&gt; in your new application and place everything in the same location as your old application. In order to achieve this, take the file &amp;lt;old-application&amp;gt;/&amp;lt;build-folder&amp;gt;/partitions.yml, and copy it to &amp;lt;new-application&amp;gt;/pm_static.yml.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;hr /&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;Regarding the http_application_update sample not working with NCS v1.3.0, I will report this internally. However, you should still be able to upload your own images to a bucket by following &lt;a style="background-attachment:scroll;background-color:rgba(0, 0, 0, 0);background-image:none;background-size:auto;border-bottom:3px none currentColor;color:rgba(91, 210, 226, 1);text-decoration:none;" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.2/nrf/samples/nrf9160/http_application_update/README.html#specifying-the-image-file"&gt;Specifying the image file&lt;/a&gt;, &lt;a style="background-attachment:scroll;background-color:rgba(0, 0, 0, 0);background-image:none;background-size:auto;border-bottom:3px none currentColor;color:rgba(91, 210, 226, 1);text-decoration:none;" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.2/nrf/samples/nrf9160/http_application_update/README.html#setting-up-an-aws-s3-bucket"&gt;Setting up and AWS S3 bucket&lt;/a&gt; and &lt;a style="background-attachment:scroll;background-color:rgba(0, 0, 0, 0);background-image:none;background-size:auto;border-bottom:3px none currentColor;color:rgba(91, 210, 226, 1);text-decoration:none;" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.2/nrf/samples/nrf9160/http_application_update/README.html#hosting-your-image-on-an-aws-s3-server"&gt;Hosting your image on an AWS S3 Server&lt;/a&gt;. Could you test this and see if you can make that work?&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;Simon&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/276668?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2020 14:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4eb0f0e-a9cd-47aa-9894-2248b3ea810d</guid><dc:creator>Simon</dc:creator><description>&lt;p style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;margin:0 0 0.65em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;It seems like the&amp;nbsp;&lt;em&gt;&lt;/em&gt;image in&amp;nbsp;&lt;a style="background-attachment:scroll;background-color:rgba(0, 0, 0, 0);background-image:none;background-size:auto;border-bottom:3px none currentColor;color:rgba(91, 210, 226, 1);text-decoration:none;" title="http://nrfconnectsdk.s3.eu-central-1.amazonaws.com/app_update.bin" href="http://nrfconnectsdk.s3.eu-central-1.amazonaws.com/app_update.bin" rel="noopener noreferrer" target="_blank"&gt;http://nrfconnectsdk.s3.eu-central-1.amazonaws.com/app_update.bin&lt;/a&gt;&amp;nbsp;is intended to be used for the http_application_updates sample on the &lt;strong style="font-weight:bold;"&gt;master branch&lt;/strong&gt;. I will do some more testing and confirm this.&lt;/p&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;Best regards,&lt;/div&gt;
&lt;div style="color:rgba(17, 23, 26, 1);font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;Simon&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/276323?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2020 01:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:499bc6cc-efaf-48e2-bdce-916115479e07</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;So, FOTA is not considered to be downward compatible?&lt;/p&gt;
&lt;p&gt;Like my case, I developed application code on the basis of ncs v3.0.0.&lt;/p&gt;
&lt;p&gt;If I upgraded my application code to ncs v3.1.0 and uploaded the app_update.bin to AWS,&lt;/p&gt;
&lt;p&gt;as I did DFU, mcuboot (v3.0.0) would reject to swap the new application code.&lt;/p&gt;
&lt;p&gt;Right?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/276247?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 14:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a52f304-912e-40b0-841b-44b6dfd96ab2</guid><dc:creator>Simon</dc:creator><description>[deleted]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/275764?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 07:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dd29e99-4297-43da-85c5-127889218875</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I updated SDK to v3.1.0 and modem to v1.2.1.&lt;/p&gt;
&lt;p&gt;Fot http_application_ipdate, same error happened when downloading bin file and reset to swap slot.&lt;/p&gt;
&lt;p&gt;FYI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jeff&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/275755?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 06:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1caf4fd1-f6ac-478c-88b0-f22b466b86fa</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;At mcuboot loader.c, I added log messages at the six points as you mentioned to figure out the error reason.&lt;/p&gt;
&lt;p&gt;pic1: I added &amp;quot;@@@ number&amp;quot; at loader.c&lt;/p&gt;
&lt;p&gt;pic2: After my DK downloaded the binary file and rebooted by RESET button, the log showed &amp;quot;@@@ 6&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;So, it got error from&amp;nbsp;bootutil_img_validate().&lt;/p&gt;
&lt;p&gt;pic3: I tried to mark off&amp;nbsp;&lt;span&gt;bootutil_img_validate(). Then, tried FOTA again. It can work. Downloaded and swapped both &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;worked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I guessed the app_update.bin file was updated and changed at your AWS bucket these days.&lt;/p&gt;
&lt;p&gt;Two weeks ago, I tested FOTA&amp;nbsp; by sdk ncs 1.3.0 http_application_update. It worked without this error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2553.pic1.png" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5280.pic2.png" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0003.pic3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/275249?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 06:41:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:439d67f8-6ea3-4ebc-b206-b92a18825f28</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;I will check what you mentioned.&lt;/p&gt;
&lt;p&gt;Since this error was weird, did you change your&amp;nbsp;&amp;quot;app_update.bin&amp;quot;&amp;nbsp; file&lt;/p&gt;
&lt;p&gt;at &amp;quot;nrfconnectsdk.s3.eu-central-1.amazonaws.com&amp;quot;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mcuboot: Image in the secondary slot is not valid!</title><link>https://devzone.nordicsemi.com/thread/275096?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 12:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69dda305-f0c8-4429-8806-690e05445615</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It seems like &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L621"&gt;this&lt;/a&gt; is triggering, because &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L613"&gt;this&lt;/a&gt; is evaluated to true. Could you do some debugging and check the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L467"&gt;boot_is_header_valid()&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L472"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L476"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L480"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L395"&gt;boot_image_check()&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L415"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L418"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;li&gt;Does &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.0-rc2-ncs1/boot/bootutil/src/loader.c#L425"&gt;this&lt;/a&gt; happen?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you figure out, please tell me and I will investigate further&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>