Marcel Ziswiler | 813070a | 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 | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 3 | |
Marcel Ziswiler | 813070a | 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 | 505fb75 | 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 | |
Hiago De Franco | 57292ca | 2024-03-15 18:56:56 -0300 | [diff] [blame] | 23 | Download the imx-atf repository: |
| 24 | |
| 25 | .. code-block:: bash |
| 26 | |
| 27 | $ git clone -b lf_v2.6 https://github.com/nxp-imx/imx-atf.git |
| 28 | |
| 29 | Compile it with an aarch64 toolchain: |
| 30 | |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 31 | .. code-block:: bash |
| 32 | |
Oleksandr Suvorov | 4f00f3c | 2021-07-23 09:39:47 +0300 | [diff] [blame] | 33 | $ make PLAT=imx8qx bl31 -C imx-atf |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 34 | |
| 35 | Get scfw_tcm.bin and ahab-container.img |
| 36 | --------------------------------------- |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 37 | |
Hiago De Franco | 57292ca | 2024-03-15 18:56:56 -0300 | [diff] [blame] | 38 | Download imx-seco firmware and extract it: |
| 39 | |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 40 | .. code-block:: bash |
| 41 | |
Hiago De Franco | 57292ca | 2024-03-15 18:56:56 -0300 | [diff] [blame] | 42 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-5.8.7.bin |
| 43 | $ sh imx-seco-5.8.7.bin --auto-accept |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 44 | |
| 45 | Copy the following firmware to the U-Boot folder: |
| 46 | |
| 47 | .. code-block:: bash |
| 48 | |
Hiago De Franco | 57292ca | 2024-03-15 18:56:56 -0300 | [diff] [blame] | 49 | $ 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 |
| 50 | $ cp ../imx-atf/build/imx8qx/release/bl31.bin . |
| 51 | $ cp ../imx-seco-5.8.7/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 52 | |
| 53 | Build U-Boot |
| 54 | ------------ |
| 55 | |
| 56 | .. code-block:: bash |
| 57 | |
Philippe Schenker | 336720f | 2020-08-28 21:08:05 +0300 | [diff] [blame] | 58 | $ make colibri-imx8x_defconfig |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 59 | $ make u-boot-dtb.imx |
| 60 | |
| 61 | Load the U-Boot Binary Using UUU |
| 62 | -------------------------------- |
| 63 | |
| 64 | Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: |
| 65 | |
Hiago De Franco | 57292ca | 2024-03-15 18:56:56 -0300 | [diff] [blame] | 66 | https://github.com/nxp-imx/mfgtools/releases |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 67 | |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 68 | Put the module into USB recovery aka serial downloader mode, connect the USB |
| 69 | device to your host and execute ``uuu``: |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 70 | |
| 71 | .. code-block:: bash |
| 72 | |
| 73 | sudo ./uuu u-boot/u-boot-dtb.imx |
| 74 | |
| 75 | Flash the U-Boot Binary into the eMMC |
| 76 | ------------------------------------- |
| 77 | |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 78 | Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area |
| 79 | partition and boot: |
Igor Opaniuk | 505fb75 | 2020-02-12 17:14:31 +0200 | [diff] [blame] | 80 | |
| 81 | .. code-block:: bash |
| 82 | |
| 83 | load mmc 1:1 $loadaddr u-boot-dtb.imx |
| 84 | setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 85 | mmc dev 0 1 |
| 86 | mmc write ${loadaddr} 0x0 ${blkcnt} |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 87 | |
| 88 | As a convenience, instead of the last three commands, one may also use the |
| 89 | update U-Boot wrapper: |
| 90 | |
| 91 | .. code-block:: bash |
| 92 | |
| 93 | > run update_uboot |