<?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のトピックRe: Handling OpTEE binary header with Arm Trusted Firmware on iMX8M</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805388#M124338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I apologize for the late answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;using the script imx_build.sh for building the imx-optee-os project?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fimx-optee-os%2Ftree%2Fscripts%2Fimx_build.sh%3Fh%3Dimx_4.9.51_imx8m_ga" rel="nofollow" style="color: #3d9ce7; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fimx-optee-os%2Ftree%2Fscripts%2Fimx_build.sh%3Fh%3Dimx_4.9.51_imx8m_ga&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/imx-optee-os/tree/scripts/imx_build.sh?h=imx_4.9.51_imx8m_ga" title="https://source.codeaurora.org/external/imx/imx-optee-os/tree/scripts/imx_build.sh?h=imx_4.9.51_imx8m_ga"&gt;imx_build.sh\scripts - imx-optee-os - i.MX optee os&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;On i.MX8MQ the header is not included tee.bin when built with this script, the only difference between the tee-pager.bin and tee.bin is a padding at the end of the binary.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74179i673DD6D48F62A1D3/image-size/large?v=v2&amp;amp;px=999" title="hexdiff_tee-pager-tee.png" alt="hexdiff_tee-pager-tee.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Currently, we are not using the OP-TEE header as you pointed in the link below.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;A class="link-titled" href="https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee" title="https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee"&gt;OP-TEE header · linaro-swg/arm-trusted-firmware@f6244e8 · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;The recommended way to build a flash.bin image containing OP-TEE is explained in post below:&lt;BR /&gt;&lt;A href="https://community.nxp.com/docs/DOC-340663"&gt;https://community.nxp.com/docs/DOC-340663&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Just summarizing the process:&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- U-Boot:&lt;BR /&gt;$ make imx8mq_evk_defconfig&lt;BR /&gt;$ make -j4&lt;BR /&gt;Copy u-boot.bin, u-boot-nodtb.bin, u-boot-spl.bin and fsl-imx8mq-evk.dtb to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- ATF:&lt;BR /&gt;$ make PLAT=imx8mq SPD=opteed bl31&lt;BR /&gt;Copy bl31.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- OP-TEE:&lt;BR /&gt;$ ./scripts/imx_build.sh mx8mqevk&lt;BR /&gt;Copy tee.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- Firmwares:&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;$ wget&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-content-finding="Community" href="https://community.nxp.com/www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin" style="color: #3d9ce7; border: 0px; font-weight: inherit; text-decoration: none;"&gt;https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin&lt;/A&gt;&lt;BR /&gt;$ ./firmware-imx-7.6.bin&lt;BR /&gt;Copy lpddr4_pmu_train_*.bin and signed_hdmi_imx8m.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- mkimage:&lt;BR /&gt;$ make SOC=iMX8M flash_evk&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Please let me know if this help.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Best Regards,&lt;/P&gt;&lt;P style="border: 0px;"&gt;Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2018 16:50:09 GMT</pubDate>
    <dc:creator>diegoadrian</dc:creator>
    <dc:date>2018-10-10T16:50:09Z</dc:date>
    <item>
      <title>Handling OpTEE binary header with Arm Trusted Firmware on iMX8M</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805387#M124337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to load OpTEE on the MCIMX8MEVK board and am having an issue with the image loading.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The build process for OpTEE on &lt;A href="https://source.codeaurora.org/external/imx/imx-optee-os/tree/core/arch/arm/kernel/link.mk?h=imx_4.9.88_2.0.0_ga"&gt;https://source.codeaurora.org/external/imx/imx-optee-os/tree/core/arch/arm/kernel/link.mk?h=imx_4.9.88_2.0.0_ga&lt;/A&gt;&amp;nbsp;produces a tee.bin with a 24 byte header, and two more files tee-pager.bin and a zero length tee-pageable.bin.&amp;nbsp; The mkimage build process on &lt;A href="https://source.codeaurora.org/external/imx/imx-mkimage/tree/iMX8M/mkimage_fit_atf.sh?h=imx_4.9.123_imx8mm_ga"&gt;https://source.codeaurora.org/external/imx/imx-mkimage/tree/iMX8M/mkimage_fit_atf.sh?h=imx_4.9.123_imx8mm_ga&lt;/A&gt;&amp;nbsp;looks for a tee.bin and puts it into the fit unchanged.&amp;nbsp;Finally the opteed_setup code&amp;nbsp;in &lt;A href="https://source.codeaurora.org/external/imx/imx-atf/tree/services/spd/opteed/opteed_main.c?h=imx_4.9.123_imx8mm_ga"&gt;https://source.codeaurora.org/external/imx/imx-atf/tree/services/spd/opteed/opteed_main.c?h=imx_4.9.123_imx8mm_ga&lt;/A&gt;&amp;nbsp;assumes that there's no header and uses the binary as is.&amp;nbsp; This results in the processor attempting to execute the header block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can resolve this by using the tee-pager.bin file as the input to mkimage, but this throws away the header information.&amp;nbsp;And will cause problems if data&amp;nbsp;is moved into the tee-pageable.bin file.&amp;nbsp;The change to handle this header has been available since 2014 in the Linaro-SecureWorkingGroup tree, &lt;A href="https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee"&gt;https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee&lt;/A&gt;&amp;nbsp; which checks for the header and shifts the memory region.&amp;nbsp; In NXP's &lt;A href="https://source.codeaurora.org/external/imx/imx-atf/tree/lib/optee/optee_utils.c?h=imx_4.9.123_imx8mm_ga"&gt;https://source.codeaurora.org/external/imx/imx-atf/tree/lib/optee/optee_utils.c?h=imx_4.9.123_imx8mm_ga&lt;/A&gt;&amp;nbsp;there is code that reads the OpTEE header, but it is only used by arm_bl2_setup.c which isn't built using the current yocto recipes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering it is NXP's plan to merge this change to the ATF opteed SPD, or to what their recommendation is for using OpTEE on imx8m?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 20:49:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805387#M124337</guid>
      <dc:creator>NeilShipp-MSFT</dc:creator>
      <dc:date>2018-09-27T20:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Handling OpTEE binary header with Arm Trusted Firmware on iMX8M</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805388#M124338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I apologize for the late answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;using the script imx_build.sh for building the imx-optee-os project?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fimx-optee-os%2Ftree%2Fscripts%2Fimx_build.sh%3Fh%3Dimx_4.9.51_imx8m_ga" rel="nofollow" style="color: #3d9ce7; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fimx-optee-os%2Ftree%2Fscripts%2Fimx_build.sh%3Fh%3Dimx_4.9.51_imx8m_ga&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/imx-optee-os/tree/scripts/imx_build.sh?h=imx_4.9.51_imx8m_ga" title="https://source.codeaurora.org/external/imx/imx-optee-os/tree/scripts/imx_build.sh?h=imx_4.9.51_imx8m_ga"&gt;imx_build.sh\scripts - imx-optee-os - i.MX optee os&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;On i.MX8MQ the header is not included tee.bin when built with this script, the only difference between the tee-pager.bin and tee.bin is a padding at the end of the binary.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74179i673DD6D48F62A1D3/image-size/large?v=v2&amp;amp;px=999" title="hexdiff_tee-pager-tee.png" alt="hexdiff_tee-pager-tee.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Currently, we are not using the OP-TEE header as you pointed in the link below.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;A class="link-titled" href="https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee" title="https://github.com/linaro-swg/arm-trusted-firmware/commit/f6244e85df1d931e2ed6bd80e76fbf05a1b32f23#diff-5b5a3d8c61b39e1fe27ee096c7bc41ee"&gt;OP-TEE header · linaro-swg/arm-trusted-firmware@f6244e8 · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;The recommended way to build a flash.bin image containing OP-TEE is explained in post below:&lt;BR /&gt;&lt;A href="https://community.nxp.com/docs/DOC-340663"&gt;https://community.nxp.com/docs/DOC-340663&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Just summarizing the process:&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- U-Boot:&lt;BR /&gt;$ make imx8mq_evk_defconfig&lt;BR /&gt;$ make -j4&lt;BR /&gt;Copy u-boot.bin, u-boot-nodtb.bin, u-boot-spl.bin and fsl-imx8mq-evk.dtb to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- ATF:&lt;BR /&gt;$ make PLAT=imx8mq SPD=opteed bl31&lt;BR /&gt;Copy bl31.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- OP-TEE:&lt;BR /&gt;$ ./scripts/imx_build.sh mx8mqevk&lt;BR /&gt;Copy tee.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- Firmwares:&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;$ wget&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-content-finding="Community" href="https://community.nxp.com/www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin" style="color: #3d9ce7; border: 0px; font-weight: inherit; text-decoration: none;"&gt;https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin&lt;/A&gt;&lt;BR /&gt;$ ./firmware-imx-7.6.bin&lt;BR /&gt;Copy lpddr4_pmu_train_*.bin and signed_hdmi_imx8m.bin to imx_mkimage/iMX8M/&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;- mkimage:&lt;BR /&gt;$ make SOC=iMX8M flash_evk&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Please let me know if this help.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Best Regards,&lt;/P&gt;&lt;P style="border: 0px;"&gt;Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:50:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805388#M124338</guid>
      <dc:creator>diegoadrian</dc:creator>
      <dc:date>2018-10-10T16:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Handling OpTEE binary header with Arm Trusted Firmware on iMX8M</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805389#M124339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response.&amp;nbsp; Unfortunately, I don't have access to the document you linked to: &amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/docs/DOC-340663" title="https://community.nxp.com/docs/DOC-340663"&gt;https://community.nxp.com/docs/DOC-340663&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However your pointer to the imx_build.sh script shows how to build a unified tee.bin file.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2018 20:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Handling-OpTEE-binary-header-with-Arm-Trusted-Firmware-on-iMX8M/m-p/805389#M124339</guid>
      <dc:creator>NeilShipp-MSFT</dc:creator>
      <dc:date>2018-11-26T20:28:18Z</dc:date>
    </item>
  </channel>
</rss>

