Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@
$ export UBOOT_DIR=<path-to-ti-u-boot>
$ export TI_LINUX_FW_DIR=<path-to-ti-linux-firmware>
$ export TFA_DIR=<path-to-arm-trusted-firmware>
$ export OPTEE_DIR=<path-to-ti-optee-os>

Check warning on line 450 in source/linux/Foundational_Components/U-Boot/BG-Build-K3.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.UserReplacedValues] Separate words by underscores in user-replaced values. Raw Output: {"message": "[RedHat.UserReplacedValues] Separate words by underscores in user-replaced values.", "location": {"path": "source/linux/Foundational_Components/U-Boot/BG-Build-K3.rst", "range": {"start": {"line": 450, "column": 26}}}, "severity": "INFO"}

.. note::

Expand All @@ -465,7 +466,8 @@
$ make CROSS_COMPILE="$CROSS_COMPILE_64" \
BL1=$TFA_DIR/build/k3/am62l/release/bl1.bin \
BL31=$TFA_DIR/build/k3/am62l/release/bl31.bin \
BINMAN_INDIRS=$TI_LINUX_FW_DIR
BINMAN_INDIRS=$TI_LINUX_FW_DIR \
TEE=$OPTEE_DIR/out/arm-plat-k3/core/tee-pager_v2.bin

.. ifconfig:: CONFIG_part_variant not in ('AM64X', 'AM62X', 'AM62AX', 'AM62LX')

Expand Down
50 changes: 37 additions & 13 deletions source/linux/Foundational_Components_OPTEE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

.. code-block:: console

$ git clone https://github.com/OP-TEE/optee_os.git
$ git checkout <hash>
$ git clone https://github.com/OP-TEE/optee_os.git
$ git checkout <hash>

Where <hash> is the OPTEE commit shown in :ref:`release-specific-build-information`.

Expand All @@ -43,23 +43,39 @@

.. ifconfig:: CONFIG_part_variant in ('J721S2', 'J784S4','J742S2')

.. code-block:: console
.. code-block:: console

$ export CFG_CONSOLE_UART=0x8
$ export CFG_CONSOLE_UART=0x8

Building the OP-TEE image
*************************

.. parsed-literal::
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')

.. parsed-literal::

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y

.. ifconfig:: CONFIG_part_variant in ('AM62LX')

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y
.. parsed-literal::

$ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_USER_TA_TARGETS=ta_arm64

Building the OP-TEE image with debug parameters
***********************************************

.. parsed-literal::
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')

.. parsed-literal::

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_TEE_CORE_DEBUG=y

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_TEE_CORE_DEBUG=y
.. ifconfig:: CONFIG_part_variant in ('AM62LX')

.. parsed-literal::

$ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_TEE_CORE_DEBUG=y CFG_USER_TA_TARGETS=ta_arm64

.. _building-optee-with-prng:

Expand All @@ -71,9 +87,17 @@
``CFG_WITH_SOFTWARE_PRNG`` flag to use OP-TEE's Pseudo RNG drivers as a source
of entropy can work around these issues.

.. parsed-literal::
.. ifconfig:: CONFIG_part_variant not in ('AM62LX')

.. parsed-literal::

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y

.. ifconfig:: CONFIG_part_variant in ('AM62LX')

.. parsed-literal::

$ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y
$ make CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y CFG_USER_TA_TARGETS=ta_arm64

.. _secure-storage-with-rpmb:

Expand Down Expand Up @@ -151,7 +175,7 @@

.. code-block:: console

$ git clone https://github.com/OP-TEE/optee_client
$ git clone https://github.com/OP-TEE/optee_client

.. rubric:: Building OP-TEE Client with RPMB support

Expand All @@ -162,7 +186,7 @@

.. code-block:: console

$ make CROSS_COMPILE="$CROSS_COMPILE_64" PLATFORM=k3 CFG_TEE_SUPP_LOG_LEVEL=2 RPMB_EMU=0 CFG_ARM64_core=y
$ make CROSS_COMPILE="$CROSS_COMPILE_64" PLATFORM=k3 CFG_TEE_SUPP_LOG_LEVEL=2 RPMB_EMU=0 CFG_ARM64_core=y

Now update optee-client binary and libraries on your SD card with the generated ones
in `out/export/usr` folder
Expand All @@ -188,7 +212,7 @@

.. note::

tee-pager_v2.bin may be called bl32.bin in other documentation.
tee-pager_v2.bin may be called bl32.bin in other documentation.

Check warning on line 215 in source/linux/Foundational_Components_OPTEE.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.PassiveVoice] 'be called' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice. Raw Output: {"message": "[RedHat.PassiveVoice] 'be called' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice.", "location": {"path": "source/linux/Foundational_Components_OPTEE.rst", "range": {"start": {"line": 215, "column": 25}}}, "severity": "INFO"}

Check warning on line 215 in source/linux/Foundational_Components_OPTEE.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.TermsWarnings] Consider using 'might' or 'can' rather than 'may' unless updating existing content that uses the term. Raw Output: {"message": "[RedHat.TermsWarnings] Consider using 'might' or 'can' rather than 'may' unless updating existing content that uses the term.", "location": {"path": "source/linux/Foundational_Components_OPTEE.rst", "range": {"start": {"line": 215, "column": 21}}}, "severity": "WARNING"}

|

Expand Down
10 changes: 10 additions & 0 deletions source/linux/Overview/GCC_ToolChain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ Before compiling any of the sources referenced in this document, set the cross c
host# export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"
host# export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux"
host# export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"
host# export CFLAGS64="--sysroot=${SYSROOT_64}"
host# export KCFLAGS="--sysroot=${SYSROOT_64}"
host# export LDFLAGS="--sysroot=${SYSROOT_64}"

.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X', 'AM62LX')

.. code-block:: console

host# export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-"
host# export SYSROOT_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/armv7at2hf-vfp-oe-eabi"
host# export CFLAGS32="--sysroot=${SYSROOT_32}"

If the Processor SDK is not installed, the Arm GNU toolchains can be downloaded and setup. Refer to :ref:`external-arm-toolchain` section for more details on usage.

Expand Down
Loading