<?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>i.MX Processorsのトピックi.MX7D failed to boot from encrypted u-boot image</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907455#M136807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;I've follow the document AN4581/AN12056 try to build a encrypted and signed u-boot image for i.MX7D board. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The signed image (AN4581) is completed and work fine, but encrypted image (AN12056) don't work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The device is closed by program SEC_CONFIG[1] fuse and can boot form a correct signed image, next I try to build a encrypted and signed u-boot image by follow the procedure in document AN12056 but failed. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The image can't boot device, and console print nothing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The detailed steps as follow:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Done the procedure in AN4581 and boot the device with signed u-boot.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Compile the CST to enable the encrypting feature.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Modify file "csf_u-boot_enc.txt" and "csf_u-boot_sign_enc.txt".&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Encrypt the U-Boot image.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;$ ./cst_encrypted -i csf_u-boot_enc.txt -o csf_u-boot_enc.bin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Sign the encrypted U-Boot image.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;$&amp;nbsp;./cst_encrypted -i csf_u-boot_sign_enc.txt -o csf_u-boot_sign_enc.bin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Swap Nonce/MAC from csf_u-boot_enc.bin to csf_u-boot_sign_enc.bin.&lt;UL&gt;&lt;LI&gt;$&amp;nbsp;dd if=csf_u-boot_enc.bin of=noncemac.bin bs=1 skip=3936 count=36&lt;/LI&gt;&lt;LI&gt;$&amp;nbsp;dd if=noncemac.bin of=csf_u-boot_sign_enc.bin bs=1 seek=3936 count=36&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Generate encryptedu-boot with no dek.&lt;UL&gt;&lt;LI&gt;$ objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0xff csf_u-boot_sign_enc.bin csf_u-boot_sign_enc.bin.pad&lt;/LI&gt;&lt;LI&gt;$ cat u-boot-dtb.imx-enc csf_u-boot_sign_enc.bin.pad &amp;gt; u-boot_encrypted_no_dek.bin&lt;/LI&gt;&lt;LI&gt;$ objcopy -I binary -O binary --pad-to 0x95c00 --gap-fill=0x00 u-boot_encrypted_no_dek.bin u-boot_encrypted_no_dek_padded.bin&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Generate the DEK Blob.&lt;UL&gt;&lt;LI&gt;$ cp&amp;nbsp;dek.bin /mnt/mmc&lt;/LI&gt;&lt;LI&gt;boot device by sd card and into u-boot CLI.&lt;/LI&gt;&lt;LI&gt;=&amp;gt; fatload mmc 0 0x80800000 dek.bin;&amp;nbsp;dek_blob 0x80800000 0x80801000 128;&amp;nbsp;fatwrite mmc 0 0x80801000 dek_blob.bin 0x48&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Finalize the encrypted U-Boot image.&lt;UL&gt;&lt;LI&gt;$ cp &lt;SPAN&gt;/mnt/mmc/&lt;/SPAN&gt;dek_blob.bin ./&lt;/LI&gt;&lt;LI&gt;cat u-boot_encrypted_no_dek_padded.bin dek_blob.bin &amp;gt; u-boot_encrypted.bin&lt;/LI&gt;&lt;LI&gt;&lt;DIV&gt;&lt;DIV&gt;sudo dd if=&lt;SPAN&gt;u-boot_encrypted.bin&lt;/SPAN&gt;&amp;nbsp;of=/dev/sdc&amp;nbsp;bs=512 seek=2 conv=fsync&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Boot device and nothing show on console.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;&lt;SPAN&gt;I have no idea about how to debug it due to I can't to trace ROM code or download the HAB log. Any&amp;nbsp;suggestion?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Apr 2019 09:31:51 GMT</pubDate>
    <dc:creator>bobbychen197805</dc:creator>
    <dc:date>2019-04-24T09:31:51Z</dc:date>
    <item>
      <title>i.MX7D failed to boot from encrypted u-boot image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907455#M136807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;I've follow the document AN4581/AN12056 try to build a encrypted and signed u-boot image for i.MX7D board. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The signed image (AN4581) is completed and work fine, but encrypted image (AN12056) don't work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The device is closed by program SEC_CONFIG[1] fuse and can boot form a correct signed image, next I try to build a encrypted and signed u-boot image by follow the procedure in document AN12056 but failed. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The image can't boot device, and console print nothing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;The detailed steps as follow:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Done the procedure in AN4581 and boot the device with signed u-boot.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Compile the CST to enable the encrypting feature.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Modify file "csf_u-boot_enc.txt" and "csf_u-boot_sign_enc.txt".&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Encrypt the U-Boot image.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;$ ./cst_encrypted -i csf_u-boot_enc.txt -o csf_u-boot_enc.bin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;Sign the encrypted U-Boot image.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;$&amp;nbsp;./cst_encrypted -i csf_u-boot_sign_enc.txt -o csf_u-boot_sign_enc.bin&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Swap Nonce/MAC from csf_u-boot_enc.bin to csf_u-boot_sign_enc.bin.&lt;UL&gt;&lt;LI&gt;$&amp;nbsp;dd if=csf_u-boot_enc.bin of=noncemac.bin bs=1 skip=3936 count=36&lt;/LI&gt;&lt;LI&gt;$&amp;nbsp;dd if=noncemac.bin of=csf_u-boot_sign_enc.bin bs=1 seek=3936 count=36&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Generate encryptedu-boot with no dek.&lt;UL&gt;&lt;LI&gt;$ objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0xff csf_u-boot_sign_enc.bin csf_u-boot_sign_enc.bin.pad&lt;/LI&gt;&lt;LI&gt;$ cat u-boot-dtb.imx-enc csf_u-boot_sign_enc.bin.pad &amp;gt; u-boot_encrypted_no_dek.bin&lt;/LI&gt;&lt;LI&gt;$ objcopy -I binary -O binary --pad-to 0x95c00 --gap-fill=0x00 u-boot_encrypted_no_dek.bin u-boot_encrypted_no_dek_padded.bin&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Generate the DEK Blob.&lt;UL&gt;&lt;LI&gt;$ cp&amp;nbsp;dek.bin /mnt/mmc&lt;/LI&gt;&lt;LI&gt;boot device by sd card and into u-boot CLI.&lt;/LI&gt;&lt;LI&gt;=&amp;gt; fatload mmc 0 0x80800000 dek.bin;&amp;nbsp;dek_blob 0x80800000 0x80801000 128;&amp;nbsp;fatwrite mmc 0 0x80801000 dek_blob.bin 0x48&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Finalize the encrypted U-Boot image.&lt;UL&gt;&lt;LI&gt;$ cp &lt;SPAN&gt;/mnt/mmc/&lt;/SPAN&gt;dek_blob.bin ./&lt;/LI&gt;&lt;LI&gt;cat u-boot_encrypted_no_dek_padded.bin dek_blob.bin &amp;gt; u-boot_encrypted.bin&lt;/LI&gt;&lt;LI&gt;&lt;DIV&gt;&lt;DIV&gt;sudo dd if=&lt;SPAN&gt;u-boot_encrypted.bin&lt;/SPAN&gt;&amp;nbsp;of=/dev/sdc&amp;nbsp;bs=512 seek=2 conv=fsync&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Boot device and nothing show on console.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4a4a4d; background-color: #f2f2f5;"&gt;&lt;SPAN&gt;I have no idea about how to debug it due to I can't to trace ROM code or download the HAB log. Any&amp;nbsp;suggestion?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:31:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907455#M136807</guid>
      <dc:creator>bobbychen197805</dc:creator>
      <dc:date>2019-04-24T09:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX7D failed to boot from encrypted u-boot image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907456#M136808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; Please double check if U-boot configuration meets section 4.2 (Requirements)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;of app note AN12056. &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 08:28:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907456#M136808</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2019-04-25T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX7D failed to boot from encrypted u-boot image</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907457#M136809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri, I think the problem has be solved by update source code to version "imx_v2018.03_4.14.98_2.0.0_ga". Thanks for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 09:21:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7D-failed-to-boot-from-encrypted-u-boot-image/m-p/907457#M136809</guid>
      <dc:creator>bobbychen197805</dc:creator>
      <dc:date>2019-04-25T09:21:21Z</dc:date>
    </item>
  </channel>
</rss>

