<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I.MX RT1060EVA OTA mcuboot example: faulty image in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1919032#M31354</link>
    <description>&lt;P&gt;I'm running the &lt;STRONG&gt;evkmimxrt1060_ota_mcuboot_client_enet&lt;/STRONG&gt; example with the default SBL from the &lt;STRONG&gt;evkmimxrt1060_mcuboot_opensource&lt;/STRONG&gt; example on the EVA board using MCUXpresso version 11.10.0. I followed the readme files for both examples but encountered an issue where the bootloader treated the signed binary as faulty.&lt;BR /&gt;&lt;BR /&gt;The serial log shows the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hello sbl.
Disabling flash remapping function
Bootloader Version 1.10.0
Primary slot: version=1.0.0+0
Image 0 Secondary slot: Image not found
Erasing faulty image in the primary slot.&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;after further investigation, I found in the "boot_select_or_erase" function&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    if (active_swap_state-&amp;gt;magic != BOOT_MAGIC_GOOD ||
        (active_swap_state-&amp;gt;copy_done == BOOT_FLAG_SET &amp;amp;&amp;amp;
         active_swap_state-&amp;gt;image_ok  != BOOT_FLAG_SET)) {
        //print status
        BOOT_LOG_INF("magic: 0x%lx, copy_done: 0x%lx, image_ok: 0x%lx",
                     (unsigned long)active_swap_state-&amp;gt;magic,
                     (unsigned long)active_swap_state-&amp;gt;copy_done,
                     (unsigned long)active_swap_state-&amp;gt;image_ok);
        /*
         * A reboot happened without the image being confirmed at
         * runtime or its trailer is corrupted/invalid. Erase the image
         * to prevent it from being selected again on the next reboot.
         */
        BOOT_LOG_DBG("Erasing faulty image in the %s slot.",
                     (active_slot == BOOT_PRIMARY_SLOT) ? "primary" : "secondary");
        rc = flash_area_erase(fap, 0, flash_area_get_size(fap));
        assert(rc == 0);

        flash_area_close(fap);
        rc = -1;
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;"state" was read to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;magic: 0x3, copy_done: 0x3, image_ok: 0x3&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using the imgtool and the private key provided with the SDK. Here's my script for signing the binary:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;python3 ../sign_tool/imgtool.py sign \
    --key ../sign_tool/sign-rsa2048-priv.pem \
    --align 4 \
    --header-size 0x0400 \
    --pad-header \
    --slot-size 0x200000 \
    --max-sectors 800 \
    --version "1.0" \
    binaries/evkmimxrt1060_ota_mcuboot_client_enet.bin \
    binaries/app_binary_SIGNED.bin&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Any idea what might be going wrong?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 04:49:39 GMT</pubDate>
    <dc:creator>xuteng0</dc:creator>
    <dc:date>2024-07-29T04:49:39Z</dc:date>
    <item>
      <title>I.MX RT1060EVA OTA mcuboot example: faulty image</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1919032#M31354</link>
      <description>&lt;P&gt;I'm running the &lt;STRONG&gt;evkmimxrt1060_ota_mcuboot_client_enet&lt;/STRONG&gt; example with the default SBL from the &lt;STRONG&gt;evkmimxrt1060_mcuboot_opensource&lt;/STRONG&gt; example on the EVA board using MCUXpresso version 11.10.0. I followed the readme files for both examples but encountered an issue where the bootloader treated the signed binary as faulty.&lt;BR /&gt;&lt;BR /&gt;The serial log shows the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;hello sbl.
Disabling flash remapping function
Bootloader Version 1.10.0
Primary slot: version=1.0.0+0
Image 0 Secondary slot: Image not found
Erasing faulty image in the primary slot.&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;after further investigation, I found in the "boot_select_or_erase" function&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    if (active_swap_state-&amp;gt;magic != BOOT_MAGIC_GOOD ||
        (active_swap_state-&amp;gt;copy_done == BOOT_FLAG_SET &amp;amp;&amp;amp;
         active_swap_state-&amp;gt;image_ok  != BOOT_FLAG_SET)) {
        //print status
        BOOT_LOG_INF("magic: 0x%lx, copy_done: 0x%lx, image_ok: 0x%lx",
                     (unsigned long)active_swap_state-&amp;gt;magic,
                     (unsigned long)active_swap_state-&amp;gt;copy_done,
                     (unsigned long)active_swap_state-&amp;gt;image_ok);
        /*
         * A reboot happened without the image being confirmed at
         * runtime or its trailer is corrupted/invalid. Erase the image
         * to prevent it from being selected again on the next reboot.
         */
        BOOT_LOG_DBG("Erasing faulty image in the %s slot.",
                     (active_slot == BOOT_PRIMARY_SLOT) ? "primary" : "secondary");
        rc = flash_area_erase(fap, 0, flash_area_get_size(fap));
        assert(rc == 0);

        flash_area_close(fap);
        rc = -1;
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;"state" was read to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;magic: 0x3, copy_done: 0x3, image_ok: 0x3&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using the imgtool and the private key provided with the SDK. Here's my script for signing the binary:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;python3 ../sign_tool/imgtool.py sign \
    --key ../sign_tool/sign-rsa2048-priv.pem \
    --align 4 \
    --header-size 0x0400 \
    --pad-header \
    --slot-size 0x200000 \
    --max-sectors 800 \
    --version "1.0" \
    binaries/evkmimxrt1060_ota_mcuboot_client_enet.bin \
    binaries/app_binary_SIGNED.bin&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Any idea what might be going wrong?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 04:49:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1919032#M31354</guid>
      <dc:creator>xuteng0</dc:creator>
      <dc:date>2024-07-29T04:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX RT1060EVA OTA mcuboot example: faulty image</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1927768#M31479</link>
      <description>&lt;P&gt;Hello Xuteng,&lt;/P&gt;
&lt;P&gt;Are you still having trouble running the&amp;nbsp;evkmimxrt1060_ota_mcuboot_client_enet and evkmimxrt1060_mcuboot_opensource examples? Do the examples run correctly with the default configuration from respective readme documents?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 22:52:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1927768#M31479</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2024-08-07T22:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX RT1060EVA OTA mcuboot example: faulty image</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1927912#M31483</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Yes, I am still encountering issues. The two examples are built without any modifications. Interestingly, I can build and debug the evkmimxrt1060_ota_mcuboot_client_example at address 0x60000000 without the bootloader. However, I am still unable to use the bootloader to load the app.</description>
      <pubDate>Thu, 08 Aug 2024 04:58:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1927912#M31483</guid>
      <dc:creator>xuteng0</dc:creator>
      <dc:date>2024-08-08T04:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX RT1060EVA OTA mcuboot example: faulty image</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1958053#M31873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229025"&gt;@xuteng0&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My apologies for the delayed response, due to internal backlog.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you flashing both SBL and target image?&lt;/P&gt;
&lt;P&gt;Have you tried writting both using MCUXPresso secure provisioning tool ?&lt;/P&gt;
&lt;P&gt;I just want to be sure that you where not losing any header or information from the target image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 21:34:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/1958053#M31873</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2024-09-19T21:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX RT1060EVA OTA mcuboot example: faulty image</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/2085094#M34116</link>
      <description>&lt;P&gt;I was running into the same issue while loading a signed firmware image into the primary slot (address 0x6004000) with a Segger JLink. When signing an image with imgtool, you need to include --pad --confirm in the argument list. This is actually described in the readme for the MCUBoot example application (see Important Note). These options are not needed when signing firmware upgrade images that are intended to be transferred in an OTA process.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 04:57:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/I-MX-RT1060EVA-OTA-mcuboot-example-faulty-image/m-p/2085094#M34116</guid>
      <dc:creator>maxshaffer</dc:creator>
      <dc:date>2025-04-23T04:57:24Z</dc:date>
    </item>
  </channel>
</rss>

