<?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>Layerscape中的主题 Re: u-boot signing process</title>
    <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607621#M11960</link>
    <description>&lt;P&gt;&lt;BR /&gt;Thank you for contacting NXP support!&lt;/P&gt;
&lt;P&gt;Follow these steps to compile and deploy TF-A binaries (bl2_.pbl) on the required boot mode.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Compile PBL binary from RCW source file&lt;/LI&gt;
&lt;LI&gt;Compile U-Boot binary&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Compile TF-A binaries (bl2_.pbl and fip.bin)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;1-COMPILE PBL BINARY FROM RCW SOURCE FILE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You have to create a new directory to compile the binaries that you need to create a TF-A binary&lt;/P&gt;
&lt;P&gt;You need to compile the rcw_&amp;lt;boot_mode&amp;gt;.bin binary to build the bl2_&amp;lt;boot_mode&amp;gt;.pbl binary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clone the rcw repository and compile the PBL binary.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/rcw" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/rcw&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd rcw&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ cd &amp;lt;platform&amp;gt;&lt;/LI&gt;
&lt;LI&gt;If required, make changes to the rcw files.&lt;/LI&gt;
&lt;LI&gt;$ make&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inside of the directory called “RR_FQPP_1455” you can see some binaries in the with the next nomenclature:&lt;/P&gt;
&lt;P&gt;rcw_&amp;lt;freq&amp;gt;.bin&lt;/P&gt;
&lt;P&gt;Where “freq” is the frequency in MHz of the processor.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2-COMPILE U-BOOT BINARY&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to compile the u-boot.bin binary to build the fip.bin binary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clone the u-boot repository and compile the U-Boot binary for TF-A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd u-boot&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ export ARCH=arm64&lt;/LI&gt;
&lt;LI&gt;$ export CROSS_COMPILE=aarch64-linux-gnu-&lt;/LI&gt;
&lt;LI&gt;$ make distclean&lt;/LI&gt;
&lt;LI&gt;$ make &amp;lt;platform&amp;gt;_tfa_defconfig&lt;/LI&gt;
&lt;LI&gt;$ make&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;3 Compile TF-A binaries (bl2_.pbl and fip.bin) &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/atf" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/atf&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd atf&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ export ARCH=arm64&lt;/LI&gt;
&lt;LI&gt;$ export CROSS_COMPILE=aarch64-linux-gnu-&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The compiled BL2 binaries, bl2.bin and bl2_&amp;lt;boot mode&amp;gt;.pbl are available at atf/build/&amp;lt;platform&amp;gt;/release/.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt; For any update in the BL2 source code or RCW binary, the bl2_&amp;lt;boot mode&amp;gt;.pbl binary needs to be recompiled.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.1 HOW TO COMPILE BL2 BINARY&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To build BL2 binary with OPTEE, run this command:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ make PLAT=&amp;lt;platform&amp;gt; bl2 SPD=opteed BOOT_MODE=&amp;lt;boot_mode&amp;gt; BL32=&amp;lt;optee_binary&amp;gt; pbl RCW=&amp;lt;path_to_rcw_binary&amp;gt;/&amp;lt;rcw_binary_for_specific_boot_mode&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The compiled BL2 binaries, bl2.bin and bl2_&amp;lt;boot_mode&amp;gt;.pbl are available at atf/build/&amp;lt;platform&amp;gt;/release/. For any update in the BL2 source code or RCW binary, the bl2_&amp;lt;boot_mode&amp;gt;.pbl binary needs to be recompiled.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To compile the BL2 binary without OPTEE:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;make PLAT=&amp;lt;platform&amp;gt; bl2 BOOT_MODE=&amp;lt;boot_mode&amp;gt; pbl RCW=&amp;lt;path_to_rcw_binary&amp;gt;/&amp;lt;rcw_binary_for_specific_boot_mode&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.2 HOW TO COMPILE FIP BINARY&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To build FIP binary with OPTEE and without trusted board boot, run this command:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ make PLAT=&amp;lt;platform&amp;gt; fip BL33=&amp;lt;path_to_u-boot_binary&amp;gt;/u-boot.bin SPD=opteed &amp;nbsp;BL32=&amp;lt;path_to_optee_binary&amp;gt;/tee.bin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To compile the FIP binary without OPTEE and without trusted board boot:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;make PLAT=&amp;lt;platform&amp;gt; fip BL33=&amp;lt;path_to_u-boot_binary&amp;gt;/u-boot.bin&lt;/P&gt;
&lt;P&gt;The compiled BL31 and FIP binaries, bl31.bin, fip.bin, are available at atf/build/&amp;lt;platform&amp;gt;/release/. For any update in&lt;/P&gt;
&lt;P&gt;the BL31, BL32, or BL33 binaries, the fip.bin binary needs to be recompiled&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 11:01:06 GMT</pubDate>
    <dc:creator>Chavira</dc:creator>
    <dc:date>2023-03-01T11:01:06Z</dc:date>
    <item>
      <title>u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607540#M11959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;ls1088a rdb, sd boot mode.&lt;/P&gt;&lt;P&gt;I based on&amp;nbsp;Layerscape Linux Distribution POC User Guide Rev. L5.15.71-2.2.0 — 17 February 2023&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please describe how I can sign u-boot binaries manually?&lt;/P&gt;&lt;P&gt;I generate bl2_sd.pbl and fip_uboot.bin (as well as rcw_1600_sd.rcw [without SB_EN =1], rcw_1600_sd.bin and u-boot.bin) due to bitbake qoriq-atf. I know that can generate it as secure, but I need to do it manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know, for it the uni_sign is used, but I don't understand what is flow.&lt;/P&gt;&lt;P&gt;Am I correct?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;./gen_keys 2048&lt;/LI&gt;&lt;LI&gt;./uni_sign --hash input_files/uni_sign/ls2088_1088/sd/input_uboot_secure (to take key.pub hash, the pub key should be in the CST dir)&lt;/LI&gt;&lt;LI&gt;cp u-boot.bin to&amp;nbsp;the CST dir&lt;/LI&gt;&lt;LI&gt;./uni_sign input_files/uni_sign/ls2088_1088/sd/input_uboot_secure (to sing u-boot)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; The input file for both hash and u-boot&amp;nbsp;signing&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;P&gt;/* Copyright (c) 2015 Freescale Semiconductor, Inc.&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;ESBC=1&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify the platform. [Mandatory]&lt;BR /&gt;# Choose Platform -&lt;BR /&gt;# TRUST 3.0: LS2085&lt;BR /&gt;# TRUST 3.1: LS2088, LS1088&lt;BR /&gt;PLATFORM=LS1088&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Entry Point/Image start address field in the header.[Mandatory]&lt;BR /&gt;# (default=ADDRESS of first file specified in images)&lt;BR /&gt;# Address can be 64 bit&lt;BR /&gt;ENTRY_POINT=80400000&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify the Key Information.&lt;BR /&gt;# PUB_KEY [Mandatory] Comma Seperated List&lt;BR /&gt;# Usage: &amp;lt;srk1.pub&amp;gt; &amp;lt;srk2.pub&amp;gt; .....&lt;BR /&gt;PUB_KEY=srk.pub&lt;BR /&gt;# KEY_SELECT [Mandatory]&lt;BR /&gt;# USAGE (for TRUST 3.x): (between 1 to &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;BR /&gt;KEY_SELECT=1&lt;BR /&gt;# PRI_KEY [Mandatory] Single Key Used for Signing&lt;BR /&gt;# USAGE: &amp;lt;srk.pri&amp;gt;&lt;BR /&gt;PRI_KEY=srk.pri&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify IMAGE, Max 8 images are possible.&lt;BR /&gt;# DST_ADDR is required only for Non-PBL Platform. [Mandatory]&lt;BR /&gt;# USAGE : IMAGE_NO = {IMAGE_NAME, SRC_ADDR, DST_ADDR}&lt;BR /&gt;# Address can be 64 bit&lt;BR /&gt;IMAGE_1={u-boot.bin,80400000,ffffffff}&lt;BR /&gt;IMAGE_2={,,}&lt;BR /&gt;IMAGE_3={,,}&lt;BR /&gt;IMAGE_4={,,}&lt;BR /&gt;IMAGE_5={,,}&lt;BR /&gt;IMAGE_6={,,}&lt;BR /&gt;IMAGE_7={,,}&lt;BR /&gt;IMAGE_8={,,}&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify OEM AND FSL ID to be populated in header. [Optional]&lt;BR /&gt;# e.g FSL_UID_0=11111111&lt;BR /&gt;FSL_UID_0=&lt;BR /&gt;FSL_UID_1=&lt;BR /&gt;OEM_UID_0=&lt;BR /&gt;OEM_UID_1=&lt;BR /&gt;OEM_UID_2=&lt;BR /&gt;OEM_UID_3=&lt;BR /&gt;OEM_UID_4=&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify the output file names [Optional].&lt;BR /&gt;# Default Values chosen in Tool&lt;BR /&gt;OUTPUT_HDR_FILENAME=hdr_uboot.out&lt;BR /&gt;IMAGE_HASH_FILENAME=&lt;BR /&gt;RSA_SIGN_FILENAME=&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify The Flags. (0 or 1) - [Optional]&lt;BR /&gt;MP_FLAG=0&lt;BR /&gt;ISS_FLAG=1&lt;BR /&gt;LW_FLAG=0&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# Specify VERBOSE as 1, if you want to Display Header Information [Optional]&lt;BR /&gt;VERBOSE=1&lt;/P&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;The u-boot.bin wasn't modified, but I got&amp;nbsp;hdr_uboot.out.&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What should I do to sign normal u-boot?&lt;/LI&gt;&lt;LI&gt;How can I sign the rcw.bin?&lt;/LI&gt;&lt;LI&gt;Should I create pbl and fip before signing or I have to sign u-boot and rcw before creation pbl and fip?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:25:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607540#M11959</guid>
      <dc:creator>artem_shimko</dc:creator>
      <dc:date>2023-03-01T11:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607621#M11960</link>
      <description>&lt;P&gt;&lt;BR /&gt;Thank you for contacting NXP support!&lt;/P&gt;
&lt;P&gt;Follow these steps to compile and deploy TF-A binaries (bl2_.pbl) on the required boot mode.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Compile PBL binary from RCW source file&lt;/LI&gt;
&lt;LI&gt;Compile U-Boot binary&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Compile TF-A binaries (bl2_.pbl and fip.bin)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;1-COMPILE PBL BINARY FROM RCW SOURCE FILE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You have to create a new directory to compile the binaries that you need to create a TF-A binary&lt;/P&gt;
&lt;P&gt;You need to compile the rcw_&amp;lt;boot_mode&amp;gt;.bin binary to build the bl2_&amp;lt;boot_mode&amp;gt;.pbl binary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clone the rcw repository and compile the PBL binary.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/rcw" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/rcw&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd rcw&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ cd &amp;lt;platform&amp;gt;&lt;/LI&gt;
&lt;LI&gt;If required, make changes to the rcw files.&lt;/LI&gt;
&lt;LI&gt;$ make&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inside of the directory called “RR_FQPP_1455” you can see some binaries in the with the next nomenclature:&lt;/P&gt;
&lt;P&gt;rcw_&amp;lt;freq&amp;gt;.bin&lt;/P&gt;
&lt;P&gt;Where “freq” is the frequency in MHz of the processor.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2-COMPILE U-BOOT BINARY&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to compile the u-boot.bin binary to build the fip.bin binary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clone the u-boot repository and compile the U-Boot binary for TF-A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd u-boot&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ export ARCH=arm64&lt;/LI&gt;
&lt;LI&gt;$ export CROSS_COMPILE=aarch64-linux-gnu-&lt;/LI&gt;
&lt;LI&gt;$ make distclean&lt;/LI&gt;
&lt;LI&gt;$ make &amp;lt;platform&amp;gt;_tfa_defconfig&lt;/LI&gt;
&lt;LI&gt;$ make&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;3 Compile TF-A binaries (bl2_.pbl and fip.bin) &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;$ git clone &lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/atf" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/atf&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;$ cd atf&lt;/LI&gt;
&lt;LI&gt;$ git checkout -b LSDK-21.08 LSDK-21.08&lt;/LI&gt;
&lt;LI&gt;$ export ARCH=arm64&lt;/LI&gt;
&lt;LI&gt;$ export CROSS_COMPILE=aarch64-linux-gnu-&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The compiled BL2 binaries, bl2.bin and bl2_&amp;lt;boot mode&amp;gt;.pbl are available at atf/build/&amp;lt;platform&amp;gt;/release/.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt; For any update in the BL2 source code or RCW binary, the bl2_&amp;lt;boot mode&amp;gt;.pbl binary needs to be recompiled.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.1 HOW TO COMPILE BL2 BINARY&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To build BL2 binary with OPTEE, run this command:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ make PLAT=&amp;lt;platform&amp;gt; bl2 SPD=opteed BOOT_MODE=&amp;lt;boot_mode&amp;gt; BL32=&amp;lt;optee_binary&amp;gt; pbl RCW=&amp;lt;path_to_rcw_binary&amp;gt;/&amp;lt;rcw_binary_for_specific_boot_mode&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The compiled BL2 binaries, bl2.bin and bl2_&amp;lt;boot_mode&amp;gt;.pbl are available at atf/build/&amp;lt;platform&amp;gt;/release/. For any update in the BL2 source code or RCW binary, the bl2_&amp;lt;boot_mode&amp;gt;.pbl binary needs to be recompiled.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To compile the BL2 binary without OPTEE:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;make PLAT=&amp;lt;platform&amp;gt; bl2 BOOT_MODE=&amp;lt;boot_mode&amp;gt; pbl RCW=&amp;lt;path_to_rcw_binary&amp;gt;/&amp;lt;rcw_binary_for_specific_boot_mode&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.2 HOW TO COMPILE FIP BINARY&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To build FIP binary with OPTEE and without trusted board boot, run this command:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;$ make PLAT=&amp;lt;platform&amp;gt; fip BL33=&amp;lt;path_to_u-boot_binary&amp;gt;/u-boot.bin SPD=opteed &amp;nbsp;BL32=&amp;lt;path_to_optee_binary&amp;gt;/tee.bin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To compile the FIP binary without OPTEE and without trusted board boot:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;make PLAT=&amp;lt;platform&amp;gt; fip BL33=&amp;lt;path_to_u-boot_binary&amp;gt;/u-boot.bin&lt;/P&gt;
&lt;P&gt;The compiled BL31 and FIP binaries, bl31.bin, fip.bin, are available at atf/build/&amp;lt;platform&amp;gt;/release/. For any update in&lt;/P&gt;
&lt;P&gt;the BL31, BL32, or BL33 binaries, the fip.bin binary needs to be recompiled&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:01:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607621#M11960</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-03-01T11:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607633#M11962</link>
      <description>&lt;P&gt;Thank you, but unfortunately, it is not answer for my questions. All these steps I passed. I need to know how I can sign&lt;SPAN&gt;&amp;nbsp;it .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:26:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1607633#M11962</guid>
      <dc:creator>artem_shimko</dc:creator>
      <dc:date>2023-03-01T11:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1608689#M11969</link>
      <description>&lt;P&gt;That is a little example to signin images on LS1043ARDB.&lt;/P&gt;&lt;P&gt;Command to generate public/private key pair&lt;BR /&gt;./gen_keys SIZE NAME&lt;BR /&gt;SIZE refers to size of public key in bits. (Modulus size).&lt;BR /&gt;Sizes supported -- 1024, 2048, 4096. The generated keys are in PEM format.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;../cst/gen_keys 1024 -p srk.pri -k srk.pub&lt;BR /&gt;===============================================================&lt;BR /&gt;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit&amp;nbsp;&lt;BR /&gt;This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)&lt;BR /&gt;===============================================================&lt;BR /&gt;Generated SRK pair stored in :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PUBLIC KEY srk.pub&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRIVATE KEY srk.pri&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The gen_otpmk utility in the Code Signing Tool can be used to generate a 256b random number and insert the hamming code, or simply perform the hamming code insertion for a user defined 256b.&lt;/P&gt;&lt;P&gt;&amp;gt;./gen_otpmk --help&lt;BR /&gt;Usage: ./gen_otpmk &amp;lt;trust_arch&amp;gt; [string]&lt;BR /&gt;string : 32 byte string&lt;BR /&gt;e.g. gen_otpmk 1 1111111122222222333333334444444455555555666666667777777788888888&lt;BR /&gt;&amp;gt;./gen_otpmk 2 1111111122222222333333334444444455555555666666667777777788888888&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Code Signing Commands for Images: Create CSF Header&lt;/P&gt;&lt;P&gt;Ls -l input_files/uni_sign/ls1043&lt;BR /&gt;total 12&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3490 Jan 27 00:34 input_bootscript_secure&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3537 Jan 27 00:34 input_kernel_secure&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3604 Jan 27 00:34 input_uboot_nor_secure&lt;/P&gt;&lt;P&gt;u-boot Image&lt;BR /&gt;./input_files/uni_sign/ls1043/input_uboot_nor_secure&lt;BR /&gt;The input fields are specified in input_uboot_secure file. Please ensure that the filename mentioned in the input_uboot_secure is same as copied in the cst directory.&lt;BR /&gt;Linux Kernel and Root file system&lt;BR /&gt;./input_files/uni_sign/ls1043/input_kernel_secure&lt;BR /&gt;kernel-fsl-ls1043a-rdb.dtb-ls1043ardb.itb would be validated form u-boot. The flash address used here is according to the address map of u-boot. Please ensure that filename mentioned in the input_uimage_secure is same as copied in the cst directory.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Boot Script&lt;BR /&gt;./input_files/uni_sign/ls1043/input_bootscript_secure&lt;BR /&gt;Please make sure that filename mentioned in the bootscript is same as copied in the cst directory&lt;/P&gt;&lt;P&gt;Sign the image with CST tools&lt;BR /&gt;$ cd /home/user_lab/Linux-LS1043A-SDK-V0.4-20150826-yocto-RDS-20151209/build_ls1043ardb_release/tmp/sysroots/x86_64-linux/usr/bin/cst&lt;BR /&gt;$ ll input_files/uni_sign/ls1043&lt;BR /&gt;total 12&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3490 Jan 12 08:27 input_bootscript_secure&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3537 Jan 12 08:27 input_kernel_secure&lt;BR /&gt;-rw-rw-r-- 3 user_lab user_lab 3604 Jan 12 08:27 input_uboot_nor_secure&lt;BR /&gt;$ vi input_files/uni_sign/ls1043/input_kernel_secure&lt;BR /&gt;Modify “IMAGE_1={kernel-fsl-ls1043a-rdb.dtb-ls1043ardb.itb,81000000,ffffffff}”&lt;BR /&gt;$ vi input_files/uni_sign/ls1043/input_uboot_nor_secure&lt;BR /&gt;Modify “IMAGE_1={u-boot-ls1043ardb.bin,60100000,ffffffff}”&lt;BR /&gt;$ vi input_files/uni_sign/ls1043/input_bootscript_secure&lt;/P&gt;&lt;P&gt;Note: bootscript is used when you have chain of trust.&lt;/P&gt;&lt;P&gt;CST tool generates the following SHA-256 hash in a binary hash of hex bytes, not string hash of text!&lt;BR /&gt;$./uni_sign --hash input_uboot_secure&lt;BR /&gt;./uni_sign --hash input_files/uni_sign/ls1043/input_uboot_nor_secure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have some documents that maybe can be useful, please open a case mentioning me following the link:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/support/support:SUPPORTHOME" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Support | NXP Semiconductors&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you must have a valid NDA to receive that files.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 18:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1608689#M11969</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-03-02T18:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1608884#M11974</link>
      <description>&lt;P&gt;Thank you for your answer. It is really very helpful information.&lt;/P&gt;&lt;P&gt;1. ./gen_otpmk 2 generates OTPMK fuse values. The&amp;nbsp; "2" means that target platform is &lt;EM&gt;big&lt;/EM&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;EM&gt;endian&lt;/EM&gt; one.&amp;nbsp;As far as I know, I must swap this values before fusing because I use a &lt;EM&gt;little&lt;/EM&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;EM&gt;endian&lt;/EM&gt; host machine to generate it. Am I correct?&lt;/P&gt;&lt;P&gt;2. Same with SRKH values. Please confirm it.&lt;/P&gt;&lt;P&gt;3. What should I do with RCW?&lt;/P&gt;&lt;P&gt;3.1 How can I sign it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.2 Do I have to sign it before creating .pbl or after?&lt;/P&gt;&lt;P&gt;4.1 FIP file consists at least from BL31 and BL33 (u-boot). Is u-boot signed before creating FIP?&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.2 Where can I get signed by my key&amp;nbsp;BL31?&lt;/P&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 05:05:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1608884#M11974</guid>
      <dc:creator>artem_shimko</dc:creator>
      <dc:date>2023-03-03T05:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot signing process</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1609350#M11981</link>
      <description>&lt;P&gt;For RCW should be the same direction for cf the sign it is at the same time as u-boot.bin.&lt;/P&gt;
&lt;P&gt;The BL31 is signed on fip.bin in that contains bl31 and bl33.&lt;/P&gt;
&lt;P&gt;This is the map for the RCW sign.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chavira_0-1677861850079.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213165i62F7BA81B36A7241/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chavira_0-1677861850079.png" alt="Chavira_0-1677861850079.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a very explained tutorial for LS1043 but I can't publish that file here, please open a case following the link and mention my name on the case to provide you with the file.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/support/support:SUPPORTHOME" target="_blank"&gt;Support | NXP Semiconductors&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 16:44:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-signing-process/m-p/1609350#M11981</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-03-03T16:44:22Z</dc:date>
    </item>
  </channel>
</rss>

