<?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のトピックOP-TEE initialisation failed in i.MX8MM</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OP-TEE-initialisation-failed-in-i-MX8MM/m-p/1422181#M187705</link>
    <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;I've already managed to lock the HAB e-fuses in my i.MX8M Mini device and boot a signed u-boot image successfully. I'm stuck at creating the dek.blob file in preparation of creating an encrypted u-boot image. The OP-TEE that I've build gives an error message when u-boot loads.&lt;/P&gt;&lt;P&gt;The SOM is a Forlinx i.MX8M Mini board with 2GB RAM &amp;amp; 8GB eMMC.&lt;/P&gt;&lt;P&gt;I think my build steps matches what is discussed in post:&amp;nbsp;&lt;A title="Enabling OP-TEE in i.MX8MM EVK FIT image" href="https://community.nxp.com/t5/i-MX-Processors/Enabling-OP-TEE-in-i-MX8MM-EVK-FIT-image/m-p/1160528" target="_blank" rel="noopener"&gt;Enabling OP-TEE in i.MX8MM EVK FIT image&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My build steps are as follow:&lt;/P&gt;&lt;P&gt;Sources used:&lt;BR /&gt;ATF: &lt;A href="https://source.codeaurora.org/external/imx/imx-atf" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-atf&lt;/A&gt;&lt;BR /&gt;OP-TEE: &lt;A href="http://source.codeaurora.org/external/imx/imx-optee-os" target="_blank"&gt;http://source.codeaurora.org/external/imx/imx-optee-os&lt;/A&gt;&lt;BR /&gt;mk-image: &lt;A href="https://source.codeaurora.org/external/imx/imx-mkimage/" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-mkimage/&lt;/A&gt;&lt;BR /&gt;Version checked out tag: lf-5.10.72-2.2.0&lt;/P&gt;&lt;P&gt;I've followed the guide included with u-boot: /doc/imx/habv4/guides/mx8m_encrypted_boot.txt&lt;BR /&gt;Section 1.4 covers how to build OP-TEE support in ATF &amp;amp; how to compile OP-TEE:&lt;BR /&gt;ATF:&lt;BR /&gt;Documentation:&lt;BR /&gt;$ make PLAT=&amp;lt;SoC Name&amp;gt; SPD=opteed bl31&lt;BR /&gt;My command:&lt;BR /&gt;$ make PLAT=imx8mm SPD=opteed bl31 LDFLAGS=&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;OP-TEE-os:&lt;BR /&gt;Documentation:&lt;BR /&gt;$ CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y source ./scripts/nxp_build.sh &amp;lt;Board Name&amp;gt;&lt;BR /&gt;My command&lt;BR /&gt;$ ARCH=arm CFG_TEE_CORE_LOG_LEVEL=4 CROSS_COMPILE64=${CROSS_COMPILE}&amp;nbsp;CFLAGS="--sysroot=${SDKTARGETSYSROOT}" LDFLAGS= CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y&amp;nbsp;source ./scripts/nxp_build.sh imx-mx8mmevk&lt;/P&gt;&lt;P&gt;I've enabled the required flags in the uboot config file:&lt;BR /&gt;CONFIG_FSL_CAAM=y&lt;BR /&gt;CONFIG_SYS_FSL_SEC_COMPAT_4=y&lt;BR /&gt;CONFIG_SYS_FSL_SEC_COMPAT=4&lt;BR /&gt;CONFIG_SYS_FSL_SEC_LE=y&lt;BR /&gt;CONFIG_CMD_DEKBLOB=y&lt;BR /&gt;CONFIG_OPTEE_LOAD_ADDR=0xbe000000&lt;BR /&gt;(What about CONFIG_OPTEE_TZDRAM_SIZE and CONFIG_OPTEE_TZDRAM_BASE ?)&lt;/P&gt;&lt;P&gt;Assemble the files in mk-image/iMX8M:&lt;BR /&gt;cp ../OK8MM-linux-uboot/spl/u-boot-spl.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/u-boot-nodtb.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/tools/mkimage iMX8M/mkimage_uboot&lt;BR /&gt;cp ../imx-atf/build/imx8mm/release/bl31.bin iMX8M/&lt;BR /&gt;cp ../imx-optee-os/build.imx-mx8mmevk/core/tee.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/arch/arm/dts/imx8mm-ddr4-evk.dtb iMX8M/&lt;BR /&gt;dd if=/dev/zero of=iMX8M/dek_blob_fit_dummy.bin bs=96 count=1 &amp;amp;&amp;amp; sync&lt;BR /&gt;make SOC=iMX8MM flash_ddr4_evk 1&amp;gt;iMX8M/flash.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;make SOC=iMX8MM print_fit_hab 1&amp;gt;&amp;gt;iMX8M/flash.log 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've created the CSF spl &amp;amp; fit files and signed the u-boot image. The signed u-boot was programmed to a SD card.&lt;/P&gt;&lt;P&gt;I've booted the u-boot binary on my HAB locked i.MX8M Mini device:&lt;BR /&gt;U-Boot SPL 2021.04-dirty (Feb 28 2022 - 23:02:25 +0200)&lt;BR /&gt;power_bd71837_init&lt;BR /&gt;DDRINFO: start DRAM init&lt;BR /&gt;DDRINFO: DRAM rate 2400MTS&lt;BR /&gt;DDRINFO:ddrphy calibration done&lt;BR /&gt;DDRINFO: ddrmix config done&lt;BR /&gt;SEC0: RNG instantiated&lt;BR /&gt;Normal Boot&lt;BR /&gt;Trying to boot from MMC1&lt;/P&gt;&lt;P&gt;Authenticate image from DDR location 0x401fcdc0, image_size=0x3020, ivt_offset=0x1000&lt;BR /&gt;NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9&lt;BR /&gt;NOTICE: BL31: Built : 19:24:31, Feb 27 2022&lt;BR /&gt;ERROR: Error initializing runtime service opteed_fast &amp;lt;&amp;lt;&amp;lt; First error message&lt;/P&gt;&lt;P&gt;U-Boot 2021.04-dirty (Feb 28 2022 - 23:02:25 +0200)&lt;/P&gt;&lt;P&gt;CPU: i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)&lt;BR /&gt;CPU: Commercial temperature grade (0C to 95C) at 32C&lt;BR /&gt;Reset cause: POR&lt;BR /&gt;Model: FORLINX&lt;BR /&gt;DRAM: 2 GiB&lt;BR /&gt;MMC: FSL_SDHC: 1, FSL_SDHC: 2&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Hit any key to stop autoboot: 0&lt;BR /&gt;u-boot=&amp;gt; dek_blob 0x40402000 0x40403000 128&lt;BR /&gt;Cannot get OP-TEE device &amp;lt;&amp;lt;&amp;lt;&amp;lt; Second error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help to get past the initialisation error will be much appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frikkie&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2022 19:18:01 GMT</pubDate>
    <dc:creator>frix</dc:creator>
    <dc:date>2022-03-02T19:18:01Z</dc:date>
    <item>
      <title>OP-TEE initialisation failed in i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OP-TEE-initialisation-failed-in-i-MX8MM/m-p/1422181#M187705</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;I've already managed to lock the HAB e-fuses in my i.MX8M Mini device and boot a signed u-boot image successfully. I'm stuck at creating the dek.blob file in preparation of creating an encrypted u-boot image. The OP-TEE that I've build gives an error message when u-boot loads.&lt;/P&gt;&lt;P&gt;The SOM is a Forlinx i.MX8M Mini board with 2GB RAM &amp;amp; 8GB eMMC.&lt;/P&gt;&lt;P&gt;I think my build steps matches what is discussed in post:&amp;nbsp;&lt;A title="Enabling OP-TEE in i.MX8MM EVK FIT image" href="https://community.nxp.com/t5/i-MX-Processors/Enabling-OP-TEE-in-i-MX8MM-EVK-FIT-image/m-p/1160528" target="_blank" rel="noopener"&gt;Enabling OP-TEE in i.MX8MM EVK FIT image&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My build steps are as follow:&lt;/P&gt;&lt;P&gt;Sources used:&lt;BR /&gt;ATF: &lt;A href="https://source.codeaurora.org/external/imx/imx-atf" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-atf&lt;/A&gt;&lt;BR /&gt;OP-TEE: &lt;A href="http://source.codeaurora.org/external/imx/imx-optee-os" target="_blank"&gt;http://source.codeaurora.org/external/imx/imx-optee-os&lt;/A&gt;&lt;BR /&gt;mk-image: &lt;A href="https://source.codeaurora.org/external/imx/imx-mkimage/" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-mkimage/&lt;/A&gt;&lt;BR /&gt;Version checked out tag: lf-5.10.72-2.2.0&lt;/P&gt;&lt;P&gt;I've followed the guide included with u-boot: /doc/imx/habv4/guides/mx8m_encrypted_boot.txt&lt;BR /&gt;Section 1.4 covers how to build OP-TEE support in ATF &amp;amp; how to compile OP-TEE:&lt;BR /&gt;ATF:&lt;BR /&gt;Documentation:&lt;BR /&gt;$ make PLAT=&amp;lt;SoC Name&amp;gt; SPD=opteed bl31&lt;BR /&gt;My command:&lt;BR /&gt;$ make PLAT=imx8mm SPD=opteed bl31 LDFLAGS=&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;OP-TEE-os:&lt;BR /&gt;Documentation:&lt;BR /&gt;$ CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y source ./scripts/nxp_build.sh &amp;lt;Board Name&amp;gt;&lt;BR /&gt;My command&lt;BR /&gt;$ ARCH=arm CFG_TEE_CORE_LOG_LEVEL=4 CROSS_COMPILE64=${CROSS_COMPILE}&amp;nbsp;CFLAGS="--sysroot=${SDKTARGETSYSROOT}" LDFLAGS= CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y&amp;nbsp;source ./scripts/nxp_build.sh imx-mx8mmevk&lt;/P&gt;&lt;P&gt;I've enabled the required flags in the uboot config file:&lt;BR /&gt;CONFIG_FSL_CAAM=y&lt;BR /&gt;CONFIG_SYS_FSL_SEC_COMPAT_4=y&lt;BR /&gt;CONFIG_SYS_FSL_SEC_COMPAT=4&lt;BR /&gt;CONFIG_SYS_FSL_SEC_LE=y&lt;BR /&gt;CONFIG_CMD_DEKBLOB=y&lt;BR /&gt;CONFIG_OPTEE_LOAD_ADDR=0xbe000000&lt;BR /&gt;(What about CONFIG_OPTEE_TZDRAM_SIZE and CONFIG_OPTEE_TZDRAM_BASE ?)&lt;/P&gt;&lt;P&gt;Assemble the files in mk-image/iMX8M:&lt;BR /&gt;cp ../OK8MM-linux-uboot/spl/u-boot-spl.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/u-boot-nodtb.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/tools/mkimage iMX8M/mkimage_uboot&lt;BR /&gt;cp ../imx-atf/build/imx8mm/release/bl31.bin iMX8M/&lt;BR /&gt;cp ../imx-optee-os/build.imx-mx8mmevk/core/tee.bin iMX8M/&lt;BR /&gt;cp ../OK8MM-linux-uboot/arch/arm/dts/imx8mm-ddr4-evk.dtb iMX8M/&lt;BR /&gt;dd if=/dev/zero of=iMX8M/dek_blob_fit_dummy.bin bs=96 count=1 &amp;amp;&amp;amp; sync&lt;BR /&gt;make SOC=iMX8MM flash_ddr4_evk 1&amp;gt;iMX8M/flash.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;make SOC=iMX8MM print_fit_hab 1&amp;gt;&amp;gt;iMX8M/flash.log 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've created the CSF spl &amp;amp; fit files and signed the u-boot image. The signed u-boot was programmed to a SD card.&lt;/P&gt;&lt;P&gt;I've booted the u-boot binary on my HAB locked i.MX8M Mini device:&lt;BR /&gt;U-Boot SPL 2021.04-dirty (Feb 28 2022 - 23:02:25 +0200)&lt;BR /&gt;power_bd71837_init&lt;BR /&gt;DDRINFO: start DRAM init&lt;BR /&gt;DDRINFO: DRAM rate 2400MTS&lt;BR /&gt;DDRINFO:ddrphy calibration done&lt;BR /&gt;DDRINFO: ddrmix config done&lt;BR /&gt;SEC0: RNG instantiated&lt;BR /&gt;Normal Boot&lt;BR /&gt;Trying to boot from MMC1&lt;/P&gt;&lt;P&gt;Authenticate image from DDR location 0x401fcdc0, image_size=0x3020, ivt_offset=0x1000&lt;BR /&gt;NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9&lt;BR /&gt;NOTICE: BL31: Built : 19:24:31, Feb 27 2022&lt;BR /&gt;ERROR: Error initializing runtime service opteed_fast &amp;lt;&amp;lt;&amp;lt; First error message&lt;/P&gt;&lt;P&gt;U-Boot 2021.04-dirty (Feb 28 2022 - 23:02:25 +0200)&lt;/P&gt;&lt;P&gt;CPU: i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)&lt;BR /&gt;CPU: Commercial temperature grade (0C to 95C) at 32C&lt;BR /&gt;Reset cause: POR&lt;BR /&gt;Model: FORLINX&lt;BR /&gt;DRAM: 2 GiB&lt;BR /&gt;MMC: FSL_SDHC: 1, FSL_SDHC: 2&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Hit any key to stop autoboot: 0&lt;BR /&gt;u-boot=&amp;gt; dek_blob 0x40402000 0x40403000 128&lt;BR /&gt;Cannot get OP-TEE device &amp;lt;&amp;lt;&amp;lt;&amp;lt; Second error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help to get past the initialisation error will be much appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frikkie&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 19:18:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OP-TEE-initialisation-failed-in-i-MX8MM/m-p/1422181#M187705</guid>
      <dc:creator>frix</dc:creator>
      <dc:date>2022-03-02T19:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: OP-TEE initialisation failed in i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OP-TEE-initialisation-failed-in-i-MX8MM/m-p/1422608#M187747</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;I've confirmed that I get the same error when repeating the steps on the&amp;nbsp;imx_5.4.70_2.3.0 branch.&lt;/P&gt;&lt;P&gt;I've attached the log file from the mkimage command as well as the SPL and FIT csf files for the code signing tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;U-Boot log&lt;/U&gt;&lt;/P&gt;&lt;P&gt;U-Boot SPL 2020.04-00001-g44f5949dd9-dirty (Mar 03 2022 - 11:40:33 +0200)&lt;BR /&gt;power_bd71837_init&lt;BR /&gt;DDRINFO: start DRAM init&lt;BR /&gt;DDRINFO: DRAM rate 2400MTS&lt;BR /&gt;DDRINFO:ddrphy calibration done&lt;BR /&gt;DDRINFO: ddrmix config done&lt;BR /&gt;Normal Boot&lt;BR /&gt;Trying to boot from MMC1&lt;BR /&gt;&lt;BR /&gt;Authenticate image from DDR location 0x401fcdc0, image_size=0x3020, ivt_offset=0x1000&lt;BR /&gt;NOTICE: &amp;nbsp;BL31: v2.4(release):lf-5.10.72-2.2.0-0-g5782363f9&lt;BR /&gt;NOTICE: &amp;nbsp;BL31: Built : 19:24:31, Feb 27 2022&lt;BR /&gt;ERROR: &amp;nbsp;&amp;nbsp;Error initializing runtime service opteed_fast&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;u-boot=&amp;gt; dek_blob 0x40402000 0x40403000 128&lt;BR /&gt;Cannot get OP-TEE device&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 10:06:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OP-TEE-initialisation-failed-in-i-MX8MM/m-p/1422608#M187747</guid>
      <dc:creator>frix</dc:creator>
      <dc:date>2022-03-03T10:06:21Z</dc:date>
    </item>
  </channel>
</rss>

