[PATCH v4 3/3] board: toradex: add verdin am62 support

Marcel Ziswiler marcel.ziswiler at toradex.com
Thu Aug 3 16:17:09 CEST 2023


Hi Nishanth

On Wed, 2023-08-02 at 17:54 -0500, Nishanth Menon wrote:
> On 22:54-20230728, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler <marcel.ziswiler at toradex.com>
> [...]
> 
> > diff --git a/doc/board/toradex/verdin-am62.rst b/doc/board/toradex/verdin-am62.rst
> > new file mode 100644
> > index 00000000000..2ece3757a41
> > --- /dev/null
> > +++ b/doc/board/toradex/verdin-am62.rst
> > @@ -0,0 +1,169 @@
> > +.. SPDX-License-Identifier: GPL-2.0-or-later
> > +.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler at toradex.com>
> > +
> > +Verdin AM62 Module
> > +==================
> > +
> > +Quick Start
> > +-----------
> > +
> > +- Get the binary-only SYSFW
> > +- Get binary-only TI Linux firmware
> > +- Build the ARM trusted firmware binary
> > +- Build the OPTEE binary
> > +- Build U-Boot for the R5
> > +- Build U-Boot for the A53
> > +- Flash to eMMC
> > +- Boot
> > +
> > +For an overview of the TI AM62 SoC boot flow please head over to:
> > +.. file:: ../ti/am62x_sk.rst
> > +
> > +Get the SYSFW
> > +-------------
> > +
> > +.. code-block:: bash
> > +
> > +    $ echo "Downloading SYSFW..."
> > +    $ git clone git://git.ti.com/k3-image-gen/k3-image-gen.git
> 
> we dont need k3-image-gen anymore..

Yes, true.

> > +
> > +Get the TI Linux Firmware
> > +-------------
> 
>  Umm..
>  https://u-boot.readthedocs.io/en/latest/build/documentation.html?highlight=htmldocs#html-documentation
>  make htmldocs:
>  u-boot/doc/board/toradex/verdin-am62.rst:31:Title underline too short.

Yes, Emanuele already spotted that trying to run Azure CI earlier today.

> If you like, please consider the following diff to your changes - as I
> had setup am62x doc to be a bit re-usable to help keep things sane and
> central:

Cool, thanks. I applied this, run Azure CI on it [1] and sent a v5 [2].

Thanks again!

> diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
> index 637985cb096e..4646bc0f5257 100644
> --- a/doc/board/ti/am62x_sk.rst
> +++ b/doc/board/ti/am62x_sk.rst
> @@ -54,7 +54,7 @@ Below is the pictorial representation of boot flow:
>  Sources:
>  --------
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_boot_sources
>      :end-before: .. k3_rst_include_end_boot_sources
>  
> @@ -62,17 +62,17 @@ Build procedure:
>  ----------------
>  0. Setup the environment variables:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_common_env_vars_desc
>      :end-before: .. k3_rst_include_end_common_env_vars_desc
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_board_env_vars_desc
>      :end-before: .. k3_rst_include_end_board_env_vars_desc
>  
>  Set the variables corresponding to this platform:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_common_env_vars_defn
>      :end-before: .. k3_rst_include_end_common_env_vars_defn
>  .. code-block:: bash
> @@ -89,14 +89,14 @@ Set the variables corresponding to this platform:
>  
>  1. Trusted Firmware-A:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_build_steps_tfa
>      :end-before: .. k3_rst_include_end_build_steps_tfa
>  
>  
>  2. OP-TEE:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_build_steps_optee
>      :end-before: .. k3_rst_include_end_build_steps_optee
>  
> @@ -104,13 +104,13 @@ Set the variables corresponding to this platform:
>  
>  * 4.1 R5:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_build_steps_spl_r5
>      :end-before: .. k3_rst_include_end_build_steps_spl_r5
>  
>  * 4.2 A53:
>  
> -.. include::  k3.rst
> +.. include::  ../ti/k3.rst
>      :start-after: .. k3_rst_include_start_build_steps_uboot
>      :end-before: .. k3_rst_include_end_build_steps_uboot
>  .. am62x_evm_rst_include_end_build_steps
> diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> index 74fdc6b41c9b..02cfd9316883 100644
> --- a/doc/board/ti/k3.rst
> +++ b/doc/board/ti/k3.rst
> @@ -31,6 +31,7 @@ K3 Based SoCs
>     :maxdepth: 1
>  
>     am62x_sk
> +   ../toradex/verdin-am62
>     am64x_evm
>     am65x_evm
>     j7200_evm
> diff --git a/doc/board/toradex/index.rst b/doc/board/toradex/index.rst
> index ead5efbb9551..7728b9db6629 100644
> --- a/doc/board/toradex/index.rst
> +++ b/doc/board/toradex/index.rst
> @@ -11,3 +11,4 @@ Toradex
>     colibri-imx8x
>     verdin-imx8mm
>     verdin-imx8mp
> +   verdin-am62
> diff --git a/doc/board/toradex/verdin-am62.rst b/doc/board/toradex/verdin-am62.rst
> index 2ece3757a410..f5ff6638df35 100644
> --- a/doc/board/toradex/verdin-am62.rst
> +++ b/doc/board/toradex/verdin-am62.rst
> @@ -17,79 +17,44 @@ Quick Start
>  - Boot
>  
>  For an overview of the TI AM62 SoC boot flow please head over to:
> -.. file:: ../ti/am62x_sk.rst
> +:doc:`../ti/am62x_sk`
>  
> -Get the SYSFW
> --------------
> -
> -.. code-block:: bash
> -
> -    $ echo "Downloading SYSFW..."
> -    $ git clone git://git.ti.com/k3-image-gen/k3-image-gen.git
> -
> -Get the TI Linux Firmware
> --------------
> -
> -.. code-block:: bash
> -
> -    $ echo "Downloading TI Linux Firmware..."
> -    $ git clone -b ti-linux-firmware git://git.ti.com/processor-firmware/ti-linux-firmware.git
> -
> -Get and Build the ARM Trusted Firmware (Trusted Firmware A)
> ------------------------------------------------------------
> -
> -.. code-block:: bash
> -
> -    $ echo "Downloading and building TF-A..."
> -    $ git clone https://github.com/ARM-software/arm-trusted-firmware.git
> -    $ cd arm-trusted-firmware
> +Sources:
> +--------
> +.. include::  ../ti/k3.rst
> +    :start-after: .. k3_rst_include_start_boot_sources
> +    :end-before: .. k3_rst_include_end_boot_sources
>  
> -Then build ATF (TF-A):
> +Build procedure:
> +----------------
> +0. Setup the environment variables:
>  
> -.. code-block:: bash
> -
> -    $ export ARCH=aarch64
> -    $ export CROSS_COMPILE=aarch64-none-linux-gnu-
> -    $ make PLAT=k3 TARGET_BOARD=lite SPD=opteed
> -
> -Get and Build OPTEE
> --------------------
> -
> -.. code-block:: bash
> -
> -    $ echo "Downloading and building OPTEE..."
> -    $ git clone https://github.com/OP-TEE/optee_os.git
> -    $ cd optee_os
> -
> -Then build OPTEE:
> -
> -.. code-block:: bash
> -
> -    $ export CROSS_COMPILE=arm-none-linux-gnueabihf-
> -    $ export CROSS_COMPILE64=aarch64-none-linux-gnu-
> -    $ make PLATFORM=k3 CFG_ARM64_core=y
> -
> -Build U-Boot for R5
> --------------------
> -
> -.. code-block:: bash
> +.. include::  ../ti/k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> +    :end-before: .. k3_rst_include_end_common_env_vars_desc
>  
> -    $ export ARCH=arm
> -    $ export CROSS_COMPILE=arm-none-linux-gnueabihf-
> -    $ make verdin-am62_r5_defconfig
> -    $ make BINMAN_INDIRS=<path/to/ti-linux-firmware>
> +.. include::  ../ti/k3.rst
> +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> +    :end-before: .. k3_rst_include_end_board_env_vars_desc
>  
> -Build U-Boot for A53
> ---------------------
> +Set the variables corresponding to this platform:
>  
> +.. include::  ../ti/k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> +    :end-before: .. k3_rst_include_end_common_env_vars_defn
>  .. code-block:: bash
>  
> -    $ export ARCH=arm64
> -    $ export CROSS_COMPILE=aarch64-none-linux-gnu-
> -    $ make verdin-am62_a53_defconfig
> -    $ make 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>
> + $ export UBOOT_CFG_CORTEXR=verdin-am62_r5_defconfig
> + $ export UBOOT_CFG_CORTEXA=verdin-am62_a53_defconfig
> + $ export TFA_BOARD=lite
> + $ # we dont use any extra TFA parameters
> + $ unset TFA_EXTRA_ARGS
> + $ export OPTEE_PLATFORM=k3-am62x
> + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> +
> +.. include::  ../ti/am62x_sk.rst
> +    :start-after: .. am62x_evm_rst_include_start_build_steps
> +    :end-before: .. am62x_evm_rst_include_end_build_steps
>  
>  Flash to eMMC
>  -------------

[1] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=6792&view=results
[2] https://lore.kernel.org/all/20230803140016.52846-1-marcel@ziswiler.com

Cheers

Marcel


More information about the U-Boot mailing list