Skip to content

Commit 2d0b83f

Browse files
h-nagallaVeeruPrudhvi
authored andcommitted
feat(linux): Add BL1 support for AM62L
Signed-off-by: Hari Nagalla <[email protected]>
1 parent e2bfb78 commit 2d0b83f

File tree

1 file changed

+88
-5
lines changed

1 file changed

+88
-5
lines changed

source/linux/Foundational_Components/U-Boot/UG-General-Info.rst

Lines changed: 88 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,48 @@ General Information
2424
2525
pip install dataclasses pyelftools jsonschema yamllint importlib-resources
2626
27+
.. ifconfig:: CONFIG_part_variant in ('AM62LX')
28+
29+
Getting the BL1 Source Code
30+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
31+
AM62L devices use TF-A BL1 boot loader to configure LPDDR4 to
32+
enable secondary program loader.
33+
The easiest way to get access to the BL1 source code is by
34+
downloading and installing the Processor SDK Linux. Once installed,
35+
the BL1 source code is included in the SDK at the path ``<path to tisdk>/board-support``.
36+
For your convenience the sources also includes the BL1's
37+
git repository including commit history.
38+
39+
Alternatively, BL1 sources can directly be fetched from GIThub. The GIT
40+
repo URL, branch and commit id can be found in the :ref:`u-boot-release-notes`
41+
section of the release notes.
42+
43+
.. _Build-BL1-label:
44+
45+
Build BL1
46+
^^^^^^^^^
47+
.. note::
48+
The following commands are intended to be run from the root of the
49+
TF-A tree unless otherwise specified. The root of the TF-A tree is
50+
the top-level directory and can be identified by looking for the
51+
"licenses" directory.
52+
53+
.. rubric:: Setting up the toolchain paths
54+
55+
.. include:: ../../Overview/GCC_ToolChain.rst
56+
:start-after: .. start_include_yocto_toolchain_host_setup
57+
:end-before: .. end_include_yocto_toolchain_host_setup
58+
59+
.. code-block:: console
60+
61+
$ cd <path to tf-a dir>
62+
63+
$ make CROSS_COMPILE="$CROSS_COMPILE_64" ARCH=aarch64 PLAT=k3 TARGET_BOARD=am62l am62l_bl1
64+
65+
<or to build bl1 and bl31 binaries from TF-A repo>
66+
67+
$ make CROSS_COMPILE="$CROSS_COMPILE_64" ARCH=aarch64 PLAT=k3 TARGET_BOARD=am62l
68+
2769
Getting the U-Boot Source Code
2870
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2971

@@ -147,7 +189,7 @@ Build U-Boot
147189

148190
.. ifconfig:: CONFIG_part_family not in ('General_family', 'AM335X_family', 'AM437X_family')
149191

150-
.. ifconfig:: CONFIG_part_variant not in ('AM65X', 'AM64X')
192+
.. ifconfig:: CONFIG_part_variant not in ('AM65X', 'AM64X', 'AM62LX')
151193

152194
.. note:: Note about HSM Rearchitecture
153195

@@ -158,7 +200,7 @@ Build U-Boot
158200
requires SPL to re-implement device and clock control. This support is not
159201
present in Uboot R5 SPL due to memory constraints on the existing 64-bit TI devices.
160202

161-
.. ifconfig:: CONFIG_part_variant not in ('AM65X')
203+
.. ifconfig:: CONFIG_part_variant not in ('AM65X', 'AM62LX')
162204

163205
.. note::
164206
As of Processor SDK 9.0, compilation of bootloader images will no longer require
@@ -184,9 +226,11 @@ Build U-Boot
184226
:start-after: .. start_include_yocto_toolchain_host_setup
185227
:end-before: .. end_include_yocto_toolchain_host_setup
186228

187-
.. rubric:: Compiling R5 and ARM64 images
229+
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')
230+
231+
.. rubric:: Compiling R5 and ARM64 images
188232

189-
Use the following table to determine what defconfig to use to configure with:
233+
Use the following table to determine what defconfig to use to configure with:
190234

191235
.. ifconfig:: CONFIG_part_variant in ('AM65X')
192236

@@ -540,8 +584,41 @@ Build U-Boot
540584
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" am62px_evm_a53_defconfig O=$UBOOT_DIR/out/a53
541585
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" CC="$CC_64" BL31=$TFA_DIR/build/k3/lite/release/bl31.bin TEE=$OPTEE_DIR/out/arm-plat-k3/core/tee-pager_v2.bin O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR
542586
587+
.. ifconfig:: CONFIG_part_variant in ('AM62LX')
588+
589+
+-------------+----------------------------------+----------------------------------------------------------+
590+
| Board | SD Boot | USB DFU |
591+
+=============+==================================+==========================================================+
592+
| AM62LX EVM | ``am62lx_evm_defconfig`` | ``am62lx_evm_defconfig`` |
593+
+-------------+----------------------------------+----------------------------------------------------------+
594+
595+
.. note::
596+
597+
Where to get the sources:
598+
599+
- ti-u-boot version: :ref:`u-boot-release-notes`
600+
- ti-linux-firmware version: :ref:`ti-linux-fw-release-notes`
601+
- TF-A version: :ref:`tf-a-release-notes`
602+
603+
.. code-block:: console
543604
544-
.. ifconfig:: CONFIG_part_variant not in ('AM64X', 'AM62X', 'AM62AX')
605+
$ export UBOOT_DIR=<path-to-ti-u-boot>
606+
$ export TI_LINUX_FW_DIR=<path-to-ti-linux-firmware>
607+
$ export TFA_DIR=<path-to-arm-trusted-firmware>
608+
609+
.. note::
610+
611+
The instructions below assume all binaries are built manually. For instructions to build bl31.bin go to: :ref:`foundational-components-optee`.
612+
For instructions to build tee-pager_v2.bin (bl32.bin) go to: :ref:`foundational-components-atf`. BINMAN_INDIRS can point to
613+
<path-to-tisdk>/board-support/prebuilt-images to use the pre-built binaries that come in the pre-built SDK (bl31.bin for BL31, bl32.bin for TEE).
614+
615+
.. code-block:: console
616+
617+
To build tiboot.bin, tispl.bin and u-boot.img. Saved in $UBOOT_DIR/out/a53. Requires bl1.bin, bl31.bin.
618+
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" am62lx_evm_defconfig O=$UBOOT_DIR/out/a53
619+
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" CC="$CC_64" BL1=$TFA_DIR/build/k3/am62l/release/bl1.bin BL31=$TFA_DIR/build/k3/am62l/release/bl31.bin O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR
620+
621+
.. ifconfig:: CONFIG_part_variant not in ('AM64X', 'AM62X', 'AM62AX', 'AM62LX')
545622

546623
.. note::
547624

@@ -553,6 +630,12 @@ Build U-Boot
553630

554631
BINMAN_INDIRS is used to fetch the DM binary from <path to ti-linux-firmware>/ti-dm/ and SYSFW binaries from <path to ti-linux-firmware>/ti-sysfw/. If using the SDK, BINMAN_INDIRS can point to <path to SDK>/board-support/prebuilt-images. Else any folder where DM is located in <path to folder>/ti-dm/ and SYSFW binaries are present in <path to folder>/ti-sysfw/ can be used. Please make sure to use the absolute path.
555632

633+
.. ifconfig:: CONFIG_part_variant in ('AM62LX')
634+
635+
.. note::
636+
637+
BINMAN_INDIRS is used to fetch the SYSFW binaries from <path to ti-linux-firmware>/ti-sysfw/. If using the SDK, BINMAN_INDIRS can point to <path to SDK>/board-support/prebuilt-images. Else any folder where SYSFW binaries are present in <path to folder>/ti-sysfw/ can be used. Please make sure to use the absolute path.
638+
556639
.. ifconfig:: CONFIG_part_variant in ('J721E', 'J7200', 'AM62X', 'AM62AX', 'AM62PX', 'J721S2', 'J784S4','J742S2', 'J722S')
557640

558641
.. note::

0 commit comments

Comments
 (0)