Michael Grand | 745ab74 | 2019-08-03 17:22:30 +0200 | [diff] [blame] | 1 | .. _zynqmp: |
Michael Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 2 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 3 | ########## |
| 4 | Zynq MPSoC |
| 5 | ########## |
| 6 | Instructions below show how to run OP-TEE on Zynq MPSoC based boards. |
Michael Grand | 745ab74 | 2019-08-03 17:22:30 +0200 | [diff] [blame] | 7 | |
| 8 | Supported boards |
Michael Grand | 745ab74 | 2019-08-03 17:22:30 +0200 | [diff] [blame] | 9 | ***************************************** |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 10 | +------------+--------------+----------------------+ |
| 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 Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 21 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 22 | Boot Firmware |
| 23 | ***************************************** |
| 24 | Xilinx Zynq MPSoC device requires two firmware images, one to configure the |
| 25 | device (First Stage Bootloader) and one for runtime platform management (PMU |
| 26 | Firmware). The scope of OP-TEE build Makefile does not cover buildling these two |
| 27 | firmware images therefore pre built binaries are required to generate a valid |
| 28 | boot 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>`_ |
| 30 | page. |
Michael Grand | 745ab74 | 2019-08-03 17:22:30 +0200 | [diff] [blame] | 31 | |
| 32 | .. note:: |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 33 | For Ultra96 board, the firmware binaries can be found in the Avnet website. |
Michael Grand | 745ab74 | 2019-08-03 17:22:30 +0200 | [diff] [blame] | 34 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 35 | Build instructions |
| 36 | ***************************************** |
| 37 | Follow the instructions at ":ref:`get_and_build_the_solution`" page. |
Michael Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 38 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 39 | Configuration switch ``PLATFORM`` can be used to specify the target device |
| 40 | as 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 | |
| 54 | An example of fetch and build commands is: |
Michael Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 55 | |
| 56 | .. code-block:: bash |
Michael Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 57 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 58 | $ 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 Grand | 7d61b05 | 2019-02-24 23:50:46 +0100 | [diff] [blame] | 63 | |
Ibai Erkiaga | 2b3075d | 2021-09-01 14:50:17 +0100 | [diff] [blame^] | 64 | After completion of the buildling process, two new files will be generated |
| 65 | within the ``zynqmp/`` folder, ``BOOT.bin`` and ``<platform-name>.ub``. The |
| 66 | first one is the boot image composed of the FSBL, PMU Firmware, ARM Trusted |
| 67 | Firmware, OP-TEE and U-Boot. The second one is a FIT image containing the Linux |
| 68 | kernel, 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 | |
| 74 | Petalinux build instructions |
| 75 | ***************************************** |
| 76 | OP-TEE build can be additionally integrated within Xilinx Petalinux tool for |
| 77 | Embedded Linux development. As Petalinux is built on top of Yocto, the |
| 78 | integration is performed through adding some exisiting recipes and few |
| 79 | customizations. Use the previous build `Makefile |
| 80 | <https://github.com/OP-TEE/build/blob/3.14.0/zynqmp.mk>`_ based on Petalinux |
| 81 | 2020.2 release as reference. |
| 82 | |
| 83 | Booting the device |
| 84 | ***************************************** |
| 85 | SD Card boot |
| 86 | ============= |
| 87 | Place both generated images in a single partition within the SD card. Boot the |
| 88 | board in SD boot mode and stop the U-Boot autoboot process once the prompt is |
| 89 | displayed in the serial port. |
| 90 | |
| 91 | Use 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/ |