| 1 |
TF-A UART Booting Instructions for Marvell Platforms |
| 2 |
==================================================== |
| 3 |
|
| 4 |
This section describes how to temporary boot the Trusted Firmware-A (TF-A) project over UART |
| 5 |
without flashing it to non-volatile storage for Marvell's platforms. |
| 6 |
|
| 7 |
See :ref:`TF-A Build Instructions for Marvell Platforms` how to build ``mrvl_uart`` and |
| 8 |
``mrvl_flash`` targets used in this section. |
| 9 |
|
| 10 |
Armada37x0 UART image downloading |
| 11 |
--------------------------------- |
| 12 |
|
| 13 |
There are two options how to download UART image into any Armada37x0 board. |
| 14 |
|
| 15 |
Marvell Wtpdownloader |
| 16 |
~~~~~~~~~~~~~~~~~~~~~ |
| 17 |
|
| 18 |
Marvell Wtpdownloader works only with UART images stored in separate files and supports only upload |
| 19 |
speed with 115200 bauds. Target ``mrvl_uart`` produces GZIPed TAR archive ``uart-images.tgz.bin`` |
| 20 |
with either three files ``TIM_ATF.bin``, ``wtmi_h.bin`` and ``boot-image_h.bin`` for non-secure |
| 21 |
boot or with four files ``TIM_ATF_TRUSTED.bin``, ``TIMN_ATF_TRUSTED.bin``, ``wtmi_h.bin`` and |
| 22 |
``boot-image_h.bin`` when secure boot is enabled. |
| 23 |
|
| 24 |
Compilation: |
| 25 |
|
| 26 |
.. code:: shell |
| 27 |
|
| 28 |
> git clone https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git |
| 29 |
> make -C A3700-utils-marvell/wtptp/src/Wtpdownloader_Linux -f makefile.mk |
| 30 |
|
| 31 |
It produces executable binary ``A3700-utils-marvell/wtptp/src/Wtpdownloader_Linux/WtpDownload_linux`` |
| 32 |
|
| 33 |
To download images from ``uart-images.tgz.bin`` archive unpack it and for non-secure boot variant run: |
| 34 |
|
| 35 |
.. code:: shell |
| 36 |
|
| 37 |
> stty -F /dev/ttyUSB<port#> clocal |
| 38 |
> WtpDownload_linux -P UART -C <port#> -E -B TIM_ATF.bin -I wtmi_h.bin -I boot-image_h.bin |
| 39 |
|
| 40 |
After that immediately start terminal on ``/dev/ttyUSB<port#>`` to see boot output. |
| 41 |
|
| 42 |
CZ.NIC mox-imager |
| 43 |
~~~~~~~~~~~~~~~~~ |
| 44 |
|
| 45 |
CZ.NIC mox-imager supports all Armada37x0 boards (not only Turris MOX as name suggests). It works |
| 46 |
with either with separate files from ``uart-images.tgz.bin`` archive (like Marvell Wtpdownloader) |
| 47 |
produced by ``mrvl_uart`` target or also with ``flash-image.bin`` file produced by ``mrvl_flash`` |
| 48 |
target, which is the exactly same file as used for flashing. So when using CZ.NIC mox-imager there |
| 49 |
is no need to build separate files for UART flashing like in case with Marvell Wtpdownloader. |
| 50 |
|
| 51 |
CZ.NIC mox-imager moreover supports higher upload speeds up to the 6000000 bauds (which seems to |
| 52 |
be limit of Armada37x0 SoC) which is much higher and faster than Marvell Wtpdownloader. |
| 53 |
|
| 54 |
Compilation: |
| 55 |
|
| 56 |
.. code:: shell |
| 57 |
|
| 58 |
> git clone https://gitlab.nic.cz/turris/mox-imager.git |
| 59 |
> make -C mox-imager |
| 60 |
|
| 61 |
It produces executable binary ``mox-imager/mox-imager`` |
| 62 |
|
| 63 |
To download single file image built by ``mrvl_flash`` target at the highest speed, run: |
| 64 |
|
| 65 |
.. code:: shell |
| 66 |
|
| 67 |
> mox-imager -D /dev/ttyUSB<port#> -E -b 6000000 -t flash-image.bin |
| 68 |
|
| 69 |
To download images from ``uart-images.tgz.bin`` archive built by ``mrvl_uart`` target for |
| 70 |
non-secure boot variant (like Wtpdownloader) but at the highest speed, first unpack |
| 71 |
``uart-images.tgz.bin`` archive and then run: |
| 72 |
|
| 73 |
.. code:: shell |
| 74 |
|
| 75 |
> mox-imager -D /dev/ttyUSB<port#> -E -b 6000000 -t TIM_ATF.bin wtmi_h.bin boot-image_h.bin |
| 76 |
|
| 77 |
CZ.NIC mox-imager after successful download will start its own mini terminal (option ``-t``) to |
| 78 |
not loose any boot output. It also prints boot output which is sent either by image files or by |
| 79 |
bootrom during transferring of image files. This mini terminal can be quit by CTRL-\\ + C keypress. |
| 80 |
|
| 81 |
|
| 82 |
A7K/A8K/CN913x UART image downloading |
| 83 |
------------------------------------- |
| 84 |
|
| 85 |
A7K/A8K/CN913x uses same image ``flash-image.bin`` for both flashing and booting over UART. |
| 86 |
For downloading image over UART it is possible to use mvebu64boot tool. |
| 87 |
|
| 88 |
Compilation: |
| 89 |
|
| 90 |
.. code:: shell |
| 91 |
|
| 92 |
> git clone https://github.com/pali/mvebu64boot.git |
| 93 |
> make -C mvebu64boot |
| 94 |
|
| 95 |
It produces executable binary ``mvebu64boot/mvebu64boot`` |
| 96 |
|
| 97 |
To download ``flash-image.bin`` image run: |
| 98 |
|
| 99 |
.. code:: shell |
| 100 |
|
| 101 |
> mvebu64boot -t -b flash-image.bin /dev/ttyUSB0 |
| 102 |
|
| 103 |
After successful download it will start own mini terminal (option ``-t``) like CZ.NIC mox-imager. |