Skip to content
Merged
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
133 changes: 21 additions & 112 deletions source/linux/Foundational_Components/U-Boot/UG-Falcon-Mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
$ # build the SDK
$ MACHINE=<machine> bitbake -k tisdk-default-image

The following set of patches are also required since they are **not** part of the
``11.01`` SDK release:

* `meta-ti <https://git.yoctoproject.org/meta-ti/log/?h=scarthgap&qt=range&q=9601219021a43cf0c8b8d30ff6fd5f1e4bd42621...272390d0f6183ebab4d7fa81c689a35a125aebc6>`__
* `U-Boot <https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2025.01-next&id=80f8ea010e3ef61277b7ab94ac4aeb85499c3ca5>`__

*************************************
Changes made by *ti-falcon* override:
*************************************
Expand Down Expand Up @@ -111,22 +105,19 @@

.. ifconfig:: CONFIG_part_variant not in ('AM62AX')

For OSPI boot, the :file:`tiboot3.bin` and :file:`tifalcon.bin` files should be
flashed to the same addresses in flash as regular boot flow but the
:file:`fitImage` is read from the root filesystem's boot directory. The MMC
For OSPI boot, the :file:`tiboot3.bin` file should be flashed to the same
addresses in flash as regular boot flow whereas :file:`tifalcon.bin` and the
:file:`fitImage` are read from the root filesystem's boot directory. The MMC
device is selected by the ``mmcdev`` env variable for R5 SPL.

Below U-Boot commands can be used to download :file:`tiboot3.bin` and
:file:`tifalcon.bin` over tftp and then flash those to OSPI at their respective
addresses.
Below U-Boot commands can be used to download :file:`tiboot3.bin` over tftp
and then flash it to OSPI.

.. code-block:: console

=> sf probe
=> tftp ${loadaddr} tiboot3.bin
=> sf update $loadaddr 0x0 $filesize
=> tftp ${loadaddr} tifalcon.bin
=> sf update $loadaddr 0x80000 $filesize

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

Expand Down Expand Up @@ -159,118 +150,36 @@
Custom fitImage creation:
=========================

Clone the `core-secdev-k3 source <https://git.ti.com/cgit/security-development-tools/core-secdev-k3>`__:

.. code-block:: console

$ git clone https://git.ti.com/cgit/security-development-tools/core-secdev-k3

Copy the required kernel image renamed to :file:`Image` and the device-tree
renamed to :file:`falcon.dtb` inside the `core-secdev-k3` source directory.

Copy the following contents to a file named :file:`fitImage.its` inside
core-secdev-k3 source:

.. code-block:: dts

/dts-v1/;

/ {
description = "Kernel fitImage for falcon mode";
#address-cells = <1>;

images {
kernel-1 {
description = "Linux kernel";
data = /incbin/("Image.sec");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";
load = <0x82000000>;
entry = <0x82000000>;
};
falcon.dtb {
description = "Flattened Device Tree blob";
data = /incbin/("falcon.dtb.sec");
type = "flat_dt";
arch = "arm64";
compression = "none";
load = <0x88000000>;
entry = <0x88000000>;
};
};

configurations {
default = "conf-falcon";
conf-falcon {
description = "Presigned Linux kernel and DTB";
kernel = "kernel-1";
fdt = "falcon.dtb";
};
};
};

Sign the kernel and device-tree with :file:`secure-binary-image.sh` and create the
:file:`fitImage` by using ``mkimage``:
The following steps show how to create a falcon compatible :file:`fitImage`:

.. code-block:: console

$ # inside core-secdev-k3 source
$ ./scripts/secure-binary-image.sh Image Image.sec
$ ./scripts/secure-binary-image.sh falcon.dtb falcon.dtb.sec
$ mkimage -f fitImage.its fitImage
.. ifconfig:: CONFIG_part_variant in ('AM62AX')

****************
Non-Yocto Users:
****************
* `fitImage Creation - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62ax_sk.html#fitimage>`__

Following are the steps to build :file:`tiboot3.bin`, :file:`tifalcon.bin` and the
:file:`fitImage` required for falcon mode:
.. ifconfig:: CONFIG_part_variant in ('AM62PX')

#. For :ref:`ATF build <foundational-components-atf>`, use the following
arguments to update the ATF's jump address for the kernel and the
device-tree: ``PRELOADED_BL33_BASE=0x82000000 K3_HW_CONFIG_BASE=0x88000000``.
* `fitImage Creation - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62px_sk.html#fitimage>`__

#. For :ref:`R5 U-Boot build <Build-U-Boot-label>`, use the
:file:`k3_r5_falcon.config` fragment to enable flacon support at the R5 SPL
stage.
.. ifconfig:: CONFIG_part_variant in ('AM62X')

#. Refer to the :ref:`fitImage creation step
<u-boot_falcon_mode_fitImage_creation>` above for preparing a bootable
:file:`fitImage` with an appropriate kernel and device-tree.
* `fitImage Creation - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62x_sk.html#fitimage>`__

#. Copy the files generated to correct path on SD/eMMC as in the table below:
Non-Yocto Users:

Check warning on line 167 in source/linux/Foundational_Components/U-Boot/UG-Falcon-Mode.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'Non-Yocto Users:'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'Non-Yocto Users:'.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-Falcon-Mode.rst", "range": {"start": {"line": 167, "column": 1}}}, "severity": "INFO"}
================

.. list-table::
:widths: 8 8 8 25
:header-rows: 1
The following steps show how to enable falcon mode from the R5 SPL standalone:

Check warning on line 170 in source/linux/Foundational_Components/U-Boot/UG-Falcon-Mode.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'SPL') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'SPL') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-Falcon-Mode.rst", "range": {"start": {"line": 170, "column": 64}}}, "severity": "INFO"}

* - File
- Destination path on SD/eMMC
- Partition
- Description
.. ifconfig:: CONFIG_part_variant in ('AM62AX')

* - :file:`tiboot3.bin`
- :file:`/tiboot3.bin`
- boot (fat)
- R5 SPL with falcon support
* `Falcon Mode - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62ax_sk.html#falcon-mode>`__

* - :file:`tifalcon.bin`
- :file:`/boot/tifalcon.bin`
- root filesystem (ext4)
- tispl binary without SPL for the A core and device-tree
.. ifconfig:: CONFIG_part_variant in ('AM62PX')

* - :file:`fitImage`
- :file:`/boot/fitImage`
- root filesystem (ext4)
- :file:`fitImage` with pre-signed kernel and device-tree
* `Falcon Mode - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62px_sk.html#falcon-mode>`__

.. note::
.. ifconfig:: CONFIG_part_variant in ('AM62X')

The :file:`tifalcon.bin` binary is generated by default for all falcon
supported platforms at the A-Core U-Boot build step and can be found
alongside the existing :file:`tispl.bin` file in U-Boot build's output directory.
* `Falcon Mode - U-Boot documentaiton <https://docs.u-boot.org/en/latest/board/ti/am62x_sk.html#falcon-mode>`__

**********************
Boot time comparisons:
Expand Down