blob: 13f3fa1eb241c6141e7ccfc773189b94042a623d [file] [log] [blame]
Michael Grand745ab742019-08-03 17:22:30 +02001.. _zynqmp:
Michael Grand7d61b052019-02-24 23:50:46 +01002
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +01003##########
4Zynq MPSoC
5##########
6Instructions below show how to run OP-TEE on Zynq MPSoC based boards.
Michael Grand745ab742019-08-03 17:22:30 +02007
8Supported boards
Michael Grand745ab742019-08-03 17:22:30 +02009*****************************************
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010010+------------+--------------+----------------------+
11| Board Name | Manufacturer | Hardware Description |
12+============+==============+======================+
13| ZCU102 | Xilinx/AMD | `ZCU102 Website`_ |
14+------------+--------------+----------------------+
15| ZCU104 | Xilinx/AMD | `ZCU104 Website`_ |
16+------------+--------------+----------------------+
17| ZCU106 | Xilinx/AMD | `ZCU106 Website`_ |
18+------------+--------------+----------------------+
19| Ultra96 | Avnet | `Ultra96 Website`_ |
20+------------+--------------+----------------------+
Michael Grand7d61b052019-02-24 23:50:46 +010021
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010022Boot Firmware
23*****************************************
24Xilinx Zynq MPSoC device requires two firmware images, one to configure the
25device (First Stage Bootloader) and one for runtime platform management (PMU
26Firmware). The scope of OP-TEE build Makefile does not cover buildling these two
27firmware images therefore pre built binaries are required to generate a valid
28boot image. The pre built images can be found in the following `Xilinx wiki
29<https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842316/Linux+Prebuilt+Images>`_
30page.
Michael Grand745ab742019-08-03 17:22:30 +020031
32.. note::
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010033 For Ultra96 board, the firmware binaries can be found in the Avnet website.
Michael Grand745ab742019-08-03 17:22:30 +020034
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010035Build instructions
36*****************************************
37Follow the instructions at ":ref:`get_and_build_the_solution`" page.
Michael Grand7d61b052019-02-24 23:50:46 +010038
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010039Configuration switch ``PLATFORM`` can be used to specify the target device
40as listed in table below:
41
42+------------+-------------------------------+
43| Board Name | Build configuration directive |
44+============+===============================+
45| ZCU102 | ``PLATFORM=zynqmp-zcu102`` |
46+------------+-------------------------------+
47| ZCU104 | ``PLATFORM=zynqmp-zcu104`` |
48+------------+-------------------------------+
49| ZCU106 | ``PLATFORM=zynqmp-zcu106`` |
50+------------+-------------------------------+
51| Ultra96 | ``PLATFORM=zynqmp-ultra96`` |
52+------------+-------------------------------+
53
54An example of fetch and build commands is:
Michael Grand7d61b052019-02-24 23:50:46 +010055
56.. code-block:: bash
Michael Grand7d61b052019-02-24 23:50:46 +010057
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010058 $ repo init -u https://github.com/OP-TEE/manifest.git -m zynqmp.xml
59 $ repo sync
60 $ cd build
61 $ make toolchains
62 $ make PLATFORM=zynqmp-zcu102 all
Michael Grand7d61b052019-02-24 23:50:46 +010063
Ibai Erkiaga2b3075d2021-09-01 14:50:17 +010064After completion of the buildling process, two new files will be generated
65within the ``zynqmp/`` folder, ``BOOT.bin`` and ``<platform-name>.ub``. The
66first one is the boot image composed of the FSBL, PMU Firmware, ARM Trusted
67Firmware, OP-TEE and U-Boot. The second one is a FIT image containing the Linux
68kernel, the device-tree blob and the initramfs root file system.
69
70.. note::
71 If the firmware image is not provided to the build script the boot image
72 will not be generated.
73
74Petalinux build instructions
75*****************************************
76OP-TEE build can be additionally integrated within Xilinx Petalinux tool for
77Embedded Linux development. As Petalinux is built on top of Yocto, the
78integration is performed through adding some exisiting recipes and few
79customizations. Use the previous build `Makefile
80<https://github.com/OP-TEE/build/blob/3.14.0/zynqmp.mk>`_ based on Petalinux
812020.2 release as reference.
82
83Booting the device
84*****************************************
85SD Card boot
86=============
87Place both generated images in a single partition within the SD card. Boot the
88board in SD boot mode and stop the U-Boot autoboot process once the prompt is
89displayed in the serial port.
90
91Use the bellow commands to load the FIT image to RAM and boot.
92
93.. code-block:: none
94
95 ZynqMP> fatload mmc 0 0x30000000 zynqmp-zcu102.ub
96 27803872 bytes read in 1827 ms (14.5 MiB/s)
97 ZynqMP> bootm 0x30000000
98
99.. _ZCU102 Website: https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html
100.. _ZCU104 Website: https://www.xilinx.com/products/boards-and-kits/zcu104.html
101.. _ZCU106 Website: https://www.xilinx.com/products/boards-and-kits/zcu106.html
102.. _Ultra96 Website: https://www.96boards.org/product/ultra96/