Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | .. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com> |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 3 | |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 4 | Colibri iMX8X Module |
| 5 | ==================== |
| 6 | |
| 7 | - SoM: https://www.toradex.com/computer-on-modules/colibri-arm-family/nxp-imx-8x |
| 8 | - Carrier board: https://www.toradex.com/products/carrier-board/colibri-evaluation-board |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 9 | |
| 10 | Quick Start |
| 11 | ----------- |
| 12 | |
| 13 | - Build the ARM trusted firmware binary |
| 14 | - Get scfw_tcm.bin and ahab-container.img |
| 15 | - Build U-Boot |
| 16 | - Load U-Boot binary using uuu |
| 17 | - Flash U-Boot binary into the eMMC |
| 18 | - Boot |
| 19 | |
| 20 | Get and Build the ARM Trusted Firmware |
| 21 | -------------------------------------- |
| 22 | |
| 23 | .. code-block:: bash |
| 24 | |
Oleksandr Suvorov | 6150295 | 2021-07-23 09:39:47 +0300 | [diff] [blame] | 25 | $ git clone -b toradex_imx_5.4.70_2.3.0 http://git.toradex.com/cgit/imx-atf.git/ |
| 26 | $ make PLAT=imx8qx bl31 -C imx-atf |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 27 | |
| 28 | Get scfw_tcm.bin and ahab-container.img |
| 29 | --------------------------------------- |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 30 | |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 31 | .. code-block:: bash |
| 32 | |
Oleksandr Suvorov | 6150295 | 2021-07-23 09:39:47 +0300 | [diff] [blame] | 33 | $ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-colibri-scfw-tcm.bin |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 34 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.8.1.bin |
| 35 | $ sh imx-seco-3.8.1.bin --auto-accept |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 36 | |
| 37 | Copy the following firmware to the U-Boot folder: |
| 38 | |
| 39 | .. code-block:: bash |
| 40 | |
Oleksandr Suvorov | 6150295 | 2021-07-23 09:39:47 +0300 | [diff] [blame] | 41 | $ cp imx-atf/build/imx8qx/release/bl31.bin . |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 42 | $ cp imx-seco-3.8.1/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 43 | |
| 44 | Build U-Boot |
| 45 | ------------ |
| 46 | |
| 47 | .. code-block:: bash |
| 48 | |
Philippe Schenker | 08b6a60 | 2020-08-28 21:08:05 +0300 | [diff] [blame] | 49 | $ make colibri-imx8x_defconfig |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 50 | $ make u-boot-dtb.imx |
| 51 | |
| 52 | Load the U-Boot Binary Using UUU |
| 53 | -------------------------------- |
| 54 | |
| 55 | Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: |
| 56 | |
| 57 | https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases |
| 58 | |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 59 | Put the module into USB recovery aka serial downloader mode, connect the USB |
| 60 | device to your host and execute ``uuu``: |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 61 | |
| 62 | .. code-block:: bash |
| 63 | |
| 64 | sudo ./uuu u-boot/u-boot-dtb.imx |
| 65 | |
| 66 | Flash the U-Boot Binary into the eMMC |
| 67 | ------------------------------------- |
| 68 | |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 69 | Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area |
| 70 | partition and boot: |
Igor Opaniuk | ad6a3f3 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 71 | |
| 72 | .. code-block:: bash |
| 73 | |
| 74 | load mmc 1:1 $loadaddr u-boot-dtb.imx |
| 75 | setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 76 | mmc dev 0 1 |
| 77 | mmc write ${loadaddr} 0x0 ${blkcnt} |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 78 | |
| 79 | As a convenience, instead of the last three commands, one may also use the |
| 80 | update U-Boot wrapper: |
| 81 | |
| 82 | .. code-block:: bash |
| 83 | |
| 84 | > run update_uboot |