<?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: i.MX8MN CST Syntax Error</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MN-CST-Syntax-Error/m-p/1432322#M188490</link>
    <description>&lt;P&gt;csf_spl should like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Header]
    Version = 4.3
    Hash Algorithm = sha256
    Engine = CAAM
    Engine Configuration = 0
    Certificate Format = X509
    Signature Format = CMS

[Install SRK]
    # Index of the key location in the SRK table to be installed
    File = "../crts/SRK_1_2_3_4_table.bin"
    Source index = 0

[Install CSFK]
    # Key used to authenticate the CSF data
    File = "../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"

[Authenticate CSF]

[Unlock]
    # Leave Job Ring and DECO master ID registers Unlocked
    Engine = CAAM
    Features = MID

[Install Key]
    # Key slot index used to authenticate the key to be installed
    Verification index = 0
    # Target key slot in HAB key store where key will be installed
    Target index = 2
    # Key to install
    File = "../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"
    
[Authenticate Data]
    Verification index = 2
    Blocks = 0x91ffc0 0x0 0x30600 "imx-boot-imx8mp-lpddr4-evk-sd.bin-flash_evk"
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Mar 2022 03:08:24 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2022-03-23T03:08:24Z</dc:date>
    <item>
      <title>i.MX8MN CST Syntax Error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MN-CST-Syntax-Error/m-p/1432068#M188468</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've been following along with your &lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/guides/mx8m_secure_boot.txt?h=imx_v2020.04_5.4.70_2.3.0" target="_self"&gt;MX8M Secure Boot Doc for Release 5.4.70&lt;/A&gt;, as well as your&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/introduction_habv4.txt?h=imx_v2020.04_5.4.70_2.3.0" target="_self"&gt;HABv4 guide&lt;/A&gt;. I have also been using the latest version of &lt;A href="https://www.nxp.com/webapp/sps/download/preDownload.jsp" target="_self"&gt;NXP's CST tool&lt;/A&gt;. However, I seem to be getting a syntax error when ever I try signing my FIT image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the steps on my end to reproduce the issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ cd cst
$ ./hab4_pki_tree.sh
  Do you want to use an existing CA key (y/n)?: n
  Do you want to use Elliptic Curve Cryptography (y/n)?: n
  Enter key length in bits for PKI tree: 2048
  Enter PKI tree duration (years): 5
  How many Super Root Keys should be generated? 4
  Do you want the SRK certificates to have the CA flag set? (y/n)?: y

$ cd ../crts
$ ../linux64/bin/srktool -h 4 -t SRK_1_2_3_4_table.bin -e \
	SRK_1_2_3_4_fuse.bin -d sha256 -c \
	SRK1_sha256_2048_65537_v3_ca_crt.pem,\
	SRK2_sha256_2048_65537_v3_ca_crt.pem,\
	SRK3_sha256_2048_65537_v3_ca_crt.pem,\
	SRK4_sha256_2048_65537_v3_ca_crt.pem

$ cd ../linux64/bin
$ ./cst -i csf_spl.txt -o csf_spl.bin
error: line 1: syntax error
Undefined error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the contents of my &lt;STRONG&gt;csf_spl.txt&lt;/STRONG&gt; file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ cat csf_spl.txt
Blocks = 0x911fc0 0x0 0x22800 "/home/eric/imx-mkimage/iMX8M/flash.bin"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The syntax of this file seem to match your documentation 1-1, except for the &lt;STRONG&gt;flash.bin&lt;/STRONG&gt; path. However, I've also tried copying the &lt;STRONG&gt;flash.bin&lt;/STRONG&gt; file over to the same directory as the CST binary and replacing the full path within &lt;STRONG&gt;csf_spl.txt&lt;/STRONG&gt; with just&amp;nbsp;&lt;EM&gt;"flash.bin"&amp;nbsp;&lt;/EM&gt;to match your documentation. I've also had no success with that solution.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 15:43:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MN-CST-Syntax-Error/m-p/1432068#M188468</guid>
      <dc:creator>Eric5</dc:creator>
      <dc:date>2022-03-22T15:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MN CST Syntax Error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MN-CST-Syntax-Error/m-p/1432322#M188490</link>
      <description>&lt;P&gt;csf_spl should like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Header]
    Version = 4.3
    Hash Algorithm = sha256
    Engine = CAAM
    Engine Configuration = 0
    Certificate Format = X509
    Signature Format = CMS

[Install SRK]
    # Index of the key location in the SRK table to be installed
    File = "../crts/SRK_1_2_3_4_table.bin"
    Source index = 0

[Install CSFK]
    # Key used to authenticate the CSF data
    File = "../crts/CSF1_1_sha256_2048_65537_v3_usr_crt.pem"

[Authenticate CSF]

[Unlock]
    # Leave Job Ring and DECO master ID registers Unlocked
    Engine = CAAM
    Features = MID

[Install Key]
    # Key slot index used to authenticate the key to be installed
    Verification index = 0
    # Target key slot in HAB key store where key will be installed
    Target index = 2
    # Key to install
    File = "../crts/IMG1_1_sha256_2048_65537_v3_usr_crt.pem"
    
[Authenticate Data]
    Verification index = 2
    Blocks = 0x91ffc0 0x0 0x30600 "imx-boot-imx8mp-lpddr4-evk-sd.bin-flash_evk"
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Mar 2022 03:08:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MN-CST-Syntax-Error/m-p/1432322#M188490</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2022-03-23T03:08:24Z</dc:date>
    </item>
  </channel>
</rss>

