[PATCH v4 20/23] doc: board: ti: Update documentation for binman flow

Neha Malcom Francis n-francis at ti.com
Thu May 18 16:27:10 CEST 2023


Earlier documentation specified builds for generating bootloader images
using an external TI repository k3-image-gen and core-secdev-k3. Modify
this to using the binman flow so that user understands how to build the
final boot images.

Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
 doc/board/ti/am62x_sk.rst  | 42 ++++++++---------
 doc/board/ti/j721e_evm.rst | 50 +++++++++-----------
 doc/board/ti/k3.rst        | 95 +++++++++++++-------------------------
 3 files changed, 73 insertions(+), 114 deletions(-)

diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 27d7b527c6..e4d58b4958 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow:
 
 Sources:
 --------
-1. SYSFW:
-	Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
-	Branch: master
-
-2. ATF:
+1. ATF:
 	Tree: https://github.com/ARM-software/arm-trusted-firmware.git
 	Branch: master
 
-3. OPTEE:
+2. OPTEE:
 	Tree: https://github.com/OP-TEE/optee_os.git
 	Branch: master
 
-4. U-Boot:
+3. U-Boot:
 	Tree: https://source.denx.de/u-boot/u-boot
 	Branch: master
 
-5. TI Linux Firmware:
+4. TI Linux Firmware:
 	Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
 	Branch: ti-linux-firmware
 
@@ -139,35 +135,37 @@ Build procedure:
 ----------------
 1. ATF:
 
-.. code-block:: text
+.. code-block:: bash
 
- $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=lite SPD=opteed
+ $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \
+        TARGET_BOARD=lite SPD=opteed
 
 2. OPTEE:
 
-.. code-block:: text
+.. code-block:: bash
 
- $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- CROSS_COMPILE64=aarch64-none-linux-gnu-
+ $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \
+        CROSS_COMPILE64=aarch64-none-linux-gnu-
 
 3. U-Boot:
 
 * 3.1 R5:
 
-.. code-block:: text
+.. code-block:: bash
 
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5
- $ cd <k3-image-gen>
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin
-
-Use the tiboot3.bin generated from last command
+ $ make ARCH=arm am62x_evm_r5_defconfig
+ $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 * 3.2 A53:
 
-.. code-block:: text
+.. code-block:: bash
 
- $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53
- $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53
+ $ make ARCH=arm am62x_evm_a53_defconfig
+ $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- \
+        BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin \
+        TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 Target Images
 --------------
diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst
index e898601c41..3ff66bd1b4 100644
--- a/doc/board/ti/j721e_evm.rst
+++ b/doc/board/ti/j721e_evm.rst
@@ -130,67 +130,61 @@ support. Below is the pictorial representation of boot flow:
 
 Sources:
 --------
-1. SYSFW:
-	Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
-	Branch: master
-
-2. ATF:
+1. ATF:
 	Tree: https://github.com/ARM-software/arm-trusted-firmware.git
 	Branch: master
 
-3. OPTEE:
+2. OPTEE:
 	Tree: https://github.com/OP-TEE/optee_os.git
 	Branch: master
 
-4. DM Firmware:
-	Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
-	Branch: ti-linux-firmware
-
-5. U-Boot:
+3. U-Boot:
 	Tree: https://source.denx.de/u-boot/u-boot
 	Branch: master
 
+4. TI Linux Firmware:
+	Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
+	Branch: ti-linux-firmware
+
 Build procedure:
 ----------------
-1. SYSFW:
-
-.. code-block:: bash
-
-    make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e
-
-2. ATF:
+1. ATF:
 
 .. code-block:: bash
 
-    make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
+ $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 \
+        TARGET_BOARD=generic SPD=opteed
 
-3. OPTEE:
+2. OPTEE:
 
 .. code-block:: bash
 
-    make PLATFORM=k3-j721e CFG_ARM64_core=y
+ $ make PLATFORM=k3-j721e CFG_ARM64_core=y
 
-4. U-Boot:
+3. U-Boot:
 
 * 4.1 R5:
 
 .. code-block:: bash
 
-    make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5
-    make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5
+ $ make j721e_evm_r5_defconfig
+ $ make CROSS_COMPILE=arm-linux-gnueabihf- \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 * 4.2 A72:
 
 .. code-block:: bash
 
-    make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72
-    make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72
+ $ make j721e_evm_a72_defconfig
+ $ make CROSS_COMPILE=aarch64-linux-gnu- \
+        BL31=<ATF dir>/build/k3/generic/release/bl31.bin \
+        TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 Target Images
 --------------
 Copy the below images to an SD card and boot:
- - sysfw.itb from step 1
- - tiboot3.bin from step 4.1
+ - tiboot3.bin and sysfw.itb from step 4.1
  - tispl.bin, u-boot.img from 4.2
 
 Image formats:
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index b49a60caf1..7aeb04b005 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -114,11 +114,6 @@ online
   | **source:** https://source.denx.de/u-boot/u-boot.git
   | **branch:** master
 
-* **K3 Image Gen**
-
-  | **source:** https://git.ti.com/git/k3-image-gen/k3-image-gen.git
-  | **branch:** master
-
 * **ARM Trusted Firmware (ATF)**
 
   | **source:** https://github.com/ARM-software/arm-trusted-firmware.git
@@ -134,11 +129,6 @@ online
   | **source:** https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
   | **branch:** ti-linux-firmware
 
-* **TI's Security Development Tools**
-
-  | **source:** https://git.ti.com/git/security-development-tools/core-secdev-k3.git
-  | **branch:** master
-
 Build Procedure
 ---------------
 
@@ -160,54 +150,37 @@ All of that to say you will need both a 32bit and 64bit cross compiler
 
 .. code-block:: bash
 
-   export CC32=arm-linux-gnueabihf-
-   export CC64=aarch64-linux-gnu-
+ $ export CC32=arm-linux-gnueabihf-
+ $ export CC64=aarch64-linux-gnu-
 
 Building tiboot3.bin
 ^^^^^^^^^^^^^^^^^^^^^
 
 1. To generate the U-Boot SPL for the wakeup domain, use the following
    commands, substituting :code:`{SOC}` for the name of your device (eg:
-   am62x)
-
-.. code-block:: bash
-
-   # inside u-boot source
-   make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32 {SOC}_evm_r5_defconfig
-   make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32
+   am62x) to package the various firmware and the wakeup UBoot SPL into
+   the final `tiboot3.bin` binary. (or the `sysfw.itb` if your device
+   uses the split binary flow)
 
-2. Next we will use the K3 Image Gen scripts to package the various
-   firmware and the wakeup UBoot SPL into the final `tiboot3.bin`
-   binary. (or the `sysfw.itb` if your device uses the split binary
-   flow)
 
 .. code-block:: bash
 
-   # inside k3-image-gen source
-   make CROSS_COMPILE=$CC32 SOC={SOC} SOC_TYPE={hs,gp} \
-        TI_SECURE_DEV_PKG=<path/to/securit-development-tools> \
-        SYSFW_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-{hs|gp}.bin> \
-        SYSFW_HS_INNER_CERT_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-hs-cert.bin
-
-For devices that use the *combined binary flow*, you will also need to
-supply the location of the SPL we created in step 1 above, so it can be
-packaged into the final `tiboot3.bin`.
-
-.. code-block:: bash
-
-   SBL=<path/to/wakeup/u-boot-spl.bin>
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_r5_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC32 \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 At this point you should have all the needed binaries to boot the wakeup
 domain of your K3 SoC.
 
 **Combined Binary Boot Flow** (eg: am62x, am64x, ... )
 
-   `k3-image-gen/tiboot3-{SOC}-{hs,gp}-evm.bin`
+   `tiboot3.bin`
 
 **Split Binary Boot Flow** (eg: j721e, am65x)
 
-   | `u-boot/build/wkup/tiboot3.bin`
-   | `k3-image-gen/sysfw-{SOC}-evm.bin`
+   | `tiboot3.bin`
+   | `sysfw-{SOC}-evm.itb`
 
 .. note ::
 
@@ -222,53 +195,47 @@ The `tispl.bin` is a standard fitImage combining the firmware need for
 the main domain to function properly as well as Device Management (DM)
 firmware if your device using a split firmware.
 
-3. We will first need ATF, as it's the first thing to run on the 'big'
+2. We will first need ATF, as it's the first thing to run on the 'big'
    application cores on the main domain.
 
 .. code-block:: bash
 
-   # inside arm-trusted-firmware source
-   make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
-        TARGET_BOARD={lite|generic} \
-        SPD=opteed \
+ $ # inside arm-trusted-firmware source
+ $ make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
+        TARGET_BOARD={lite|generic|j784s4} \
+        SPD=opteed
 
-Typically all `j7*` devices will use `TARGET_BOARD=generic` while all
-Sitara (`am6*`) devices use the `lite` option.
+Typically all `j7*` devices will use `TARGET_BOARD=generic` or `TARGET_BOARD
+=j784s4` (if it is a J784S4 device), while all Sitara (`am6*`) devices
+use the `lite` option.
 
-4. The Open Portable Trusted Execution Environment (OPTEE) is designed
+3. The Open Portable Trusted Execution Environment (OPTEE) is designed
    to run as a companion to a non-secure Linux kernel for Cortex-A cores
    using the TrustZone technology built into the core.
 
 .. code-block:: bash
 
-   # inside optee_os source
-   make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
+ $ # inside optee_os source
+ $ make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
         PLATFORM=k3 CFG_ARM64_core=y
 
-5. Finally, after ATF has initialized the main domain and OPTEE has
+4. Finally, after ATF has initialized the main domain and OPTEE has
    finished, we can jump back into U-Boot again, this time running on a
    64bit core in the main domain.
 
 .. code-block:: bash
 
-   # inside u-boot source
-   make ARCH=arm O=build/main CROSS_COMPILE=$CC64 {SOC}_evm_a{53,72}_defconfig
-   make ARCH=arm O=build/main CROSS_COMPILE=$CC64 \
-        ATF=<path/to/atf/bl31.bin \
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_a{53,72}_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC64 \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware> \
+        BL31=<path/to/atf/bl31.bin \
         TEE=<path/to/optee/tee-pager_v2.bin
 
-If your device uses a split firmware, you will also need to supply the
-path to the Device Management (DM) Firmware to be included in the final
-`tispl.bin` binary
-
-.. code-block:: bash
-
-   DM=<path/to/ti-linux-firmware/ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f>
-
 At this point you should have every binary needed initialize both the
 wakeup and main domain and to boot to the U-Boot prompt
 
 **Main Domain Bootloader**
 
-   | `u-boot/build/main/tispl.bin`
-   | `u-boot/build/main/u-boot.img`
+   | `tispl.bin`
+   | `u-boot.img`
-- 
2.34.1



More information about the U-Boot mailing list