<?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 Re: Secure boot on Wandboard in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298413#M37316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems all the documentation (application notes and examples) say that one should use older U-boot, except this recent question &lt;A href="https://community.nxp.com/message/393293"&gt;i.MX6 HAB support in U-Boot 2013 and later&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really prefer to use a recent U-boot, because we need to patch it to support various devices, and we need device tree support etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my findings all that needs to be done before I have securely started U-boot is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Patch U-boot to reserve space for the CSF.&lt;/LI&gt;&lt;LI&gt;Make the image consisting of the existing u-boot.imx + padding + CSF&lt;/LI&gt;&lt;LI&gt;Set the CSF pointer in the IVT.&lt;/LI&gt;&lt;LI&gt;Burn fuses&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for 1. it appears that there have been changes in the U-boot linker scripts. I am just wondering if there is an easy way (e.g. board specific configuration option or similar) to reserve this space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding 2. and 3. this was just my idea of how to get the needed result. There may be a cleaner way to achieve this. If you have a suggestion, please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 15:00:14 GMT</pubDate>
    <dc:creator>spacemanspiff</dc:creator>
    <dc:date>2014-05-20T15:00:14Z</dc:date>
    <item>
      <title>Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298412#M37315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get secure boot working on the Wandboard quad, based on AN4581 (Secure Boot on i.MX50, i.MX53, and i.MX 6 Series using HABv4), HABCST_UG (HAB Code-Signing Tool User’s Guide) and a few other sources of information. In case it matters, I am currently experimenting with U-boot on the SD card, although in the end U-boot will be in a SPI flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have compiled U-boot 2013.10 with CONFIG_SECURE_BOOT (to get hab_status) as well as CONFIG_CMD_FUSE and CONFIG_MXC_OCOTP (to access fuses from U-boot). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the PKI and SRK table and eFuse hash according to HAB CST user guide chapter 3.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on a guide regarding secure boot on the Nitrogen 6X, I have attempted to write a CSF input file for CST, and created the binary CSF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are various guides on how to combine the U-Boot image with the CSF, but I think some things have changed since these guides were written. Maybe there is an easier way of putting everything together for secure booting on the i.MX6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) What is the easiest way to reserve space for the CSF before the BSS? In the guides, modifications are being done to the linker-script (i.e. u-boot.lds), but I am not quite sure what linker script is being used for the wandboard-quad, or if there is an easier way of reserving this region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I have looked at the u-boot.imx, and see the IVT at the beginning, but the CSF-pointer is 0. What is the easiest way to set the CSF-pointer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) According to U-boots README.mxc_hab, mkimage should "output additional information about ''HAB Blocks'' which can be used in the Freescale tooling to authenticate U-Boot (entries in the CSF file)". However, this is not shown when I run mkimage -l u-boot.imx:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Image Type:&amp;nbsp;&amp;nbsp; Freescale IMX Boot Image&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Image Ver:&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 (i.MX53/6 compatible)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Data Size:&amp;nbsp;&amp;nbsp;&amp;nbsp; 290816 Bytes = 284.00 kB = 0.28 MB&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Load Address: 177ff420&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Entry Point:&amp;nbsp; 17800000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Does anyone have any pointers to resources about writing the CSF input file, or other resources regarding secure boot on i.MX6?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated,&lt;/P&gt;&lt;P&gt;Mikkel Holm Olsen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 11:01:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298412#M37315</guid>
      <dc:creator>spacemanspiff</dc:creator>
      <dc:date>2014-05-15T11:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298413#M37316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems all the documentation (application notes and examples) say that one should use older U-boot, except this recent question &lt;A href="https://community.nxp.com/message/393293"&gt;i.MX6 HAB support in U-Boot 2013 and later&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really prefer to use a recent U-boot, because we need to patch it to support various devices, and we need device tree support etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my findings all that needs to be done before I have securely started U-boot is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Patch U-boot to reserve space for the CSF.&lt;/LI&gt;&lt;LI&gt;Make the image consisting of the existing u-boot.imx + padding + CSF&lt;/LI&gt;&lt;LI&gt;Set the CSF pointer in the IVT.&lt;/LI&gt;&lt;LI&gt;Burn fuses&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for 1. it appears that there have been changes in the U-boot linker scripts. I am just wondering if there is an easy way (e.g. board specific configuration option or similar) to reserve this space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding 2. and 3. this was just my idea of how to get the needed result. There may be a cleaner way to achieve this. If you have a suggestion, please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:00:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298413#M37316</guid>
      <dc:creator>spacemanspiff</dc:creator>
      <dc:date>2014-05-20T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298414#M37317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I managed to get secure boot of U-Boot 2013.10 working on the Wandboard (i.MX6), so for anyone struggling with this, here are some pointers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Reserve space for CSF in U-boot. Edit u-boot.lds and add the following between "_end = .;" and ". = ALIGN(4096);":&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; . = ALIGN(0x1000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; .hab_section (OVERLAY) : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; __hab_data = .;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; . = . + 0x2000; /* Reserve 8kB for CSF */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; __hab_data_end = .;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This sets aside 8kB in the U-boot memory layout, where we can have the IVT load the CSF (appended to U-boot image).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In order to change the CSF pointer in IVT, edit the imximage configuration file. First find your board in u-boots boards.cfg, and locate the IMX_CONFIG variable. Now open this file (in my case board/boundary/nitrogen6x/nitrogen6q2g.cfg) and add the following (I added it after "BOOT_FROM":&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;/* Reserve 8kB for CSF */&lt;/P&gt;&lt;P&gt;CSF&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x2000&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This will both set the CSF pointer in IVT, and also add 8kB to the length-field, so we get the CSF loded into memory along with the U-boot image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Build the u-boot.imx file (you could verify with hexdump that CSF-pointer is populated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Assuming you have created the PKI tree and SRK table (using hab4_pki_tree.sh and srktool), you now need to create the CSF source file (see attached u-boot.csf for inspiration). You need to set the size of u-boot.imx in the "Authenticate Data" section. In my case this was 0x46C00 (i.e. 289792 bytes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Compile the CSF to binary form by using cst:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;linux/cst --o u-boot_csf.bin &amp;lt; u-boot.csf&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Pad the CST file to 8kB length:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;objcopy -I binary -O binary --pad-to 0x2000 --gap-fill=0xAA u-boot_csf.bin u-boot_csf_padded.bin&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. Append the padded CSF to the IMX image:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;cat u-boot.imx u-boot_csf_padded.bin &amp;gt; u-boot_csf.imx&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. Copy the combined image to SD card:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;sudo dd if=u-boot_csf.imx of=/dev/sdc bs=512 seek=2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. Program the SRK hash fuses.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298414#M37317</guid>
      <dc:creator>spacemanspiff</dc:creator>
      <dc:date>2014-05-22T14:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298415#M37318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the a way to unlock or remove the secure boot after burn fuse? The document didn't mention about the removal. Please advice and thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 09:00:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298415#M37318</guid>
      <dc:creator>siah77</dc:creator>
      <dc:date>2014-05-30T09:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298416#M37319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricky&lt;/P&gt;&lt;P&gt;unfortunately these (and other) fuses are unreversable.&lt;/P&gt;&lt;P&gt;They can not be changed back to unsecure state, when programmed to&lt;/P&gt;&lt;P&gt;secure state. So once programmed, board stays secure forever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;chip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 09:37:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298416#M37319</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2014-05-30T09:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Secure boot on Wandboard</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298417#M37320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;Unknowingly I executed this command in my Wandboard Quad&lt;BR /&gt;echo 0x2 &amp;gt; /sys/fsl_otp/HW_OCOTP_CFG5&lt;BR /&gt;after executing this command my board is not booting up.&lt;BR /&gt;After that I read many documentation to get what actually happened and it shows I enabled chip security which is used for secure boot.&lt;/P&gt;&lt;P&gt;Now what should I do to get my board to boot /start ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 04:27:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Secure-boot-on-Wandboard/m-p/298417#M37320</guid>
      <dc:creator>ganeshc</dc:creator>
      <dc:date>2015-05-29T04:27:23Z</dc:date>
    </item>
  </channel>
</rss>

