uart-booting.rst 3.9 KB

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