Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54077C25B4E for ; Fri, 20 Jan 2023 10:22:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55B7B856D7; Fri, 20 Jan 2023 11:21:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="OlmuSK8V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B658856A7; Fri, 20 Jan 2023 11:20:33 +0100 (CET) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EE1C1856A7 for ; Fri, 20 Jan 2023 11:20:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-francis@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30KAKCPb055665; Fri, 20 Jan 2023 04:20:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674210012; bh=+MJM5hPsx3JSsCfruAlGKdBoUkr8gzq53l8v85LOJO4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OlmuSK8Vme3tRrPMg5hbw4USoENGZmsRN1KHrThMiVNZ+9fOsBUBCeZjUQuFIlXDt J9LUcRDmf3l13LX4yiA5Qf4/WD2Rm/L7S64qDZEUXSRdwsh15Z/RARNga4vu1sS2WG n+B15zO4tp4isqwZ7rsESZ8UqHHc5f9ndTsk6mjc= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30KAKCA2008445 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Jan 2023 04:20:12 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 20 Jan 2023 04:20:12 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 20 Jan 2023 04:20:12 -0600 Received: from ula0497641.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30KAJ49N026221; Fri, 20 Jan 2023 04:20:09 -0600 From: Neha Malcom Francis To: , , , , , CC: , , , Subject: [PATCH 21/21] doc: board: ti: Update documentation for binman flow Date: Fri, 20 Jan 2023 15:49:03 +0530 Message-ID: <20230120101903.179959-22-n-francis@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230120101903.179959-1-n-francis@ti.com> References: <20230120101903.179959-1-n-francis@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and shell scripts within U-Boot. Modify this to using the binman flow so that user understands how to build the final boot images. Signed-off-by: Neha Malcom Francis --- doc/board/ti/am62x_sk.rst | 22 ++++++++--------- doc/board/ti/j721e_evm.rst | 35 +++++++++++--------------- doc/board/ti/k3.rst | 50 ++++++++++++-------------------------- 3 files changed, 40 insertions(+), 67 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index b1b7d99bef..adf9962307 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -115,26 +115,26 @@ 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 +5. TI Security Development Tools + Tree: https://git.ti.com/git/security-development-tools/core-secdev-k3.git + Branch: master + Build procedure: ---------------- 1. ATF: @@ -156,9 +156,7 @@ Build procedure: .. code-block:: text $ 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 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=/ti-sysfw/ti-fs-firmware-am62x-gp.bin + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 SYSFW_PATH=/ti-sysfw/ti-fs-firmware-am62x-gp.bin TI_SECURE_DEV_PKG=/build/k3/lite/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin DM=/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=/build/k3/lite/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin DM=/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 TI_SECURE_DEV_PKG=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin DM=/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin DM=/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 TI_SECURE_DEV_PKG=/path/to/security-development-tools 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..3c965a8ea0 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 @@ -168,35 +163,20 @@ 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) + 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) + .. 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 - -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} \ + make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32 \ TI_SECURE_DEV_PKG= \ - SYSFW_PATH= \ + SYSFW_PATH= \ SYSFW_HS_INNER_CERT_PATH= - At this point you should have all the needed binaries to boot the wakeup domain of your K3 SoC. @@ -207,7 +187,7 @@ domain of your K3 SoC. **Split Binary Boot Flow** (eg: j721e, am65x) | `u-boot/build/wkup/tiboot3.bin` - | `k3-image-gen/sysfw-{SOC}-evm.bin` + | `u-boot/build/wkup/sysfw-{SOC}-evm.bin` .. note :: @@ -222,20 +202,21 @@ 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} \ + 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. @@ -245,7 +226,7 @@ Sitara (`am6*`) devices use the `lite` option. 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. @@ -254,7 +235,8 @@ Sitara (`am6*`) devices use the `lite` option. # 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= \ + BL31=